curl -X GET "https://mdb.ai/threads/mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0/messages" \
  -H "Authorization: Bearer MINDS_API_KEY"
{
    "data": [
        {
            "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.349052,
            "incomplete_at": null,
            "incomplete_details": null,
            "metadata": null,
            "object": "thread.message",
            "role": "user",
            "run_id": null,
            "status": "completed",
            "thread_id": "mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0"
        }
    ],
    "object": "list",
    "first_id": "mdb_msg_7a74bc341b194af1ab8228e57a85d462",
    "last_id": "mdb_msg_7a74bc341b194af1ab8228e57a85d462",
    "has_more": false
}

This API endpoint retrieves all Messages from a Thread using the GET method.

Body

None.

Response

data
array
required

An array of message objects stored in the thread.

object
string
required

Type of the returned object, usually "list".

first_id
string

ID of the first message in the returned list.

last_id
string

ID of the last message in the returned list.

has_more
boolean

Indicates whether more messages are available beyond the current list.

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 that stores messages.

curl -X GET "https://mdb.ai/threads/mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0/messages" \
  -H "Authorization: Bearer MINDS_API_KEY"
{
    "data": [
        {
            "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.349052,
            "incomplete_at": null,
            "incomplete_details": null,
            "metadata": null,
            "object": "thread.message",
            "role": "user",
            "run_id": null,
            "status": "completed",
            "thread_id": "mdb_thread_cfa0fac64cd94faab3ae269d768c0cb0"
        }
    ],
    "object": "list",
    "first_id": "mdb_msg_7a74bc341b194af1ab8228e57a85d462",
    "last_id": "mdb_msg_7a74bc341b194af1ab8228e57a85d462",
    "has_more": false
}