Vaults

Create an asset vault

Creates a token's asset vault once it passes our automatic token check, priced or not, and the API and the app offer it at once. On an EVM chain we create it, and on Solana you get your wallet's transaction to sign and submit, then call again with its `requestId` once it confirms.

POST
/api/vaults/create

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/vaults/create" \  -H "Content-Type: application/json" \  -d '{    "chainId": 8453,    "token": "0x940181a94A35A4569E4529A3CDfB74e38FD98631"  }'
{  "status": "prepared",  "chainId": 1151111081099710,  "token": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",  "requestId": "6f0c2f7e-2a0b-4b8e-9b54-0c2d7f0f5a11",  "transaction": "AQAAAA==",  "expiresAt": "2026-11-15T12:00:55.000Z",  "feePayer": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",  "payer": "owner",  "lamports": "8406910"}
{  "status": "created",  "chainId": 8453,  "token": "0x940181a94A35A4569E4529A3CDfB74e38FD98631",  "assetId": "AERO",  "txHash": "0x5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c",  "shown": true,  "message": "the vault is created and can be used through the API and the app now"}

{  "error": "TOKEN_NOT_CONTRACT",  "code": "TOKEN_NOT_CONTRACT",  "message": "token 0x000000000000000000000000000000000000dEaD is not a contract on chain 8453",  "details": {    "token": "0x000000000000000000000000000000000000dEaD"  },  "requestId": "3f2b8c1e-7a4d-4e9b-b6c5-0d1e2f3a4b5c"}

{  "error": "VAULT_EXISTS",  "code": "VAULT_EXISTS",  "message": "token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 already has an asset vault on chain 8453",  "details": {    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",    "vault": "0xb367A4306087d3981B38C032464cD7E3A7a03A4E"  },  "requestId": "3f2b8c1e-7a4d-4e9b-b6c5-0d1e2f3a4b5c"}
{  "error": "SERVICE_UNAVAILABLE",  "code": "SERVICE_UNAVAILABLE",  "message": "the automatic token check could not run, so try again shortly",  "details": {    "retryAfterSeconds": 30,    "token": "0x7F9b1c2e3d4a5b6C7D8e9F0A1B2c3D4e5f6A7b8C"  },  "requestId": "3f2b8c1e-7a4d-4e9b-b6c5-0d1e2f3a4b5c"}