Skip to main content
PATCH
/
spans
/
{span_id}
cURL
curl --request PATCH \
  --url https://api.opper.ai/v2/spans/{span_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "my span",
  "start_time": "2026-04-07T13:33:27.179710Z",
  "type": "email_tool",
  "end_time": "2026-04-07T13:33:27.179772Z",
  "input": "Hello, world!",
  "output": "Hello, world!",
  "error": "Exception: This is an error message",
  "meta": {
    "key": "value"
  },
  "score": 10
}
'
{
  "name": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "start_time": "2024-03-20T10:00:00+00:00",
  "trace_id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "email_tool",
  "end_time": "2024-03-20T10:00:10+00:00",
  "input": "Hello, world!",
  "output": "Hello, world!",
  "error": "Exception: This is an error message",
  "meta": {
    "key": "value"
  },
  "score": 10
}

Authorizations

Authorization
string
header
required

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

Path Parameters

span_id
string<uuid>
required

The ID of the span to update

Body

application/json

The span to update

name
string | null

The name of the span, something descriptive about the span that will be used to identify it when querying

Example:

"my span"

start_time
string<date-time> | null

The start time of the span in UTC

Example:

"2026-04-07T13:33:27.179710Z"

type
string | null

The type of the span

Example:

"email_tool"

end_time
string<date-time> | null

The end time of the span in UTC

Example:

"2026-04-07T13:33:27.179772Z"

input
string | null

The input of the span

Example:

"Hello, world!"

output
string | null

The output of the span

Example:

"Hello, world!"

error
string | null

In case of an error, the error message

Example:

"Exception: This is an error message"

meta
Meta · object

The meta data of the span

Example:
{ "key": "value" }
score
integer | null

The score of the span

Example:

10

Response

Successful Response

name
string
required

The name of the span, something descriptive about the span that will be used to identify it when querying

Example:

"my span"

id
string<uuid>
required
start_time
string<date-time> | null

The start time of the span in UTC

Example:

"2024-03-20T10:00:00+00:00"

trace_id
string<uuid> | null

The id of the trace

Example:

"123e4567-e89b-12d3-a456-426614174000"

parent_id
string<uuid> | null

The id of the parent span

Example:

"123e4567-e89b-12d3-a456-426614174000"

type
string | null

The type of the span

Example:

"email_tool"

end_time
string<date-time> | null

The end time of the span in UTC

Example:

"2024-03-20T10:00:10+00:00"

input
any | null

The input of the span

Example:

"Hello, world!"

output
any | null

The output of the span

Example:

"Hello, world!"

error
string | null

In case of an error, the error message

Example:

"Exception: This is an error message"

meta
Meta · object

The metadata of the span

Example:
{ "key": "value" }
score
integer | null

The score of the span

Example:

10