Async Operations
The Clossir API follows a CQRS (Command Query Responsibility Segregation) pattern. Understanding this split is essential for integrating correctly.
Reads vs commands
Reads hit the database directly and return the current projection. Commands are queued and processed asynchronously by dedicated workers — they don’t execute inline with your request.
The 202 response
When you issue a command, the API returns 202 Accepted with a response body containing
the resource ID and a pending status:
At this point the transfer is queued, not complete. The system will evaluate compliance policies, execute the on-chain transaction, and update the status asynchronously.
Some endpoints also return a requestId field for webhook correlation (see below).
Checking status (polling)
Poll the corresponding GET endpoint with the resource ID to check progress:
Webhook correlation (preferred)
Instead of polling, subscribe to webhooks for real-time notifications. Endpoints that
return a requestId in their 202 response (such as asset deployment and bridge operations)
allow you to correlate the webhook payload with the original command:
For endpoints that return a resource ID instead (like transferId), match on that ID in
the webhook payload.
Webhooks are more efficient than polling and give you immediate notification when processing completes. See the API Reference for the webhook payloads and event types.
Common 202 endpoints
React integration
With @signum-tech/sdk-react, use useSignumMutation for commands and useSignumQuery
with refetchInterval for polling:
See React Integration for the full sdk-react guide.
Next steps
- Error Handling — catch and branch on API errors
- API Reference — webhook payloads and event types
- Webhooks — set up webhook subscriptions