Skip to main content
PATCH
/
api
/
threads
/
{threadId}
curl -X PATCH https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000 \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "title": "Updated Title",
      "customField": "value"
    }
  }'
{
  "success": true,
  "metadata": {
    "title": "Updated Title",
    "customField": "value"
  }
}
Updates the metadata for an existing thread. Metadata is merged with existing values.
threadId
string
required
The unique thread identifier (UUID)
metadata
object
required
The metadata object to merge with existing metadata
success
boolean
required
Whether the update was successful
metadata
object
required
The updated metadata object
curl -X PATCH https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000 \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "title": "Updated Title",
      "customField": "value"
    }
  }'
{
  "success": true,
  "metadata": {
    "title": "Updated Title",
    "customField": "value"
  }
}