Skip to main content
POST
/
sourcemap
/
stack
/
enrich
Enrich a stack trace
curl --request POST \
  --url 'https://api.flashcat.cloud/sourcemap/stack/enrich?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "browser",
  "service": "my-web-app",
  "version": "1.0.0",
  "stack": "TypeError: Cannot read properties of undefined\n    at render (https://cdn.example.com/app.min.js:1:2345)",
  "near": 3
}
'
{
  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
  "data": {
    "frames": [
      {
        "function": "renderCheckout",
        "file": "src/pages/checkout.tsx",
        "line": 42,
        "column": 17,
        "converted": true,
        "code_snippets": [
          {
            "line": 41,
            "code": "const cart = props.cart;"
          },
          {
            "line": 42,
            "code": "return cart.items.map(renderItem);"
          }
        ],
        "original_frame": {
          "function": "render",
          "file": "https://cdn.example.com/app.min.js",
          "line": 1,
          "column": 2345
        }
      }
    ]
  }
}

Restrictions

AspectValue
Rate limits1,000 requests/minute; 50 requests/second per account
PermissionsNone — any valid app_key can call this operation

Usage

  • type defaults to browser when omitted for backward compatibility.
  • Set near from 1 to 20 to include source-code snippets around converted frames.
  • For Android NDK native crashes, provide arch and source_type: ndk so the backend routes to native symbolication.
  • For iOS crash stacks, pass binary_images so addresses can be relocated against the uploaded dSYM files.
  • no_cache is intended for debugging and bypasses cached enrich results.

Authorizations

app_key
string
query
required

App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json

Stack trace enrichment request.

service
string
required

Application or service name used when the sourcemap was uploaded.

version
string
required

Application version used when the sourcemap was uploaded.

type
enum<string>

Source platform. Defaults to browser when omitted.

Available options:
browser,
android,
ios,
miniprogram,
harmony
stack
string

Raw stack trace to parse and enrich.

near
integer

Number of nearby meaningful source lines to return around converted frames.

Required range: 1 <= x <= 20
no_cache
boolean

Skip cached enrich results. Intended for debugging.

build_id
string

Android build ID for Gradle plugin 1.13.0 and later.

variant
string

Android build variant used by older Gradle plugin versions.

arch
string

Android NDK architecture such as arm, arm64, x86, or x64.

source_type
string

Android error source type. Use ndk with arch for native symbolication.

binary_images
object[]

Loaded binary images from an iOS crash report.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
required

Enriched stack frames.