POST /v2/threads/{threadId}

Updates a thread's metadata by its ID.

Request

  • Base URL
    https://api.langtail.com
  • Auth
    none declared. Required headers: X-API-Key

Path parameters

threadIdstring required

The ID of the thread to update.

Headers

X-API-Keystring required
Example:<LANGTAIL_API_KEY>

Your Langtail API Key

Request body

metadataobject required

A set of key-value pairs that can be attached to the thread. This can be used to store additional information about the thread to facilitate filtering or organization. Note that the new metadata provided will completely overwrite any existing metadata for the thread.

Example request

{
  "metadata": {
    "user_id": "user_123",
    "conversation_topic": "product_inquiry",
    "priority": "high"
  }
}

Response

Successfully updated thread

idstring required

The unique identifier for the thread.

createdAtinteger required

The Unix timestamp (in seconds) of when the thread was created.

projectIdstring required

The ID of the project this thread belongs to.

metadataobject required

The updated set of key-value pairs attached to the thread.

Example response

{
  "metadata": {
    "user_id": "user_123",
    "conversation_topic": "product_inquiry",
    "priority": "high"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.