Upload source maps
https://sourcemap-intake.datadoghq.com/api/v2/srcmaphttps://sourcemap-intake.us3.datadoghq.com/api/v2/srcmaphttps://sourcemap-intake.us5.datadoghq.com/api/v2/srcmaphttps://sourcemap-intake.datadoghq.eu/api/v2/srcmaphttps://sourcemap-intake.ap1.datadoghq.com/api/v2/srcmaphttps://sourcemap-intake.ap2.datadoghq.com/api/v2/srcmapNot supported in the UK1 regionhttps://sourcemap-intake.ddog-gov.com/api/v2/srcmapNot supported in the US2-FED regionOverview
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:
event— a JSON-encoded string with the upload metadata (type, service, version, etc.)- 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 applicationsreact_native_sourcemap: React Native source maps for mobile applicationsjvm_mapping_file: ProGuard/R8 mapping files for Android crash deobfuscationios_symbols: dSYM files for iOS crash symbolicationflutter_symbol_file: Flutter symbol filesndk_symbol_file: Android NDK symbol files for native crashesil2cpp_mapping_file: IL2CPP mapping files for Unityelf_symbol_file: ELF symbol files for Linux/Unixpe_symbol_file: PE/PDB symbol files for Windowsrepository: 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) which provides a simplified interface for uploading source maps.
Request
Body Data (required)
Option 1Multipart form data for uploading JavaScript source maps for browser RUM applications.
event [required]Metadata for a JavaScript source map upload, sent as a JSON-encoded event field.
cli_versionVersion of the CLI used for upload (max 50 characters).
git_commit_shaGit commit SHA (40 lowercase hex characters).
git_repository_urlGit repository URL (max 2048 characters).
minified_url [required]URL of the minified JavaScript file (1-2048 characters).
overwriteWhether to overwrite existing source map.
falseproject_pathPath to the project root (max 500 characters).
service [required]Service name (1-200 characters).
type [required]Must be js_sourcemap.
js_sourcemapversion [required]Version of the service (1-200 characters).
minified_file [required]The minified JavaScript file.
repositoryRepository metadata file (optional).
source_map [required]The source map file.
Option 2Multipart form data for uploading React Native source maps for mobile applications.
event [required]Metadata for a React Native source map upload, sent as a JSON-encoded event field.
build_numberBuild number (max 200 characters).
bundle_name [required]Name of the JavaScript bundle (1-200 characters).
bundle_versionBundle version (max 200 characters).
cli_versionVersion of the CLI used for upload (max 50 characters).
debug_idDebug identifier for the source map file.
platform [required]Target platform for mobile source maps.
android, iosproject_pathPath to the project root (max 500 characters).
service [required]Service name (1-200 characters).
type [required]Must be react_native_sourcemap.
react_native_sourcemapversion [required]Version of the service (1-200 characters).
minified_fileThe minified JavaScript bundle (optional).
repositoryRepository metadata file (optional).
source_map [required]The source map file.
Option 3Multipart form data for uploading ProGuard or R8 mapping files for Android crash deobfuscation.
event [required]Metadata for a ProGuard or R8 mapping file upload, sent as a JSON-encoded event field.
build_idBuild identifier for the mapping file.
overwriteWhether to overwrite existing mapping file.
falseservice [required]Service name (1-200 characters).
type [required]Must be jvm_mapping_file.
jvm_mapping_filevariantBuild variant (max 200 characters).
version [required]Version of the service (1-200 characters).
jvm_mapping_file [required]The ProGuard/R8 mapping file.
repositoryRepository metadata file (optional).
Option 4Multipart form data for uploading dSYM files for iOS crash symbolication.
event [required]Metadata for an iOS dSYM file upload, sent as a JSON-encoded event field.
type [required]Must be ios_symbols.
ios_symbolsuuids [required]Comma-separated list of dSYM UUIDs (min 1 character).
symbols_archive [required]The dSYM archive file (.zip).
Option 5Multipart form data for uploading Flutter symbol files for crash symbolication.
event [required]Metadata for a Flutter symbol file upload, sent as a JSON-encoded event field.
arch [required]CPU architecture (1-200 characters).
cli_versionVersion of the CLI used for upload (max 50 characters).
platform [required]Target platform (1-200 characters).
service [required]Service name (1-200 characters).
type [required]Must be flutter_symbol_file.
flutter_symbol_filevariant [required]Build variant (1-200 characters).
version [required]Version of the service (1-200 characters).
flutter_symbol_file [required]The Flutter symbol file.
Option 6Multipart form data for uploading Android NDK symbol files for native crash symbolication.
event [required]Metadata for an Android NDK symbol file upload, sent as a JSON-encoded event field.
arch [required]CPU architecture (1-200 characters).
build_id [required]Build ID (1-200 characters).
filenameOriginal filename (max 500 characters).
type [required]Must be ndk_symbol_file.
ndk_symbol_filendk_symbol_file [required]The NDK symbol file.
Option 7Multipart form data for uploading IL2CPP mapping files for Unity crash symbolication.
event [required]Metadata for a Unity IL2CPP mapping file upload, sent as a JSON-encoded event field.
build_id [required]Build ID (1-200 characters).
type [required]Must be il2cpp_mapping_file.
il2cpp_mapping_fileil2cpp_mapping_file [required]The IL2CPP mapping file.
Option 8Multipart form data for uploading ELF symbol files for Linux/Unix crash symbolication.
elf_symbol_file [required]The ELF symbol file.
event [required]Metadata for an ELF symbol file upload, sent as a JSON-encoded event field.
archCPU architecture (max 200 characters).
cli_versionVersion of the CLI used for upload (max 50 characters).
file_hashFile hash (32 hex characters, or empty).
filenameOriginal filename (max 500 characters).
gnu_build_idGNU Build ID (16+ hex characters, or empty).
go_build_idGo Build ID (or redacted, or empty).
originOrigin identifier (max 200 characters).
origin_versionOrigin version (max 200 characters).
overwriteWhether to overwrite existing symbol file.
falsesymbol_sourceSymbol source (max 200 characters).
type [required]Must be elf_symbol_file.
elf_symbol_fileOption 9Multipart form data for uploading PE/PDB symbol files for Windows crash symbolication.
event [required]Metadata for a PE/PDB symbol file upload, sent as a JSON-encoded event field.
arch [required]CPU architecture (1-200 characters).
cli_versionVersion of the CLI used for upload (max 50 characters).
filenameOriginal filename (max 500 characters).
originOrigin identifier (max 200 characters).
origin_versionOrigin version (max 200 characters).
overwriteWhether to overwrite existing symbol file.
falsepdb_age [required]PDB age (>= 0).
pdb_sig [required]PDB signature GUID.
type [required]Must be pe_symbol_file.
pe_symbol_filepe_symbol_file [required]The PDB symbol file.
Option 10Multipart form data for uploading repository metadata for source code linking.
event [required]Metadata for a repository upload, sent as a JSON-encoded event field.
cli_versionVersion of the CLI used for upload (max 50 characters).
git_commit_sha [required]Git commit SHA (40 lowercase hex characters).
git_repository_url [required]Git repository URL (max 2048 characters).
type [required]Must be repository.
repositoryrepository [required]Repository metadata file.
Response
OK
Response for source map upload.
dataData envelope for source map upload response.
idUnique identifier for the uploaded source map.
typeType of the response.
sourcemap_upload{
"data": {
"id": "sourcemap-upload-id",
"type": "sourcemap_upload"
}
}Accepted - the request has been accepted for processing.
Response for source map upload.
dataData envelope for source map upload response.
idUnique identifier for the uploaded source map.
typeType of the response.
sourcemap_upload{
"data": {
"id": "sourcemap-upload-id",
"type": "sourcemap_upload"
}
}Bad Request - Invalid request body or missing required fields.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Unauthorized - Invalid or missing API key.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Forbidden - Insufficient permissions.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Not Found - The requested resource was not found.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Request Timeout - The request took too long to complete.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Payload Too Large - File size exceeds the 500 MB limit.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Too Many Requests - Rate limit exceeded.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Service Unavailable - The service is temporarily unavailable.
Error response for source map upload.
errorsA list of errors.
{
"errors": [
"Missing required field: service"
]
}Code Example
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://sourcemap-intake.${DD_SITE}/api/v2/srcmap" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "DD-API-KEY: ${DD_API_KEY}"