Skip to main content
POST
/
v1
/
programs
/
{programId}
/
assets
Link asset to program
curl --request POST \
  --url https://api.scrip.dev/v1/programs/{programId}/assets \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "asset_id": "550e8400-e29b-41d4-a716-446655440000"
}
'
{
  "created_at": "2024-01-15T10:30:00Z",
  "deleted_at": "2023-11-07T05:31:56Z",
  "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"
}
Links an existing organization-level asset to a program. This is how you share a single asset across multiple programs. When you create an asset with a program_id, the link happens automatically; this endpoint is for adding an asset to additional programs after initial creation. Pass the asset’s id in the request body. The link is permanent for any asset that has ledger entries in the program. If no ledger entries exist, the asset can be unlinked. Attempting to link an asset that is already linked to the program returns an error.
For usage patterns and examples, see the Programs guide.

Authorizations

X-API-Key
string
header
required

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

Path Parameters

programId
string<uuid>
required

Program ID

Body

application/json

Asset to link

asset_id
string<uuid>
required

ID of the asset to link

Example:

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

Response

Asset linked

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

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"