cURL
Assistant messages in threads
Create Thread Message
Create a new message in a thread.
POST
cURL
Use this endpoint to add a message to a thread without calling the LLM.
In most cases, you should use the Invoke Assistant API to add messages and get a response from the LLM.
However, this endpoint is useful when you need to add messages without immediate LLM processing, such as for creating placeholder messages or updating thread content separately.
Headers
Your Langtail API Key
Example:
"<LANGTAIL_API_KEY>"
Path Parameters
The ID of the thread.
Body
application/json
Response
Successful response
The unique identifier for the message.
The timestamp when the message was created.
The ID of the thread this message belongs to.
Additional messages. These will be appended to the Prompt Template.
Example:
[{ "role": "user", "content": "Hello" }]A key-value store for additional metadata associated with the message.
Information about the request log, if available.
The unique identifier for the request log, if available.