SDK ingestion
SDK ingestion endpoints under/api/v1/* use your project ID in the
x-project-id header. The header must be a valid UUID; otherwise the request fails
with 400. SDK configuration and environment variables may format it as
project_id, projectId, or AGNOST_PROJECT_ID; all refer to the same project ID.
OpenTelemetry exporters sending to otel.agnost.ai use the X-Agnost-Project-ID
header instead.
The project ID is a public routing identifier. It does not grant dashboard read access by itself.
Dashboard and API access
Dashboard API endpoints use one of these:
With a JWT,
x-project-id selects the project. You must be a member of it, or the
request fails with 403.
An API key belongs to one project. Requests made with it always act on that
project, and x-project-id is ignored. If you send both x-api-key and
Authorization, the API key is used.
API keys use the agnost_<64-hex> format and are issued from Settings -> API keys.
An API key does not work on every dashboard endpoint. Alert and report management and API key
management require a logged-in user (JWT). With an API key you can still test an alert query and
turn an alert on or off. Each endpoint in the API reference lists the methods it accepts.
Common mistakes
- Sending
x-project-idwithout a JWT or API key to dashboard endpoints. - Using the wrong project ID when a user belongs to multiple projects.
- Forgetting the
X-Agnost-Project-IDheader on OpenTelemetry exporters. - Treating the project ID as a secret. Rotate API keys if they leak; project IDs are routing identifiers.
Related pages
Next steps
- Packages and versions: choose the package that matches your application.
- Capture a session: create a conversation boundary through the API.
- Capture an event: send activity into an existing session.