Create an asset
Create a new asset type within a program.
Creates a new asset in your organization. The asset is automatically linked to the specified program on creation. All fields are required:Documentation Index
Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
Use this file to discover all available pages before exploring further.
program_id: the program to link this asset tonameandsymbol: display name and short codeinventory_mode:SIMPLEtracks a single balance per participant;LOTtracks individual batches with expiration and vesting datesissuance_policy:UNLIMITEDmints value on demand with no budget cap;PREFUNDEDdraws from the program walletscale: decimal precision from 0 to 18 (e.g.,2for dollars and cents)
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.
Authorizations
API key passed in the X-API-Key header.
Body
Asset configuration
SIMPLE tracks one balance per participant. LOT tracks individual batches with expiration and vesting dates. Immutable after creation
SIMPLE, LOT "SIMPLE"
UNLIMITED mints on demand with no budget cap. PREFUNDED draws from the program wallet. Immutable after creation
UNLIMITED, PREFUNDED "UNLIMITED"
Asset name
1 - 255"Bonus Points"
Program to link this asset to
"550e8400-e29b-41d4-a716-446655440000"
Number of decimal places for amounts (e.g., 2 for dollars and cents). Immutable after creation
0 <= x <= 182
Short code for this asset
1 - 16"PTS"
Optional per-transaction ceiling. Must be a positive decimal string. Null means no limit
"10000.00"
Response
Asset created
When the asset was created
"2024-01-15T10:30:00Z"
Set when the asset is archived
Asset ID
"550e8400-e29b-41d4-a716-446655440000"
How balances are tracked
"SIMPLE"
How value is issued
"UNLIMITED"
Optional per-transaction ceiling. Null means no limit
"10000.00"
Asset name
"Bonus Points"
Programs this asset is linked to
["550e8400-e29b-41d4-a716-446655440001"]Decimal precision
2
Lifecycle state
"ACTIVE"
Short code for this asset
"PTS"
When the asset was last modified
"2024-01-15T10:30:00Z"