For the complete documentation index, see llms.txt. This page is also available as Markdown.

RWA

REST API for querying Real-World Assets, managing NFTs, and triggering on-chain mints.

Base URL: https://rwa.onchainlabs.ch Prefix: /v1/api/ Format: JSON

Authentication

Required header:

x-api-key: <your_api_key>

The key is validated against the WalletTwo auth service and all queries are automatically scoped to the associated company.

Common errors:

  • 401 x-api-key header missing. — Header missing

  • 401 Invalid API key. — Key does not exist or has been revoked


Endpoints

1. List RWAs

GET /v1/api/rwa

Param
Type
Default
Notes

type

string

Filter by RWA type

isBuyable

boolean

Only Stripe-purchasable

isClaimable

boolean

Only on-chain claimable

limit

integer

50

Max 200

offset

integer

0

Pagination

Response 200: { total, limit, offset, rwas: [...] }


2. RWA Detail

GET /v1/api/rwa/{id}

Response 200: Full RWA object with totalNfts, claimedNfts, unclaimedNfts and nested data.

Error 404: RWA does not exist or belongs to another company.


3. List NFTs of an RWA

GET /v1/api/rwa/{id}/nfts

Param
Type
Notes

claimed

boolean

true = minted; false = pending

limit

integer

Default 50, max 200

offset

integer

Default 0

Response 200: Array of NFTs with secret, url and claim status.


4. Issue new NFTs (batch, no mint)

POST /v1/api/rwa/{id}/nfts

count between 1 and 100. Creates the NFTs in DB but does not mint them on-chain.

Response 200: { created, nfts: [...] } with auto-generated serial and secret.


5. Create and mint an RWA NFT (new)

POST /v1/api/rwa/{id}/mint

Creates a new NFT for the given RWA and queues it for on-chain minting in a single call.

Body:

Validations:

  • The RWA must belong to the API key's company

  • The RWA must have isClaimable: true

  • The RWA's chainId must be supported

Response 200:

Confirms it was queued — not completed. Poll GET /v1/api/nft/{id} to check status.


6. List company NFTs

GET /v1/api/nft

Param
Type
Notes

rwaId

UUID

Filter by RWA

claimed

boolean

true = minted; false = pending

limit

integer

Default 50, max 200

offset

integer

Default 0

Response 200: Array of NFTs across all company RWAs, with nested rwa object.


7. NFT Detail

GET /v1/api/nft/{id}

Response 200: NFT object with full RWA info and NFT-specific data.

Errors:

  • 404 — NFT does not exist

  • 403 — NFT belongs to another company


8. Mint an existing NFT (updated)

POST /v1/api/nft/{id}/mint

Replaces the old POST /v1/api/nft/claim. The NFT is referenced by URL — ids are no longer sent in the body.

Body:

Validations:

  • secret must match the NFT's secret

  • The NFT must belong to the API key's company

  • mintedAt must be null (not yet claimed)

  • The RWA must have isClaimable: true

  • The chainId must be supported

Response 200:

Confirms queued — not completed. Poll GET /v1/api/nft/{id} to see mintedTx / mintedBlock when finished.

Errors:

  • 400 — Missing or invalid fields

  • 403 — NFT belongs to another company

  • 404 — NFT does not exist

Last updated