Skip to content
Last updated

Modify thread properties including metadata, title, and visibility settings. Industry-standard compatible with Freddy enhancements.

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

Modify thread properties including metadata, title, assistant binding, and visibility settings. Uses partial updates - only provided fields are modified. Only the thread creator can update it.

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.

title string optional

Display name for the thread. Maximum 200 characters. Full replacement of existing title.

assistant_id string optional

ID of the assistant to bind to this thread. Note: Cannot be changed once the thread has messages. The assistant binding is locked after the first message to ensure conversation consistency.

visible_in_ui boolean optional

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

Returns

Returns a JSON response indicating success or failure.

Bash
curl -X PATCH "https://api.aitronos.com/v1/threads/thrd_abc123" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Thread Title"
  }'

Response:

{
  "id": "thrd_abc123",
  "object": "thread",
  "created_at": "2025-11-17T10:00:00Z",
  "updated_at": "2025-11-17T11:30:00Z",
  "last_message_at": "2025-11-17T10:05:00Z",
  "metadata": {
    "user_id": "user_abc",
    "source": "docs",
    "priority": "low",
    "status": "resolved"
  },
  "assistant_id": "asst_abc123",
  "organization_id": "org_12345",
  "user_id": "usr_abc123",
  "title": "Updated Thread Title",
  "status": "inactive",
  "message_count": 5,
  "visible_in_ui": true,
  "last_model_used": "gpt-4o",
  "is_pinned": false,
  "pinned_at": null,
  "space_ids": ["space_abc123"]
}