Developers
Errors
Errors use conventional HTTP status codes and one JSON envelope. Branch on error.code, which is stable; message is for people and may change.
The error envelope
{
"error": {
"code": "validation_failed",
"message": "The title field is required.",
"details": {
"title": [
"The title field is required."
]
}
}
}code: a stable, machine-readable string (the table below).message: a human explanation, in English by default. SendAccept-Language: es,caordeto get it in that language where available.details: optional extra data. For validation errors, each invalid field with its messages.
Codes
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is malformed: invalid JSON, an unknown parameter value or a bad cursor. |
| 401 | unauthenticated | The API key is missing, unknown, expired or revoked. |
| 403 | insufficient_scope | The key lacks a scope; error.required names it. |
| 403 | plan_published_limit | Publishing this home would go over the homes published at the same time that the agency's plan allows. Unpublish another or change plan. |
| 404 | not_found | No such resource in your agency. |
| 409 | idempotency_conflict | This Idempotency-Key was already used with a different body. |
| 409 | processing | The home cannot be deleted while a recording is being processed. |
| 422 | validation_failed | A field is invalid; error.details lists each field and why. |
| 422 | tour_required | The home does not have its tour ready to publish yet. |
| 422 | kit_disabled | The home is tour-only (kit_enabled: false), so there is no page to publish. |
| 429 | rate_limited | Too many requests. Wait for Retry-After seconds. |
| 500 | server_error | Something failed on our side. Retry later; it is safe with an Idempotency-Key. |
Handling errors
4xxerrors will fail again if you resend the same request; fix the request first.429is the exception: retry after the wait.5xxerrors and network failures can be retried with exponential backoff. Send anIdempotency-Keywith POSTs so a retry never creates a duplicate.- Log
error.codeand the response's status with every failure: that is what support will ask for.