---
title: "Upload a source map for a release."
method: POST
path: "/projects/{project_id}/releases/{release}/source-maps"
tags: ["source-maps"]
---

# Upload a source map for a release.

`POST /projects/{project_id}/releases/{release}/source-maps`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/releases/{release}/source-maps`
- Auth: HTTP bearer

Accepts a multipart form with:
- `file`: The .map file (required)
- `file_path`: The URL path of the minified file as it appears in stack traces (required).
  Uses the ~ prefix convention (e.g., "~/assets/main.js").
  If a full URL is provided, it will be normalized automatically.
- `dist`: Optional distribution identifier

If a source map already exists for the same (project, release, file_path), it is replaced.

## Path parameters

- `project_id` integer, required
- `release` string, required

## Request body `multipart/form-data`

- SourceMapUploadForm
  - `dist` string, nullable
  - `file` string, binary, required
  - `file_path` string, required

## Response `201`

Source map uploaded

- SourceMapResponse
  - `checksum` string, nullable
  - `created_at` string, required
  - `debug_id` string, nullable
  - `dist` string, nullable
  - `file_path` string, required
  - `id` integer, required
  - `project_id` integer, required
  - `release` string, required
  - `size_bytes` integer, required

## Other responses

- `400`: Invalid source map or missing fields
- `401`: Unauthorized
- `403`: Insufficient permissions
- `413`: Source map too large

## Changes

- **2026-10-21** `bf4d047d0bb8`: 1 breaking, 1 info
  - added required request body
  - added the optional property `debug_id` to the response with the `201` status
- **2026-10-21** `79089e9f49ee`: 1 breaking, 1 warning
  - removed the request body
  - removed the optional property `debug_id` from the response with the `201` status
- **2026-10-21** `24add76f6317`: 1 breaking, 1 info
  - added required request body
  - added the optional property `debug_id` to the response with the `201` status
- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/releases/:release/source-maps/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
