Deployments.ai Docs
Evaluations

Annotate a trace

POST /v1/traces/{traceId}/annotations · SDK createTraceAnnotation · CLI deployments eval annotation create

POST
/v1/traces/{traceId}/annotations

Requires observability:write.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

traceId*string

W3C trace ID (32 lowercase hex characters).

Match^[a-f0-9]{32}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
body*string
Length1 <= length <= 4000
label?string
Length1 <= length <= 64
runId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
spanId?string
Match^[a-f0-9]{16}$
tags?array<>
Items0 <= items <= 10

Response Body

AnnotationResponse

application/json
  1. response
authorPrincipalId*string
body*string
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
label?string
runId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
spanId?string
Match^[a-f0-9]{16}$
tags*array<string>
traceId*string
Match^[a-f0-9]{32}$
curl -X POST "https://example.com/v1/traces/string/annotations" \  -H "x-deployments-organization: string" \  -H "x-deployments-project: string" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "body": "string"  }'
{  "authorPrincipalId": "string",  "body": "string",  "createdAt": "2019-08-24T14:15:22Z",  "id": "string",  "label": "string",  "runId": "string",  "spanId": "string",  "tags": [    "string"  ],  "traceId": "string"}