Skip to main content
The Sentry API uses token-based authentication for all requests. Every request to a protected endpoint must include a valid token in the Authorization header.

Bearer token authentication

Pass your token as a bearer token in the Authorization header:
Authorization: Bearer <your-token>
Here is a complete example using curl:
curl https://sentry.io/api/0/organizations/ \
  -H "Authorization: Bearer sntryu_YOUR_TOKEN_HERE"

Token types

Sentry supports two types of API tokens:

User auth tokens

Tokens scoped to your personal Sentry account. Use these for scripts and integrations that act on your behalf.

Internal integration tokens

Tokens scoped to an organization. Use these for server-to-server integrations and automation workflows that act on behalf of the org.
See API tokens for details on creating and managing each token type.

DSN authentication

DSN (Data Source Name) authentication is used exclusively for event ingestion — sending errors, transactions, and other events to Sentry from your application code via a Sentry SDK. It is distinct from the API authentication described on this page and is not used to call the REST API. Your DSN looks like this:
https://<public-key>@o<org-id>.ingest.sentry.io/<project-id>
You configure the DSN in your Sentry SDK initialization. Do not use DSN credentials to authenticate REST API calls.

Scopes

Tokens are granted one or more scopes that control which API operations they can perform. Always request the minimum scopes your integration needs.
ScopeDescription
org:readRead organization data, members, and settings
org:writeModify organization settings and configuration
org:adminFull administrative access to the organization
project:readRead project data and configuration
project:writeCreate and modify projects
project:adminDelete projects and manage project keys
project:releasesCreate and manage releases and deploys
team:readRead team membership and settings
team:writeCreate and modify teams
team:adminDelete teams
event:readRead issues and events
event:writeUpdate and resolve issues
event:adminDelete issues and events
member:readRead organization member data
member:writeInvite and manage organization members
alerts:readRead alert rules
alerts:writeCreate and modify alert rules

Rate limiting

The Sentry API enforces rate limits to protect service availability. Rate limit information is returned in response headers:
HeaderDescription
X-Sentry-Rate-Limit-LimitMaximum number of requests per window
X-Sentry-Rate-Limit-RemainingRequests remaining in the current window
X-Sentry-Rate-Limit-ResetUnix timestamp when the window resets
X-Sentry-Rate-Limit-ConcurrentLimitMaximum concurrent requests allowed
X-Sentry-Rate-Limit-ConcurrentRemainingConcurrent request slots remaining
When you exceed the rate limit, the API returns a 429 Too Many Requests response. Your client should back off and retry after the time indicated in the Retry-After header.

Authentication errors

Status codeMeaning
401 UnauthorizedNo token provided or token is invalid
403 ForbiddenToken is valid but lacks the required scope

Example error response

{
  "detail": "Authentication credentials were not provided."
}

API base URL

All Sentry API requests use the following base URL:
https://sentry.io/api/0/
If your organization is on the EU data region, use:
https://de.sentry.io/api/0/

Build docs developers (and LLMs) love