HTTP Status Codes
| Code | Meaning | Action |
|---|---|---|
200 | Success | Parse response normally |
400 | Bad request - invalid body or parameters | Check request schema |
401 | Unauthorized - invalid or missing API key, or signature verification failed | Check x-api-key header and signing format |
500 | Internal server error | Retry with backoff; check /health |
If you’re seeing an unexpected error, join our Discord and the team will help you debug it.
Commit Status
The/commit endpoint returns a status field rather than an HTTP error for action-level outcomes. Always check this field after committing.
| Status | Description | Action |
|---|---|---|
completed | Action processed successfully - balances have been updated | Continue normally |
rejected | Deposit failed compliance or risk screening - funds will be refunded to the originating wallet after extended screening is completed | Notify the user |
pending | Waiting for the transaction to land on-chain or undergo compliance screening | Check back shortly |
failed | The transaction was rejected on-chain - the user’s balance is no longer held in a pending state | Inform the user; check the on-chain transaction |
expired | The transaction was not confirmed within the required window - the user’s balance is no longer held in a pending state | Inform the user |
A
rejected, failed, or expired status still means the commit succeeded. The balance is no longer held in a pending state. No further action is required.Idempotency
/commit is idempotent. If you call it twice with the same tx_id, the second call returns already_processed: true and the same status as the first call. This is safe - use it to confirm commit state after a crash or retry.
Handling 401 - Signature Errors
The most common cause of a401 on signed endpoints is a malformed signature message. Check:
- Message format - the ToS header line and
Details:line must match exactly, including the newlines. - Timestamp - must be Unix time in milliseconds, not seconds. Stale timestamps are rejected.
- Signing key - must be the Ed25519 secret key of
user_address, not any other key. - Encoding - the signature must be base64-encoded, not base58 or hex.
Retry Strategy
For500 errors or network timeouts, use exponential backoff:
Health Check
UseGET /health to verify API availability before critical flows or for uptime monitoring:
