curl -X POST "https://mdb.ai/threads/mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0/messages" \
  -H "Authorization: Bearer MINDS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "role": "user",
      "content": "What data do you have access to?"
  }'
{
    "id": "mdb_msg_7a74bc341b194af1ab8228e57a85d462",
    "assistant_id": null,
    "attachments": null,
    "completed_at": null,
    "content": [
        {
            "text": {
                "annotations": [],
                "value": "What data do you have access to?"
            },
            "type": "text"
        }
    ],
    "created_at": 1718885284.3509543,
    "incomplete_at": null,
    "incomplete_details": null,
    "metadata": null,
    "object": null,
    "role": "user",
    "run_id": null,
    "status": null,
    "thread_id": "mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0"
}

This API endpoint creates a Message in a Thread using the POST method.

Body

role
string
required

Role used to send a Message (e.g., “user” or “assistant”).

content
string
required

A Message to be posted to a Thread.

Response

id
string
required

Unique identifier for the created message.

assistant_id
string

ID of the assistant, if applicable.

attachments
array

Any attachments associated with the message.

completed_at
number

Timestamp when the message was completed.

content
array
required

Content of the message, including text and annotations.

created_at
number
required

Timestamp when the message was created.

incomplete_at
number

Timestamp when the message became incomplete, if applicable.

incomplete_details
object

Details on why the message was incomplete.

metadata
object

Additional metadata about the message.

object
string

Type of the object.

role
string
required

The role that generated the message.

run_id
string

Run ID associated with the message.

status
string

Status of the message.

thread_id
string
required

ID of the thread the message belongs to.

Authorization

A valid API key must be passed in the Authorization header:

Authorization: Bearer MINDS_API_KEY

Generate your API key here.

Path Parameters

thread_id
string
required

Id of the Thread to post the message to.

curl -X POST "https://mdb.ai/threads/mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0/messages" \
  -H "Authorization: Bearer MINDS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "role": "user",
      "content": "What data do you have access to?"
  }'
{
    "id": "mdb_msg_7a74bc341b194af1ab8228e57a85d462",
    "assistant_id": null,
    "attachments": null,
    "completed_at": null,
    "content": [
        {
            "text": {
                "annotations": [],
                "value": "What data do you have access to?"
            },
            "type": "text"
        }
    ],
    "created_at": 1718885284.3509543,
    "incomplete_at": null,
    "incomplete_details": null,
    "metadata": null,
    "object": null,
    "role": "user",
    "run_id": null,
    "status": null,
    "thread_id": "mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0"
}