Browse documentation

Reference

REST API

Use Teml's public API conventions and find every supported customer resource family.

The public REST API is served by Teml Edge:

https://api.teml.io/api/v1

Use an SDK for telemetry and the Teml CLI for ordinary investigation or automation. Use REST when building a direct integration. Teml is in early access, so pin the client and Teml release you verified when request-schema stability matters.

Authenticate and select a project

Send an API key in X-Teml-API-Key. X-API-Key and Authorization: ApiKey tm_... are also accepted, while MCP uses bearer authentication. Prefer one documented header per client.

curl --fail-with-body \
  -H "X-Teml-API-Key: $TEML_API_KEY" \
  "https://api.teml.io/api/v1/persons?project_id=$TEML_PROJECT&search=buyer%40acme.example"

For organization-level credentials, many data reads accept project_id. A project-scoped key cannot be widened by passing a different value. Organization identity always comes from the authenticated principal, not from request input.

Resource catalog

Area Resource prefixes Main purpose
Customers and accounts /persons, /groups, /group-types, /account-segments Profiles, timelines, group accounts, watched segments
Raw observability /traces, /logs, /metrics, /services, /search, /stream/logs Search, correlation, aggregation, live logs, RED metrics, service map
Errors and delivery context /errors, /issues, /releases, /sourcemaps, /symbols Issue triage, impact, lifecycle, deploys, readable stacks, ticket links
Replay /replay, /replay-for-trace Recordings, snapshots, related evidence, trace lookup
Events and rollout /analytics, /flags, /decide Event trends and triggerers, cohorts, flag configuration and evaluation
AI execution /agent-runs, /llm, /evals, /ai Runs, scores, cost, pricing overrides, quality settings, natural-language query
Detection and response /anomalies, /alerts, /incidents, /oncall, /escalation-policies Findings, rules, silences, response, schedules, routing
Saved work and export /dashboards, /search/saved, /export Dashboards and widgets, saved searches, background exports
Workspace and access /projects, /account, /invitations, /settings, /usage, /users/me Projects, members, API keys, configuration, usage, contact methods
Integrations and delivery /connections, /notifications, /tickets Provider authorization, delivery channels, Issue ticket links
Customer Detective /investigations Start, continue, list, and read grounded investigations

Telemetry ingestion uses OTLP /v1/traces, /v1/logs, and /v1/metrics plus diagnostic-event /api/v1/capture; it is documented separately because it does not follow normal resource CRUD.

Platform-operator /admin routes and provider callback/webhook routes are not customer integration surfaces and are intentionally excluded from this catalog.

Request and response conventions

  • Send JSON writes with Content-Type: application/json unless an upload endpoint requires a raw symbol artifact.
  • JSON field names are snake_case.
  • Times are RFC 3339; common windows use start_time and end_time.
  • Repeated filters may accept repeated parameters or comma-separated values, depending on the resource.
  • Paginated reads commonly accept limit and an opaque cursor. Return the next cursor unchanged; do not decode or construct it.
  • Server limits clamp page sizes. Do not assume one maximum across resources.
  • Use IDs returned by the API for updates and deletes; do not derive them from display names.

Errors and retries

Errors use a JSON envelope:

{
  "error": "permission_denied",
  "message": "the key does not have the required scope"
}

Treat 400 as invalid input, 401 as a missing or invalid credential, 403 as insufficient scope, 404 as missing or inaccessible, 409 as a state conflict, and 429 as a rate or plan limit. Retry 429 and temporary 5xx responses only with bounded exponential backoff, honoring Retry-After when present. Do not automatically retry validation or permission failures.

Discover exact operations

The installed CLI mirrors the public surface and can print its current command contract:

teml docs             # JSON manifest for tools and agents
teml docs --markdown  # readable command and flag reference

Use the current CLI manifest or dashboard network contract for exact early-access request bodies. Do not copy internal gRPC or service routes into an external integration.