Skip to main content
POST
/
v1
/
traces
Ingest Traces
curl --request POST \
  --url https://api.agentmark.co/v1/traces \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'X-Agentmark-App-Id: <x-agentmark-app-id>' \
  --data '
{
  "resourceSpans": [
    {
      "resource": {
        "attributes": [
          {
            "key": "service.name",
            "value": {
              "stringValue": "my-ai-app"
            }
          }
        ]
      },
      "scopeSpans": [
        {
          "spans": [
            {
              "traceId": "abc123",
              "spanId": "span456",
              "name": "chat-completion",
              "kind": 3,
              "startTimeUnixNano": "1712764245000000000",
              "endTimeUnixNano": "1712764246000000000",
              "status": {
                "code": 1
              }
            }
          ]
        }
      ]
    }
  ]
}
'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Your AgentMark API key. Create one in the dashboard under Settings > API Keys.

Example: Authorization: Bearer am_live_abc123

Headers

X-Agentmark-App-Id
string
required

Your application ID. Found in the dashboard under Settings > General.

Example:

"app_abc123"

Content-Encoding
enum<string>

Set to gzip if the request body is gzip-compressed.

Available options:
gzip
X-Request-Id
string<uuid>

Optional request ID for idempotency tracking. Generated automatically if not provided.

Body

application/json
resourceSpans
object[]
required

Array of OTLP ResourceSpans objects.

Response

Request processed (empty payload or direct path).

success
boolean
Example:

true