Upload a New Project Release File

POST /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/

Upload a new file for the given release.

Unlike other API requests, files must be uploaded using the traditional multipart/form-data content-type.

Requests to this endpoint should use the region-specific domain eg. us.sentry.io or de.sentry.io

The optional 'name' attribute should reflect the absolute path that this file will be referenced as. For example, in the case of JavaScript you might specify the full web URI.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization.

project_id_or_slug (string)
REQUIRED

The ID or slug of the project.

version (string)
REQUIRED

The version identifier of the release.

Body Parameters

file (string)
REQUIRED

The multipart encoded file.

name (string)

The name (full path) of the file.

dist (string)

The name of the dist.

header (string)

This parameter can be supplied multiple times to attach headers to the file. Each header is a string in the format key:value. For instance it can be used to define a content type.

Scopes

<auth_token> requires one of the following scopes:
  • project:releases
Copied
curl https://{region}.sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/ \
 -H 'Authorization: Bearer <auth_token>' \
 -H 'Content-Type: multipart/form-data' \
 -F name=/demo/hello.min.js.map \
 -F file=@hello.min.js.map
RESPONSESCHEMA
Copied
{ "dateCreated": "2018-11-06T21:20:22.894Z", "dist": null, "headers": { "Content-Type": "text/plain; encoding=utf-8" }, "id": "3", "name": "/demo/goodbye.txt", "sha1": "94d6b21e962a9fc65889617ec1f17a1e2fe11b65", "size": 15 }