cURL
curl --request POST \ --url https://api.langtail.com/v2/threads/{threadId} \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <x-api-key>' \ --data '{ "metadata": { "user_id": "user_123", "conversation_topic": "product_inquiry", "priority": "high" } }'
{ "id": "<string>", "createdAt": 123, "projectId": "<string>", "createLog": { "id": "<string>", "url": "<string>", "stream": true, "metadata": "<string>", "promptId": "<string>", "threadId": "<string>", "assistant": true, "projectId": "<string>", "requestIP": "<string>", "startedAt": "2023-11-07T05:31:56Z", "variables": "<string>", "parameters": "<string>", "promptSlug": "<string>", "doNotRecord": true, "environment": "<string>", "openAIKeyId": "<string>", "projectSlug": "<string>", "requestData": "<string>", "deploymentId": "<string>", "organizationId": "<string>", "projectAPIKeyId": "<string>", "organizationSlug": "<string>", "deploymentVersion": "<string>", "promptHistoryHash": "<string>", "openAIOrganization": "<string>" }, "metadata": { "user_id": "user_123", "conversation_topic": "product_inquiry", "priority": "high" } }
Updates a thread’s metadata by its ID.
Your Langtail API Key
"<LANGTAIL_API_KEY>"
The ID of the thread to update.
Successfully updated thread
The response is of type object.
object
Was this page helpful?