Skip to main content
The Data API exposes the analytics Moda computes over your ingested conversations as HTTP endpoints. It serves the same data as the dashboard, so you can use it from CI jobs, coding agents, and scripts. The Moda CLI is built on this API.

Base URL

Authentication

Every endpoint requires an API key (called an ingestion key in the dashboard) in the x-api-key header:
Keys are created at Settings → Ingestion keys and are shown once at creation. A key is bound to one tenant; every response is scoped to that tenant. See Authentication for key management.
The Data API and the Ingestion API accept the same moda_sk_ keys but read different headers. The Data API reads x-api-key; the Ingestion API reads Authorization: Bearer. A key sent in the wrong header returns 401. CLI session tokens are not valid here.
A missing key returns 401 with "message": "API key is required"; an invalid or revoked key returns:

Make your first request

The full /overview reference is on the Analytics page.

Common query parameters

Most endpoints accept a subset of these parameters: Two validation rules apply everywhere:
  • Numeric parameters must be non-negative integers (window must be positive); anything else (limit=abc, offset=-1, window=0) returns 400. Values outside the allowed range are clamped to the nearest bound, not rejected.
  • Enum parameters (mode, time_range, environment, outcome, kind, family, …) return 400 for values outside the documented set:

Limits

Pagination

Three patterns are in use:
  1. limit + offset — most list endpoints. Responses carry a pagination object; keep incrementing offset by limit while has_more is true:
  2. limit only/search has no offset. Its pagination object reports limit, returned, and has_more; narrow the query or time range instead of paging deeper.
  3. Keyset cursors — the problem sub-resources (/reports, /conversations, /evidence) return pagination.next_cursor; pass it back as cursor to fetch the next page.

Endpoints

Errors

Error bodies follow one shape; message is a string or an array of validation messages:
Lookups of unknown IDs generally do not return 404. GET /clusters/:nodeId/conversations returns 200 with cluster: null, and GET /problems/:id returns 200 with found: false. Check those fields instead of relying on the status code.

Next steps

  • Search — find the exact message where something happened, then jump to its context.
  • Signals — read frustration, emotion, tool-failure, and hallucination detections.
  • Problems — read the ranked problem list and send feedback.
  • CLI overview — the same data from the terminal, with agent-friendly JSON output.