data field is populated and error is null. On failure, data is null and error carries both a human-readable message and a stable machine-readable code.
Response envelope
Success response:Always check the HTTP status code first, then use
error.code for programmatic branching and error.message for displaying a human-readable description to users.Handling errors in code
Error codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | The request body or query string failed validation |
| 400 | AMOUNT_TOO_SMALL | The amount is below the $1 minimum, or the asset’s payable precision |
| 401 | HTTP_401 | Missing, malformed, or invalid API key |
| 403 | HTTP_403 | Your key lacks the required scope for this endpoint |
| 404 | NOT_FOUND | The resource does not exist or does not belong to your account |
| 409 | INSUFFICIENT_BALANCE | Not enough available balance to complete a withdrawal |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests — back off and retry |
| 503 | RATE_UNAVAILABLE | Live FX rate temporarily unavailable — retry shortly |
| 500 | INTERNAL_ERROR | An unexpected error occurred on Blockra’s side |
VALIDATION_ERROR responses also include a details array of per-field messages to help you pinpoint the offending input field.
