instaenv
DevelopersGet an API key

Die Entwicklerdokumentation gibt es auf Englisch und Spanisch. Hier siehst du sie auf Englisch.

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

422 Unprocessable Content
{
  "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. Send Accept-Language: es, ca or de to get it in that language where available.
  • details: optional extra data. For validation errors, each invalid field with its messages.

Codes

StatusCodeMeaning
400invalid_requestThe request is malformed: invalid JSON, an unknown parameter value or a bad cursor.
401unauthenticatedThe API key is missing, unknown, expired or revoked.
403insufficient_scopeThe key lacks a scope; error.required names it.
403plan_published_limitPublishing this home would go over the homes published at the same time that the agency's plan allows. Unpublish another or change plan.
404not_foundNo such resource in your agency.
409idempotency_conflictThis Idempotency-Key was already used with a different body.
409processingThe home cannot be deleted while a recording is being processed.
422validation_failedA field is invalid; error.details lists each field and why.
422tour_requiredThe home does not have its tour ready to publish yet.
422kit_disabledThe home is tour-only (kit_enabled: false), so there is no page to publish.
429rate_limitedToo many requests. Wait for Retry-After seconds.
500server_errorSomething failed on our side. Retry later; it is safe with an Idempotency-Key.

Handling errors

  • 4xx errors will fail again if you resend the same request; fix the request first. 429 is the exception: retry after the wait.
  • 5xx errors and network failures can be retried with exponential backoff. Send an Idempotency-Key with POSTs so a retry never creates a duplicate.
  • Log error.code and the response's status with every failure: that is what support will ask for.