cURL
curl --request POST \ --url https://api.langtail.com/v2/threads \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <x-api-key>' \ --data '{ "metadata": { "user_id": "user_123", "conversation_topic": "product_inquiry", "priority": "high" }, "createLog": {} }'
{ "id": "<string>", "createdAt": "2023-11-07T05:31:56Z", "projectId": "<string>", "metadata": {}, "deletedAt": "2023-11-07T05:31:56Z", "createLog": {} }
Create a new thread. This endpoint allows you to initialize a conversation thread, optionally providing metadata or an initial log.
Your Langtail API Key
"<LANGTAIL_API_KEY>"
Successfully created thread
The response is of type object.
object
Was this page helpful?