Skip to main content
POST
/
sourcemaps
curl -X POST "https://kodostatus.com/api/v1/sourcemaps" \
  -H "X-API-Key: your_api_key" \
  -F "file=@dist/app.min.js.map" \
  -F "url=https://example.com/assets/app.min.js" \
  -F "release=1.2.3" \
  -F "service_id=svc_abc123"
{
  "success": true,
  "sourcemap": {
    "id": "sm_abc123",
    "url": "https://example.com/assets/app.min.js",
    "release": "1.2.3",
    "size_bytes": 245678,
    "uploaded_at": "2024-01-15T10:00:00Z"
  }
}
Source map uploads are available on Pro and Team plans.
Source maps allow Kodo to translate minified JavaScript stack traces into readable source code with original file names, line numbers, and column positions.

Request

This endpoint accepts multipart/form-data for file uploads.
file
file
required
The source map file (.map)
url
string
required
The URL of the minified JavaScript file this map corresponds to (e.g., “https://example.com/assets/app.min.js”)
release
string
required
Release version this source map belongs to
service_id
string
required
Service ID

Response

Returns upload confirmation.
curl -X POST "https://kodostatus.com/api/v1/sourcemaps" \
  -H "X-API-Key: your_api_key" \
  -F "file=@dist/app.min.js.map" \
  -F "url=https://example.com/assets/app.min.js" \
  -F "release=1.2.3" \
  -F "service_id=svc_abc123"
{
  "success": true,
  "sourcemap": {
    "id": "sm_abc123",
    "url": "https://example.com/assets/app.min.js",
    "release": "1.2.3",
    "size_bytes": 245678,
    "uploaded_at": "2024-01-15T10:00:00Z"
  }
}

Build Tool Integration

Webpack

webpack.config.js
const KodoSourceMapPlugin = require('@kodo/webpack-plugin');

module.exports = {
  devtool: 'source-map',
  plugins: [
    new KodoSourceMapPlugin({
      apiKey: process.env.KODO_API_KEY,
      serviceId: 'svc_abc123',
      release: process.env.VERSION
    })
  ]
};

Vite

vite.config.js
import { kodoSourcemaps } from '@kodo/vite-plugin';

export default {
  build: { sourcemap: true },
  plugins: [
    kodoSourcemaps({
      apiKey: process.env.KODO_API_KEY,
      serviceId: 'svc_abc123',
      release: process.env.VERSION
    })
  ]
};
Source maps should not be served publicly as they expose your original source code. Upload them to Kodo and remove them from your production deployment.