Skip to main content
POST
/
v1
/
assets
Create an asset
curl --request POST \
  --url https://api.scrip.dev/v1/assets \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "inventory_mode": "SIMPLE",
  "issuance_policy": "UNLIMITED",
  "name": "Bonus Points",
  "program_id": "550e8400-e29b-41d4-a716-446655440000",
  "scale": 2,
  "symbol": "PTS",
  "max_transaction_amount": "10000.00"
}
'
import requests

url = "https://api.scrip.dev/v1/assets"

payload = {
"inventory_mode": "SIMPLE",
"issuance_policy": "UNLIMITED",
"name": "Bonus Points",
"program_id": "550e8400-e29b-41d4-a716-446655440000",
"scale": 2,
"symbol": "PTS",
"max_transaction_amount": "10000.00"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inventory_mode: 'SIMPLE',
issuance_policy: 'UNLIMITED',
name: 'Bonus Points',
program_id: '550e8400-e29b-41d4-a716-446655440000',
scale: 2,
symbol: 'PTS',
max_transaction_amount: '10000.00'
})
};

fetch('https://api.scrip.dev/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inventory_mode' => 'SIMPLE',
'issuance_policy' => 'UNLIMITED',
'name' => 'Bonus Points',
'program_id' => '550e8400-e29b-41d4-a716-446655440000',
'scale' => 2,
'symbol' => 'PTS',
'max_transaction_amount' => '10000.00'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.scrip.dev/v1/assets"

payload := strings.NewReader("{\n \"inventory_mode\": \"SIMPLE\",\n \"issuance_policy\": \"UNLIMITED\",\n \"name\": \"Bonus Points\",\n \"program_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"scale\": 2,\n \"symbol\": \"PTS\",\n \"max_transaction_amount\": \"10000.00\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.scrip.dev/v1/assets")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inventory_mode\": \"SIMPLE\",\n \"issuance_policy\": \"UNLIMITED\",\n \"name\": \"Bonus Points\",\n \"program_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"scale\": 2,\n \"symbol\": \"PTS\",\n \"max_transaction_amount\": \"10000.00\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.scrip.dev/v1/assets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inventory_mode\": \"SIMPLE\",\n \"issuance_policy\": \"UNLIMITED\",\n \"name\": \"Bonus Points\",\n \"program_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"scale\": 2,\n \"symbol\": \"PTS\",\n \"max_transaction_amount\": \"10000.00\"\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2024-01-15T10:30:00Z",
  "deleted_at": "2024-06-01T00:00:00Z",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "inventory_mode": "SIMPLE",
  "issuance_policy": "UNLIMITED",
  "max_transaction_amount": "10000.00",
  "name": "Bonus Points",
  "program_ids": [
    "550e8400-e29b-41d4-a716-446655440001"
  ],
  "scale": 2,
  "status": "ACTIVE",
  "symbol": "PTS",
  "updated_at": "2024-01-15T10:30:00Z"
}
{
"code": "bad_request",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}
{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}
{
"code": "forbidden",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Insufficient permissions for this action"
}
{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}
{
"code": "conflict",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource already exists or state conflict"
}
{
"code": "unsupported_media_type",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Content-Type must be application/json"
}
{
"code": "internal_error",
"message": "An internal error occurred"
}
Creates a new asset in your organization. The asset is automatically linked to the specified program on creation. All fields are required:
  • program_id: the program to link this asset to
  • name and symbol: display name and short code
  • inventory_mode: SIMPLE tracks a single balance per participant; LOT tracks individual batches with expiration, vesting dates, oldest-first spending, and issuer lineage
  • issuance_policy: UNLIMITED mints value on demand with no budget cap; PREFUNDED draws from the program wallet
  • scale: decimal precision from 0 to 18 (e.g., 2 for dollars and cents)
The inventory_mode, issuance_policy, and scale fields are immutable after creation because they affect how the ledger records and resolves balances. If you need a different configuration, create a new asset.
For usage patterns and examples, see the Asset Configuration guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Body

application/json

Asset configuration

inventory_mode
enum<string>
required

SIMPLE tracks one balance per participant. LOT tracks individual batches with expiration and vesting dates. Immutable after creation

Available options:
SIMPLE,
LOT
Example:

"SIMPLE"

issuance_policy
enum<string>
required

UNLIMITED mints on demand with no budget cap. PREFUNDED draws from the program wallet. Immutable after creation

Available options:
UNLIMITED,
PREFUNDED
Example:

"UNLIMITED"

name
string
required

Asset name

Required string length: 1 - 255
Example:

"Bonus Points"

program_id
string<uuid>
required

Program to link this asset to

Example:

"550e8400-e29b-41d4-a716-446655440000"

scale
integer
required

Number of decimal places for amounts (e.g., 2 for dollars and cents). Immutable after creation

Required range: 0 <= x <= 18
Example:

2

symbol
string
required

Short code for this asset

Required string length: 1 - 16
Example:

"PTS"

max_transaction_amount
string

Optional per-transaction ceiling. Must be a positive decimal string. Null means no limit

Example:

"10000.00"

Response

Asset created

created_at
string<date-time>

When the asset was created

Example:

"2024-01-15T10:30:00Z"

deleted_at
string<date-time>

Set when the asset is archived

Example:

"2024-06-01T00:00:00Z"

id
string<uuid>

Asset ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

inventory_mode
string

How balances are tracked

Example:

"SIMPLE"

issuance_policy
string

How value is issued

Example:

"UNLIMITED"

max_transaction_amount
string

Optional per-transaction ceiling. Null means no limit

Example:

"10000.00"

name
string

Asset name

Example:

"Bonus Points"

program_ids
string[]

Programs this asset is linked to

Example:
["550e8400-e29b-41d4-a716-446655440001"]
scale
integer

Decimal precision

Example:

2

status
string

Lifecycle state

Example:

"ACTIVE"

symbol
string

Short code for this asset

Example:

"PTS"

updated_at
string<date-time>

When the asset was last modified

Example:

"2024-01-15T10:30:00Z"