Create a New Release for an Organization

POST /api/0/organizations/{organization_slug}/releases/

Path Parameters:
  • organization_slug (string) — the slug of the organization the release belongs to.
Parameters:
  • version (string) — a version identifier for this release. Can be a version number, a commit hash etc.
  • ref (string) — an optional commit reference. This is useful if a tagged version has been provided.
  • url (url) — a URL that points to the release. This can be the path to an online interface to the sourcecode for instance.
  • projects (array) — a list of project slugs that are involved in this release
  • dateReleased (datetime) — an optional date that indicates when the release went live. If not provided the current time is assumed.
  • commits (array) — an optional list of commit data to be associated with the release. Commits must include parameters `id` (the sha of the commit), and can optionally include `repository`, `message`, `patch_set`, `author_name`, `author_email`, and `timestamp`. See [release without integration example](/workflow/releases/).
  • refs (array) — an optional way to indicate the start and end commits for each repository included in a release. Head commits must include parameters `repository` and `commit` (the HEAD sha). They can optionally include `previousCommit` (the sha of the HEAD of the previous release), which should be specified if this is the first time you've sent commit data. `commit` may contain a range in the form of `previousCommit..commit`
Authentication:required
Method:POST
Path:/api/0/organizations/{organization_slug}/releases/

Example Request

POST /api/0/organizations/the-interstellar-jurisdiction/releases/ HTTP/1.1
Host: sentry.io
Authorization: Bearer <token>
Content-Type: application/json

{
  "projects": [
    "pump-station"
  ], 
  "ref": "6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb", 
  "version": "2.0rc2"
}

Example Response

HTTP/1.1 201 CREATED
Content-Length: 413
X-XSS-Protection: 1; mode=block
Content-Language: en
X-Content-Type-Options: nosniff
Vary: Accept-Language, Cookie
Allow: GET, POST, HEAD, OPTIONS
X-Frame-Options: deny
Content-Type: application/json

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