POST /v2/threads/{threadId}/messages/{messageId}

Updates the metadata of a specific message within a thread.

Request

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

Path parameters

threadIdstring required

The ID of the thread containing the message.

messageIdstring required

The ID of the message to update.

Headers

X-API-Keystring required
Example:<LANGTAIL_API_KEY>

Your Langtail API Key

Request body

metadataobject required

Set of key-value pairs that you can attach to the message. This can be useful for storing additional information about the message in a structured format.

Example request

{
  "metadata": {
    "my_key": "my key value"
  }
}

Response

Successful response

idstring required

The unique identifier for the message.

createdAtstring date-time required

The timestamp when the message was created.

deletedAtstring date-time nullable

The timestamp when the message was deleted.

threadIdstring required

The ID of the thread this message belongs to.

metadataobject nullable required

A set of key-value pairs that can be attached to the message.

requestLogIdstring nullable

The ID of the associated request log, if available.

Example response

{
  "content": [
    {
      "role": "user",
      "content": "Hello"
    }
  ],
  "metadata": {
    "my_key": "my key value"
  }
}

Changes

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