Update thread metadata with partial merge support and visibility controls. NEW endpoint for enhanced thread management.
PATCHhttps://api.aitronos.com/v1/threads/{thread_id}
Update thread metadata with partial merge support and visibility controls.
thread_id string required
The unique identifier of the thread to update.
metadata object optional
Custom key-value pairs for thread metadata. Performs partial update - merges with existing metadata. Maximum 16 key-value pairs.
visible_in_ui boolean optional
Whether this thread should be visible in the user interface. Requires Bearer token authentication.
title string optional
Display title for the thread.
assistant_id string optional
Change the assistant associated with this thread.
Returns a JSON response indicating success or failure.
Bash
- Bash
- Python
- Python
- JavaScript
curl -X PATCH "https://api.aitronos.com/v1/threads/thrd_abc123" \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"customer_id": "cust_123",
"priority": "high"
}
}'Response:
{
"id": "thrd_abc123",
"object": "thread",
"created_at": "2025-11-17T10:00:00Z",
"updated_at": "2025-11-17T11:45:00Z",
"last_message_at": "2025-11-17T10:05:00Z",
"metadata": {
"user_id": "user_abc",
"source": "docs",
"customer_id": "cust_123",
"priority": "high"
},
"assistant_id": "asst_abc123",
"organization_id": "org_12345",
"user_id": "usr_abc123",
"title": "Aitronos Inquiry",
"status": "inactive",
"message_count": 5,
"visible_in_ui": false,
"last_model_used": "gpt-4o",
"is_pinned": false,
"pinned_at": null,
"space_ids": []
}