---
title: Upload source maps
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > RUM
---

# Upload source maps{% #upload-source-maps %}

{% tab title="v2" %}
This endpoint is in Preview and may introduce breaking changes. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                  |
| ----------------- | ------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://sourcemap-intake.ap1.datadoghq.com/api/v2/srcmap |
| ap2.datadoghq.com | POST https://sourcemap-intake.ap2.datadoghq.com/api/v2/srcmap |
| app.datadoghq.eu  | POST https://sourcemap-intake.datadoghq.eu/api/v2/srcmap      |
| app.ddog-gov.com  | POST https://sourcemap-intake.ddog-gov.com/api/v2/srcmap      |
| app.datadoghq.com | POST https://sourcemap-intake.datadoghq.com/api/v2/srcmap     |
| us3.datadoghq.com | POST https://sourcemap-intake.us3.datadoghq.com/api/v2/srcmap |
| us5.datadoghq.com | POST https://sourcemap-intake.us5.datadoghq.com/api/v2/srcmap |
| us2.ddog-gov.com  | POST Not supported in the GOV2 region                         |

### Overview



Upload source maps, symbol files, and mapping files to Datadog for error deobfuscation. This endpoint enables you to upload various types of debug symbols for RUM Error Tracking, allowing Datadog to display readable stack traces instead of minified or obfuscated code.

**Request format:**

Each request is a `multipart/form-data` upload containing two parts:

1. `event` — a JSON-encoded string with the upload metadata (type, service, version, etc.)
1. One or more binary file fields (for example, `source_map`, `symbols_archive`)

**Supported upload types** (set via `event.type`):

- `js_sourcemap`: JavaScript source maps for browser applications
- `react_native_sourcemap`: React Native source maps for mobile applications
- `jvm_mapping_file`: ProGuard/R8 mapping files for Android crash deobfuscation
- `ios_symbols`: dSYM files for iOS crash symbolication
- `flutter_symbol_file`: Flutter symbol files
- `ndk_symbol_file`: Android NDK symbol files for native crashes
- `il2cpp_mapping_file`: IL2CPP mapping files for Unity
- `elf_symbol_file`: ELF symbol files for Linux/Unix
- `pe_symbol_file`: PE/PDB symbol files for Windows
- `repository`: Repository metadata for source code linking

**Limits:**

- Maximum file size: 500 MB

**Note:** For most use cases, Datadog recommends using the [Datadog CLI (datadog-ci)](https://github.com/DataDog/datadog-ci/tree/master/src/commands/sourcemaps) which provides a simplified interface for uploading source maps.



### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                                 | Type    | Description                                                                                     |
| ------------ | ------------------------------------- | ------- | ----------------------------------------------------------------------------------------------- |
|              | Option 1                              | object  | Multipart form data for uploading JavaScript source maps for browser RUM applications.          |
| Option 1     | event [*required*]               | object  | Metadata for a JavaScript source map upload, sent as a JSON-encoded `event` field.              |
| event        | cli_version                           | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | git_commit_sha                        | string  | Git commit SHA (40 lowercase hex characters).                                                   |
| event        | git_repository_url                    | string  | Git repository URL (max 2048 characters).                                                       |
| event        | minified_url [*required*]        | string  | URL of the minified JavaScript file (1-2048 characters).                                        |
| event        | overwrite                             | boolean | Whether to overwrite existing source map.                                                       |
| event        | project_path                          | string  | Path to the project root (max 500 characters).                                                  |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `js_sourcemap`. Allowed enum values: `js_sourcemap`                                     |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 1     | minified_file [*required*]       | binary  | The minified JavaScript file.                                                                   |
| Option 1     | repository                            | binary  | Repository metadata file (optional).                                                            |
| Option 1     | source_map [*required*]          | binary  | The source map file.                                                                            |
|              | Option 2                              | object  | Multipart form data for uploading React Native source maps for mobile applications.             |
| Option 2     | event [*required*]               | object  | Metadata for a React Native source map upload, sent as a JSON-encoded `event` field.            |
| event        | build_number                          | string  | Build number (max 200 characters).                                                              |
| event        | bundle_name [*required*]         | string  | Name of the JavaScript bundle (1-200 characters).                                               |
| event        | bundle_version                        | string  | Bundle version (max 200 characters).                                                            |
| event        | cli_version                           | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | debug_id                              | string  | Debug identifier for the source map file.                                                       |
| event        | platform [*required*]            | enum    | Target platform for mobile source maps. Allowed enum values: `android,ios`                      |
| event        | project_path                          | string  | Path to the project root (max 500 characters).                                                  |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `react_native_sourcemap`. Allowed enum values: `react_native_sourcemap`                 |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 2     | minified_file                         | binary  | The minified JavaScript bundle (optional).                                                      |
| Option 2     | repository                            | binary  | Repository metadata file (optional).                                                            |
| Option 2     | source_map [*required*]          | binary  | The source map file.                                                                            |
|              | Option 3                              | object  | Multipart form data for uploading ProGuard or R8 mapping files for Android crash deobfuscation. |
| Option 3     | event [*required*]               | object  | Metadata for a ProGuard or R8 mapping file upload, sent as a JSON-encoded `event` field.        |
| event        | build_id                              | string  | Build identifier for the mapping file.                                                          |
| event        | overwrite                             | boolean | Whether to overwrite existing mapping file.                                                     |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `jvm_mapping_file`. Allowed enum values: `jvm_mapping_file`                             |
| event        | variant                               | string  | Build variant (max 200 characters).                                                             |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 3     | jvm_mapping_file [*required*]    | binary  | The ProGuard/R8 mapping file.                                                                   |
| Option 3     | repository                            | binary  | Repository metadata file (optional).                                                            |
|              | Option 4                              | object  | Multipart form data for uploading dSYM files for iOS crash symbolication.                       |
| Option 4     | event [*required*]               | object  | Metadata for an iOS dSYM file upload, sent as a JSON-encoded `event` field.                     |
| event        | type [*required*]                | enum    | Must be `ios_symbols`. Allowed enum values: `ios_symbols`                                       |
| event        | uuids [*required*]               | string  | Comma-separated list of dSYM UUIDs (min 1 character).                                           |
| Option 4     | symbols_archive [*required*]     | binary  | The dSYM archive file (.zip).                                                                   |
|              | Option 5                              | object  | Multipart form data for uploading Flutter symbol files for crash symbolication.                 |
| Option 5     | event [*required*]               | object  | Metadata for a Flutter symbol file upload, sent as a JSON-encoded `event` field.                |
| event        | arch [*required*]                | string  | CPU architecture (1-200 characters).                                                            |
| event        | cli_version                           | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | platform [*required*]            | string  | Target platform (1-200 characters).                                                             |
| event        | service [*required*]             | string  | Service name (1-200 characters).                                                                |
| event        | type [*required*]                | enum    | Must be `flutter_symbol_file`. Allowed enum values: `flutter_symbol_file`                       |
| event        | variant [*required*]             | string  | Build variant (1-200 characters).                                                               |
| event        | version [*required*]             | string  | Version of the service (1-200 characters).                                                      |
| Option 5     | flutter_symbol_file [*required*] | binary  | The Flutter symbol file.                                                                        |
|              | Option 6                              | object  | Multipart form data for uploading Android NDK symbol files for native crash symbolication.      |
| Option 6     | event [*required*]               | object  | Metadata for an Android NDK symbol file upload, sent as a JSON-encoded `event` field.           |
| event        | arch [*required*]                | string  | CPU architecture (1-200 characters).                                                            |
| event        | build_id [*required*]            | string  | Build ID (1-200 characters).                                                                    |
| event        | filename                              | string  | Original filename (max 500 characters).                                                         |
| event        | type [*required*]                | enum    | Must be `ndk_symbol_file`. Allowed enum values: `ndk_symbol_file`                               |
| Option 6     | ndk_symbol_file [*required*]     | binary  | The NDK symbol file.                                                                            |
|              | Option 7                              | object  | Multipart form data for uploading IL2CPP mapping files for Unity crash symbolication.           |
| Option 7     | event [*required*]               | object  | Metadata for a Unity IL2CPP mapping file upload, sent as a JSON-encoded `event` field.          |
| event        | build_id [*required*]            | string  | Build ID (1-200 characters).                                                                    |
| event        | type [*required*]                | enum    | Must be `il2cpp_mapping_file`. Allowed enum values: `il2cpp_mapping_file`                       |
| Option 7     | il2cpp_mapping_file [*required*] | binary  | The IL2CPP mapping file.                                                                        |
|              | Option 8                              | object  | Multipart form data for uploading ELF symbol files for Linux/Unix crash symbolication.          |
| Option 8     | elf_symbol_file [*required*]     | binary  | The ELF symbol file.                                                                            |
| Option 8     | event [*required*]               | object  | Metadata for an ELF symbol file upload, sent as a JSON-encoded `event` field.                   |
| event        | arch                                  | string  | CPU architecture (max 200 characters).                                                          |
| event        | cli_version                           | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | file_hash                             | string  | File hash (32 hex characters, or empty).                                                        |
| event        | filename                              | string  | Original filename (max 500 characters).                                                         |
| event        | gnu_build_id                          | string  | GNU Build ID (16+ hex characters, or empty).                                                    |
| event        | go_build_id                           | string  | Go Build ID (or redacted, or empty).                                                            |
| event        | origin                                | string  | Origin identifier (max 200 characters).                                                         |
| event        | origin_version                        | string  | Origin version (max 200 characters).                                                            |
| event        | overwrite                             | boolean | Whether to overwrite existing symbol file.                                                      |
| event        | symbol_source                         | string  | Symbol source (max 200 characters).                                                             |
| event        | type [*required*]                | enum    | Must be `elf_symbol_file`. Allowed enum values: `elf_symbol_file`                               |
|              | Option 9                              | object  | Multipart form data for uploading PE/PDB symbol files for Windows crash symbolication.          |
| Option 9     | event [*required*]               | object  | Metadata for a PE/PDB symbol file upload, sent as a JSON-encoded `event` field.                 |
| event        | arch [*required*]                | string  | CPU architecture (1-200 characters).                                                            |
| event        | cli_version                           | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | filename                              | string  | Original filename (max 500 characters).                                                         |
| event        | origin                                | string  | Origin identifier (max 200 characters).                                                         |
| event        | origin_version                        | string  | Origin version (max 200 characters).                                                            |
| event        | overwrite                             | boolean | Whether to overwrite existing symbol file.                                                      |
| event        | pdb_age [*required*]             | int64   | PDB age (>= 0).                                                                                 |
| event        | pdb_sig [*required*]             | string  | PDB signature GUID.                                                                             |
| event        | type [*required*]                | enum    | Must be `pe_symbol_file`. Allowed enum values: `pe_symbol_file`                                 |
| Option 9     | pe_symbol_file [*required*]      | binary  | The PDB symbol file.                                                                            |
|              | Option 10                             | object  | Multipart form data for uploading repository metadata for source code linking.                  |
| Option 10    | event [*required*]               | object  | Metadata for a repository upload, sent as a JSON-encoded `event` field.                         |
| event        | cli_version                           | string  | Version of the CLI used for upload (max 50 characters).                                         |
| event        | git_commit_sha [*required*]      | string  | Git commit SHA (40 lowercase hex characters).                                                   |
| event        | git_repository_url [*required*]  | string  | Git repository URL (max 2048 characters).                                                       |
| event        | type [*required*]                | enum    | Must be `repository`. Allowed enum values: `repository`                                         |
| Option 10    | repository [*required*]          | binary  | Repository metadata file.                                                                       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "event": {
    "cli_version": "string",
    "git_commit_sha": "string",
    "git_repository_url": "string",
    "minified_url": "https://example.com/static/js/main.min.js",
    "overwrite": false,
    "project_path": "string",
    "service": "my-web-app",
    "type": "js_sourcemap",
    "version": "1.2.3"
  },
  "minified_file": "main.min.js",
  "repository": "string",
  "source_map": "main.min.js.map"
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response for source map upload.

| Parent field | Field | Type   | Description                                                   |
| ------------ | ----- | ------ | ------------------------------------------------------------- |
|              | data  | object | Data envelope for source map upload response.                 |
| data         | id    | string | Unique identifier for the uploaded source map.                |
| data         | type  | enum   | Type of the response. Allowed enum values: `sourcemap_upload` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "id": "sourcemap-upload-id",
    "type": "sourcemap_upload"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="202" %}
Accepted - the request has been accepted for processing.
{% tab title="Model" %}
Response for source map upload.

| Parent field | Field | Type   | Description                                                   |
| ------------ | ----- | ------ | ------------------------------------------------------------- |
|              | data  | object | Data envelope for source map upload response.                 |
| data         | id    | string | Unique identifier for the uploaded source map.                |
| data         | type  | enum   | Type of the response. Allowed enum values: `sourcemap_upload` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "id": "sourcemap-upload-id",
    "type": "sourcemap_upload"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request - Invalid request body or missing required fields.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized - Invalid or missing API key.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden - Insufficient permissions.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found - The requested resource was not found.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="408" %}
Request Timeout - The request took too long to complete.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="413" %}
Payload Too Large - File size exceeds the 500 MB limit.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too Many Requests - Rate limit exceeded.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="503" %}
Service Unavailable - The service is temporarily unavailable.
{% tab title="Model" %}
Error response for source map upload.

| Field  | Type     | Description       |
| ------ | -------- | ----------------- |
| errors | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Missing required field: service"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## JavaScript Source Map Upload
# 
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## ELF Symbol File Upload
# Upload an ELF symbol file for Linux/Unix crash symbolication.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## Flutter Symbol File Upload
# Upload a Flutter symbol file for crash symbolication.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## Unity IL2CPP Mapping File Upload
# Upload a Unity IL2CPP mapping file for crash symbolication.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## iOS dSYM Upload
# Upload a dSYM archive for iOS crash symbolication.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## JavaScript Source Map Upload
# Upload a JavaScript source map for browser RUM applications.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## ProGuard/R8 Mapping File Upload
# Upload a ProGuard or R8 mapping file for Android crash deobfuscation.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## Android NDK Symbol File Upload
# Upload an Android NDK symbol file for native crash symbolication.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## Windows PE/PDB Symbol File Upload
# Upload a PE/PDB symbol file for Windows crash symbolication.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## React Native Source Map Upload
# Upload a React Native source map for mobile applications.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 \## Repository Metadata Upload
# Upload repository metadata for source code linking.
 \# Curl command curl -X POST "https://sourcemap-intake.datadoghq.com/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}" \
 
                
{% /tab %}
