Skip to main content
Sourcemaps are used to get the original line and column number from a backtrace pointing to a minified or transpiled file. We recommend using public sourcemaps whenever possible. Builds that produce lots of sourcemaps can take a long time to upload via our private sourcemap endpoint. This API provides an easy way to upload private sourcemaps for use with frontend errors.
Private sourcemaps will not be used to resolve Node.js backtraces.Follow the Node.js installation instructions to configure your application to emit sourcemapped backtraces.

Create sourcemap

This endpoint enables the creation of private sourcemaps. This endpoint accepts both organization-level and app-level Push API keys, not a REST API (V1) personal API token. An app-level Push API key identifies the app directly. If you supply an environment with that key, use the app’s existing environment.

Matching sourcemaps

We will match the values for the name[] fields against the full backtrace URL, without the line number, column number, or URL fragment. For example, the following backtrace line:
Shell
Will match with the name: https://test.local/main.abc123.js. If you set matchBacktracePaths, use the rewritten path as the name. See AppSignal for JavaScript with React Native and Expo for an example. You can add multiple name’s in one curl request:
Note that you can only upload one sourcemap file at a time, so if you have multiple sourcemap files, you will have to send an upload request for each file separately. The maximum upload size allowed for a sourcemap file is 100MB.

Parameters

All parameters, except for file can be sent either in the POST body or as GET parameters. All parameters are required, except app_name and environment when you use an app-level Push API key.

Responses

  • The API will return a 201 HTTP status code if successful. The sourcemap is queued for processing, and the response body is empty.
  • The API will return a 400 HTTP status code with a JSON response when a validation error has occurred, such as a missing name, revision, or file, or a sourcemap that is empty or not valid JSON.
  • The API will return a 401 HTTP status code if the app details could not be validated, such as an environment that another app already uses.
  • The API will return a 404 HTTP status code if the Push API key does not belong to an active app or organization.
400 response body example:

Example