Skip to main content
Releases let Sentry correlate errors with specific versions of your application. By tracking releases you can identify which version introduced a bug, which release resolved it, and how many new issues appeared in each deploy.

List releases for an organization

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

Path parameters

organization_id_or_slug
string
required
The ID or slug of the organization.

Query parameters

query
string
Filters releases to those whose version string starts with the given 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 <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,
    "lastCommit": null,
    "lastDeploy": null,
    "authors": [],
    "projects": [
      { "name": "Pump Station", "slug": "pump-station" }
    ],
    "data": {}
  }
]

Response fields

id
integer
The internal ID of the release.
version
string
The release version string (commit hash, semver, etc.).
shortVersion
string
A shortened version of the version string for display purposes.
ref
string | null
An optional commit reference (e.g. a branch name or tag).
url
string | null
An optional URL pointing to the release (e.g. a changelog or CI build).
dateCreated
string
ISO 8601 timestamp of when the release was created in Sentry.
dateReleased
string | null
ISO 8601 timestamp of when the release went live, if provided.
commitCount
integer
Number of commits associated with this release.
deployCount
integer
Number of deploys for this release.
newGroups
integer
Number of new issues first seen in this release.
lastDeploy
object | null
Details of the most recent deploy for this release.
projects
array
A list of projects associated with this release.

Create a release

POST /api/0/organizations/{organization_id_or_slug}/releases/
Creates a new release for the organization. Releases are used by Sentry to correlate first-seen events with the version that introduced them, and are required for source map uploads and commit-based features. Required scope: project:releases

Path parameters

organization_id_or_slug
string
required
The ID or slug of the organization.

Request body

version
string
required
A version identifier such as a commit hash, semver string, or custom version.
projects
array
required
A list of project slugs that this release is associated with.
ref
string
An optional commit reference (e.g. a branch name or tag).
url
string
An optional URL for the release (e.g. a CI build or changelog).
dateReleased
string
ISO 8601 timestamp of when the release went live. Defaults to the current time.
commits
array
An optional list of commit objects to associate with the release. Each commit may include id (required), repository, message, author_name, author_email, timestamp, and patch_set.
refs
array
An optional list of repository refs. Each ref requires repository and commit, and optionally previousCommit.

Example request

curl -X POST https://sentry.io/api/0/organizations/my-org/releases/ \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "version": "2.0rc2",
    "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
    "projects": ["pump-station"]
  }'

Example response

{
  "id": 2,
  "version": "2.0rc2",
  "shortVersion": "2.0rc2",
  "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb",
  "url": null,
  "dateCreated": "2019-01-03T00:12:55.109Z",
  "dateReleased": null,
  "newGroups": 0,
  "commitCount": 0,
  "deployCount": 0,
  "projects": [
    { "name": "Pump Station", "slug": "pump-station" }
  ]
}

Create a deploy

POST /api/0/organizations/{organization_id_or_slug}/releases/{version}/deploys/
Records a deploy for a release. A deploy represents an instance of a release being made available in a specific environment. Required scope: project:releases

Path parameters

organization_id_or_slug
string
required
The ID or slug of the organization.
version
string
required
The version string of the release to deploy.

Request body

environment
string
required
The environment being deployed to (e.g. production, staging).
name
string
An optional name for the deploy (e.g. a deployment pipeline name).
url
string
An optional URL that points to the deploy output.
dateStarted
string
ISO 8601 timestamp of when the deploy started.
dateFinished
string
ISO 8601 timestamp of when the deploy finished.

Example request

curl -X POST https://sentry.io/api/0/organizations/my-org/releases/2.0rc2/deploys/ \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"environment": "production", "name": "Deploy #42"}'

Example response

{
  "id": "6883490",
  "name": "Deploy #42",
  "url": null,
  "environment": "production",
  "dateStarted": null,
  "dateFinished": "2019-01-03T00:12:55.109Z"
}

Build docs developers (and LLMs) love