POST
/
v1
/
threads
/
{threadId}
/
messages

Authorizations

X-Tune-Key
string
headerrequired

Tune API Keys are the preferred way to authenticate with the API. You can create an API Key from your Tune Studio Profile → 'Access Keys' (in sidebar)

Path Parameters

threadId
string
required

ID of the thread to which the message belongs to.

Body

application/json
role
string

The role of message createor (user or assistant).

content
object[]

The content of the message.

attachments
object[]

The attachments of the message.

assistantId
string
runId
string

The ID of the run if the message is created by the assistant.

metadata
object

Metadata to store additional information in key-value pair.

Response

200 - application/json
id
string

The ID of the message.

object
string

"thread.message".

createdAt
string

The time the message was created.

threadId
string

The ID of the thread the message is associated with.

role
string

"user" or "assistant".

content
object[]

The content of the message.

attachments
object[]

The attachments of the message.

assistantId
string
runId
string

The ID of the run that created the message.

metadata
object

Metadata for the message key-value pairs.