API

Errors

Every error code numbers answers with, in RFC 9457 problem JSON, and what to change before retrying.

1 min read

Errors are RFC 9457 problem details, Content-Type: application/problem+json:

{
	"type": "https://numbers.obelism.studio/docs/api/errors#forbidden",
	"title": "The request origin is not allow-listed and no valid token was sent.",
	"status": 403,
	"detail": "The origin https://shop.example.com is not allowed for production in space space_….",
	"code": "forbidden",
	"hint": "See https://numbers.obelism.studio/docs/api/log."
}

Branch on code; detail and hint are for people and may change.

Each code below is the anchor of its type URL.

invalid_json

400: Send a JSON object, as text/plain (no preflight) or application/json.

invalid_request

400: Fix the field detail names: a missing scope, a path without a leading /, a string over 256.

unsupported_api_version

400: Send Api-Version: 1, or leave the header out.

reserved_event_name

400: Rename the event: names starting with gtm. are Google Tag Manager's.

ingest_failed

400: The event was valid but couldn't be queued. Retry later.

unauthorized

401: Send a valid bearer token (agent API).

forbidden

403: detail names the origin (or the missing Origin header), the environment and the Space it checked. Allow that origin under Allowed origins on the Space's page on www.obelism.studio, or send a valid token header.

unknown_organization

404: Check organizationId. A deleted Organization takes no more events.

unknown_space

404: Check spaceId: it must be a Space of the Organization you may open.

not_found

404: No endpoint at this path.

method_not_allowed

405: Use the endpoint's method (POST for /api/log, GET for the agent API).

payload_too_large

413: Keep the body under 8 KB.

rate_limited

429: Wait for Retry-After before sending more.

internal_error

500: Something broke on our side. Retry later.

On this page

Marks in the margin

  • Note
  • Watch out
  • Updated

Scribes marked doubtful lines in the margin. That practice is called obelism.

Stuck on a step?