Skip to content
Last updated

Update thread metadata with partial merge support and visibility controls. NEW endpoint for enhanced thread management.

PATCHhttps://api.aitronos.com/v1/threads/{thread_id}/metadata

Update thread metadata with partial merge support and visibility controls. This is a new endpoint that provides enhanced thread management capabilities beyond the standard update endpoint.

Path Parameters

thread_id string required

The unique identifier of the thread to update.

Request Body

metadata object optional

Custom key-value pairs for thread metadata. Performs partial update - merges with existing metadata. Maximum 16 key-value pairs.

visibleInUi boolean optional

Whether this thread should be visible in the user interface. Requires Bearer token authentication.

Bash
curl -X PATCH "https://api.aitronos.com/v1/threads/thread_abc123/metadata" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "customerId": "cust_123",
      "priority": "high"
    }
  }'

Response:

{
  "id": "thread_abc123",
  "metadata": {
    "userId": "user_abc",
    "source": "docs",
    "customerId": "cust_123",
    "priority": "high"
  },
  "visibleInUi": false,
  "updated_at": "2025-11-17T11:45:00Z"
}