DocsGuide

Start here

The base URL, the three ways to call the API, and what every answer looks like.

The API in one paragraph

Every call goes to https://api.inorbit.hr under /v1, carries a bearer token and sends and receives JSON. The same routes are served three ways: a request and an answer (REST), a request and a stream of events (server-sent events, on routes ending in /events), and one WebSocket that carries any call by name (/v1/ws). One OpenAPI document describes the REST surface; it is on this site under Reference and at https://api.inorbit.hr/openapi.json, without a token. That document holds the routes an API key may call and nothing else; with a token, GET /v1/openapi.json answers the document for your plan.

Your first call

curl https://api.inorbit.hr/v1/me \
  -H "Authorization: Bearer $TOKEN"
{
  "subject": "ak_7f3k…",
  "kind": "client",
  "client_id": "ak_7f3k…",
  "org": null,
  "key": null,
  "scopes": ["identity:read", "account:read"],
  "role": null
}

GET /v1/me answers with the caller the gateway verified: who you are as the API sees you. It is the call to make first, because it needs nothing but a token with scope identity:read. How to get one is on Authentication.

What every answer looks like

  • The body is JSON, on every route and every transport. A request body must be application/json too.
  • Field names are the ones in the reference. 64-bit integers travel as decimal strings; timestamps as RFC 3339; enumerations by name; bytes as base64. Every field is present in an answer, defaults included.
  • An error is one envelope everywhere: {"code", "error", "details"}, where code is a fixed slug and the HTTP status follows it. The slugs are on Errors.
  • A value marked stub: true is a placeholder the platform labels as such, never a measurement.

Versioning

Every path starts with /v1. A field is added, never renamed or removed, within a version; a change that would break a client gets a new prefix and the old one keeps answering until the changelog says otherwise.

What is here today

The routes an API key may call are the ones in the Reference; the first product on this API arrives with its own section here. The changelog is where a new route is announced.