For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • POSTAdd span comment
        • PUTAdd span feedback score
        • POSTCreate spans
        • PATCHBatch update spans
        • GETGet spans by project_name or project_id and optionally by trace_id and/or type
        • POSTCreate span
        • GETGet span by id
        • DELDelete span by id
        • PATCHUpdate span by id
        • POSTDelete span comments
        • POSTDelete span feedback score
        • GETFind Feedback Score names
        • GETGet span comment
        • GETGet span stats
        • PUTBatch feedback scoring for spans
        • POSTSearch spans
        • PATCHUpdate span comment by id
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferenceSpans

Update span by id

PATCH
/v1/private/spans/:id
PATCH
/api/v1/private/spans/:id
$curl -X PATCH http://localhost:5173/api/v1/private/spans/id \
> -H "Content-Type: application/json" \
> -d '{
> "trace_id": "string"
>}'
Update span by id
Was this page helpful?
Previous

Delete span comments

Next
Built with

Path parameters

idstringRequiredformat: "uuid"

Request

This endpoint expects an object.
trace_idstringRequiredformat: "uuid"
project_namestringOptionalformat: "(?s)^\s*(\S.*\S|\S)\s*$"

If null and project_id not specified, Default Project is assumed

project_idstringOptionalformat: "uuid"

If null and project_name not specified, Default Project is assumed

parent_span_idstringOptionalformat: "uuid"
namestringOptional
typeenumOptional
Allowed values:
end_timedatetimeOptional
inputmap from strings to any or list of objects or stringOptional
outputmap from strings to any or list of objects or stringOptional
metadatamap from strings to any or list of objects or stringOptional
modelstringOptional
providerstringOptional
tagslist of stringsOptional
Tags
tags_to_addlist of stringsOptional
Tags to add
tags_to_removelist of stringsOptional
Tags to remove
usagemap from strings to integersOptional
total_estimated_costdoubleOptional>=0
error_infoobjectOptional
ttftdoubleOptional
sourceenumOptional
Allowed values:
environmentstringOptional0-150 characters

Errors

404
Not Found Error