Skip to main content
POST
/
traces
/
{trace_id}
/
spans
Add Spans
curl --request POST \
  --url https://api.pandaprobe.com/traces/{trace_id}/spans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "span_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
    "name": "tool-call-search",
    "kind": "TOOL",
    "status": "OK",
    "input": {
      "query": "password reset"
    },
    "output": {
      "results": [
        {
          "title": "Reset your password",
          "url": "/help/reset"
        }
      ]
    },
    "started_at": "2026-03-29T10:00:00.500Z",
    "ended_at": "2026-03-29T10:00:01.200Z"
  }
]
'
{
  "span_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trace_id
string<uuid>
required

Body

application/json
Required array length: 1 - 500 elements
name
string
required
Required string length: 1 - 512
started_at
string<date-time>
required
span_id
string<uuid>
parent_span_id
string<uuid> | null
kind
enum<string>
default:OTHER

Categorises what a span represents in an agentic workflow.

Available options:
AGENT,
TOOL,
LLM,
RETRIEVER,
CHAIN,
EMBEDDING,
OTHER
status
enum<string>
default:UNSET

Mirrors the OTel StatusCode for a span's outcome.

Available options:
UNSET,
OK,
ERROR
input
unknown
output
unknown
model
string | null
Maximum string length: 255
token_usage
Token Usage · object
metadata
Metadata · object
ended_at
string<date-time> | null
error
string | null
completion_start_time
string<date-time> | null
model_parameters
Model Parameters · object
cost
Cost · object

Response

Successful Response

Response body for successfully added spans.

span_ids
string<uuid>[]
required