Skip to main content
Releases let Sentry correlate errors with the version of your code that introduced them. When you create a release and associate it with commits, Sentry can identify the likely commit that caused a regression and suggest owners.

List releases

GET /api/0/organizations/{organization_id_or_slug}/releases/
Returns a paginated list of releases for the organization. Required scope: project:releases

Query parameters

query
string
Filters releases whose version string starts with this value.
cursor
string
Pagination cursor from the Link response header.

Example request

curl https://sentry.io/api/0/organizations/my-org/releases/ \
  -H "Authorization: Bearer sntrys_TOKEN"

Example response

[
  {
    "id": 2,
    "version": "2.0rc2",
    "shortVersion": "2.0rc2",
    "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
    "url": null,
    "dateCreated": "2018-11-06T21:20:08.033Z",
    "dateReleased": null,
    "commitCount": 0,
    "deployCount": 0,
    "newGroups": 0,
    "firstEvent": null,
    "lastEvent": null,
    "lastCommit": null,
    "lastDeploy": null,
    "authors": [],
    "projects": [
      { "name": "Pump Station", "slug": "pump-station" }
    ]
  }
]

Create a release

POST /api/0/organizations/{organization_id_or_slug}/releases/
Creates a new release and optionally associates it with commits. You can supply commit data directly or use refs to have Sentry pull commits from a connected repository integration. Required scope: project:releases

Request body

version
string
required
A version identifier for this release. This can be a version number, a commit hash, a semantic version string, or any value that uniquely identifies the build.
projects
array
required
An array of project slugs to associate with this release. At least one project is required.
ref
string
An optional commit reference, useful when a tagged version has been provided.
url
string
A URL to the release — for example, a link to the changelog or the source code at this version.
dateReleased
string
An ISO 8601 datetime indicating when the release went live. Defaults to the current time if omitted.
refs
array
An array of repository references. Use this to tell Sentry which commits are included in this release by specifying the HEAD commit of each repository. Sentry will automatically resolve the commit range since the previous release.
commits
array
An explicit list of commit objects. Use this when you want to send commit metadata directly rather than using a repository integration.

Example request

curl -X POST https://sentry.io/api/0/organizations/my-org/releases/ \
  -H "Authorization: Bearer sntrys_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "version": "1.0.0",
    "refs": [{"repository": "my-org/my-repo", "commit": "abc123"}],
    "projects": ["my-project"]
  }'

Example response

{
  "id": 2,
  "version": "1.0.0",
  "shortVersion": "1.0.0",
  "ref": null,
  "url": null,
  "dateCreated": "2019-01-03T00:12:55.109Z",
  "dateReleased": null,
  "commitCount": 0,
  "deployCount": 0,
  "newGroups": 0,
  "firstEvent": null,
  "lastEvent": null,
  "lastCommit": null,
  "lastDeploy": null,
  "authors": [],
  "projects": [
    { "name": "My Project", "slug": "my-project" }
  ]
}

List commits for a release

GET /api/0/organizations/{organization_id_or_slug}/releases/{version}/commits/
Returns the commits associated with a release. Required scope: project:releases

Path parameters

version
string
required
The release version identifier.

Example request

curl "https://sentry.io/api/0/organizations/my-org/releases/1.0.0/commits/" \
  -H "Authorization: Bearer sntrys_TOKEN"

List files for a release

GET /api/0/organizations/{organization_id_or_slug}/releases/{version}/files/
Returns the source map and other files uploaded for a release. Required scope: project:releases

Example request

curl "https://sentry.io/api/0/organizations/my-org/releases/1.0.0/files/" \
  -H "Authorization: Bearer sntrys_TOKEN"
To upload source maps, use the Sentry CLI (sentry-cli releases files upload-sourcemaps) rather than the API directly. The CLI handles chunked uploads and source map processing automatically.