The Spirii Public API uses conventional HTTP status codes. The response body always follows the same error envelope.
Error envelope
{
"error": {
"type": "invalid_request",
"code": "missing_required_field",
"message": "The field `country_code` is required.",
"param": "country_code",
"request_id": "req_01HW8K9ZY8"
}
}
Status codes
| Code | Meaning |
|---|
400 | Invalid request — see error.code for details. |
401 | Missing or invalid authentication. |
403 | Authenticated, but not authorized for this resource. |
404 | Resource not found. |
409 | Conflict — e.g., duplicate creation. |
422 | Validation error. |
429 | Rate limit hit. See Rate limits. |
5xx | Spirii-side error. Safe to retry with backoff. |
Always log the request_id. We use it to look up requests in our logs when you contact support.