Authentication and scopes

Choose a credential and authorize requests for the correct project.

Credential types

ClientCredentialHow to use it
A person in a terminalOAuth access and refresh tokensSign in with the CLI; credentials are stored in the operating-system vault.
CI, application, script, or AI agentExpiring service-account tokenSupply NEATLOGS_TOKEN through a secret store; use Authorization: Bearer for HTTP.
Application sending telemetrySDK ingest credentialFollow SDK setup. Ingest credentials do not authorize Public API reads.
A guest evaluation reviewerResource-bound guest tokenOnly guest-review endpoints accept Authorization: NeatLogsGuest.
Existing integration using a legacy Public API keyLegacy project keyOnly endpoints explicitly listing the legacy scheme accept it.

Use the exact dashboard origin for both login and requests: https://app.neatlogs.com for US, or https://eu.app.neatlogs.com for EU once the public API is deployed there. Credentials are bound to their issuing deployment and cannot be reused across regions or environments. The CLI --host value is the origin without an API path. For EU, the issuer is https://eu.app.neatlogs.com and the resource audience is https://eu.app.neatlogs.com/api/v1/public; the backend/SDK ingest URL https://eu.ingest.neatlogs.com is not the login origin.

Project and organization context

For project-scoped requests using OAuth or a service-account token, send:

Authorization: Bearer <access-token>
x-project-id: <project-uuid>

OAuth access follows the signed-in user's current membership and project role. A service account must have an active binding to the selected project with an appropriate role. Changing the project header does not grant access to an unbound project.

Discovery and organization operations use the context declared on their endpoint page. For example, the CLI can list projects after human login before a project is saved in the profile. Do not assume every operation requires the same headers.

Some endpoint tables mark x-project-id as optional because legacy project keys carry their own project context. It remains required for OAuth and service-account callers on those project-scoped endpoints.

Scopes and roles

Scopes limit what a credential can request. Your current project role, organization membership, resource ownership, and plan entitlement must also allow the operation. Requesting a scope never grants a role you do not have.

Scope familyTypical purpose
context:readSelected project and actor context
observability:read, observability:writeTraces, spans, analytics, feedback, and trace metadata
evaluation:read, evaluation:writeEvaluations, batches, and evaluator workflows
configuration:read, configuration:writeDetections, prompts, alerts, and project configuration
project:writeCreate or update projects
sharing:read, sharing:writeSharing and guest-link workflows
access:read, access:writeAccess and service-account administration
organization:read, organization:writeOrganization data and administration
billing:readBilling views
profile:read, profile:writePersonal profile and preferences
offline_accessOAuth refresh-token access; this is not an API operation permission.

The endpoint reference lists each operation's exact OAuth scopes and accepted credentials. Service-account tokens support a subset of scope families; their minting contract lists the available functional scopes. Some personal or administrative operations accept OAuth only.

Token lifecycle

Store human OAuth credentials in the operating-system vault. Store automation tokens in a secret manager, rotate them before expiry, and revoke them when the integration stops needing access. Revoking a service-account token stops subsequent requests without disabling the entire account.

Legacy x-api-key and legacy Bearer schemes apply only where listed. A token's credential type determines its accepted carrier; moving a service-account token into x-api-key does not make it valid.

On this page

Ask Neatlogs AI

Answers from the docs

How can I help?

Ask anything about instrumenting, tracing, or the Neatlogs dashboard.