Browse docs
On this page

API

The REST API behind the product - base URL, authentication, and error shape.

Every feature in the product is built on this same REST API - there is no separate "internal" API with capabilities the UI has that you don't. The generated reference lists every operation; this page covers what's common across all of them.

For external log reads, start with the Query API guide. It covers personal access token creation, copyable ObiQL requests, Data Scopes, rate limits, and errors.

To let an AI agent such as Claude, Cursor or VS Code Copilot query your workspace, see Connect AI agents (MCP).

Base URL

https://api.obistack.com

Authentication

Two credential types, depending on the route:

  • Session cookie - set by POST /v1/auth/signin or after POST /v1/auth/email/verify completes sign-up. What the console itself uses. Most routes require this.
  • API key - a workspace-scoped obi_... key, created and revoked from Preferences, Workspace access tokens (see API Keys). A personal access token (read_only or full_access) authenticates as the person who created it, and is accepted anywhere the reference says Session cookie or personal access token. An ingest key (obi_ingest_) authenticates as a data input rather than a person, and is accepted by exactly one route: POST /v1/events.

A token never widens what its holder can do: scope narrows a workspace role, it does not replace it. A full_access token held by a viewer is still a viewer, and an ingest key carries no user at all - which is why it can write events and read nothing.

A handful of routes need neither - GET /healthz, GET /openapi.json, and a workspace's public status page - see each operation's Auth row in the reference for exactly which.

Errors

A failed request returns a JSON body with an error code and, where useful, a human-readable message - never a bare HTTP status with no body. An ObiQL query that fails to parse or compile returns its error.message verbatim from the parser, not a generic "bad request."

Discovering the schema yourself

GET /openapi.json returns the same OpenAPI 3.1 document the generated reference is rendered from - point a code generator or API client at it directly rather than hand-copying request shapes out of these docs.

Tenant Isolation & Data Boundaries

Every authenticated route derives its tenant scope from the credential (session or API key) alone - never from a workspace id, tenant id, or similar field in the request body, query string, or header. See Tenant Isolation for the full model this API is built on.