Create a New Release for an Organization
Create a new release for the given organization. Releases are used by Sentry to improve error reporting by correlating first-seen events with the release that may have introduced them, and are required for source maps and other debug features.
Release versions that are the same across multiple projects within an organization are treated as the same release in Sentry.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Body Parameters
version(string)REQUIREDA version identifier for this release. Can be a version number, a commit hash, and so on.
projects(array(undefined))REQUIREDA list of project slugs that are involved in this release.
ref(string)An optional commit reference. This is useful if a tagged version has been provided.
url(string)A URL that points to the release. For instance, this can be the path to an online interface to the source code, such as a GitHub URL.
dateReleased(string)An optional date that indicates when the release went live. If not provided the current time is used.
commits(array(object))An optional list of commit data to be associated.
status(string)The status of the release. Can be
openorarchived.owner(string)The username of the user to set as the release owner.
headCommits(array(object))(Deprecated) Use
refsinstead. An optional list of head commits to associate with the release, one per repository.refs(array(object))An optional list of commit references, one per repository, used to associate commits with the release.
Scopes
<auth_token> requires one of the following scopes:org:ciproject:adminproject:releasesproject:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/releases/ \ -H 'Authorization: Bearer <auth_token>' \ -H 'Content-Type: application/json' \ -d '{}'
Copied{ "id": 1, "version": "frontend@1.0.0", "shortVersion": "frontend@1.0.0", "status": "open", "versionInfo": { "package": "frontend", "version": { "raw": "1.0.0", "major": 1, "minor": 0, "patch": 0, "pre": null, "buildCode": null, "components": 3 }, "description": "1.0.0", "buildHash": null }, "ref": null, "url": null, "dateReleased": null, "dateCreated": "2024-01-01T00:00:00Z", "data": {}, "newGroups": 0, "owner": null, "commitCount": 0, "lastCommit": null, "deployCount": 0, "lastDeploy": null, "authors": [], "projects": [ { "id": 1, "slug": "sentry", "name": "sentry", "newGroups": 0, "platform": "javascript", "platforms": [ "javascript" ], "hasHealthData": false } ], "firstEvent": null, "lastEvent": null, "currentProjectMeta": {}, "userAgent": null }