---
title: "Upload a raw source file for a release (native symbolication)."
method: POST
path: "/projects/{project_id}/releases/{release}/source-files"
tags: ["source-maps"]
---

# Upload a raw source file for a release (native symbolication).

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

## 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-files`
- Auth: HTTP bearer

Accepts a multipart form with:
- `file`: the source file bytes (required)
- `file_path`: the path of the file as it appears in stack frames (required;
  derived from the uploaded filename if omitted). Normalized with the `~`
  prefix convention, matching source-map storage.

Requires the project's `error_source_context_enabled` toggle to be on.
Upserts on (project, release, file_path).

## Path parameters

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

## Response `201`

Source file uploaded

- SourceFileResponse
  - `checksum` string, nullable
  - `created_at` string, required
  - `file_path` string, required
  - `id` integer, required
  - `project_id` integer, required
  - `release` string, required
  - `size_bytes` integer, required

## Other responses

- `400`: Missing fields
- `401`: Unauthorized
- `403`: Insufficient permissions
- `409`: Source context disabled for project
- `413`: Source file too large

## Changes

- **2026-07-27** `1b060c0a4ba3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/releases/:release/source-files/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)
