Skip to main content
POST
/
api
/
v1
/
messages
Create Message
curl --request POST \
  --url https://api.example.com/api/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": {
    "content": "<string>",
    "sender_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "role": "user",
    "message_type": "text",
    "tool_calls": [
      {}
    ],
    "parent_message_id": "<string>",
    "tags": [
      "<string>"
    ],
    "meta_data": {},
    "attachments": [
      {}
    ]
  },
  "conversation_id": "<string>",
  "enable_memories": false
}
'
[
  {
    "conversation_id": "<string>",
    "sender_id": "<string>",
    "content": "<string>",
    "workspace_id": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "id": "<string>",
    "role": "user",
    "tool_calls": [
      {}
    ],
    "message_type": "text",
    "tags": [
      "<string>"
    ],
    "checksum": "<string>",
    "attachments": [
      {}
    ],
    "parent_message_id": "<string>",
    "meta_data": {},
    "sent_at": "2023-11-07T05:31:56Z",
    "owner_id": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Workspace-Id
string | null

The workspace ID

Body

application/json

Schema for creating messages.

content
MessageCreateRequest · object
required

Schema for message creation request.

conversation_id
string | null

Conversation ID

enable_memories
boolean | null
default:false

Enable memories

Response

Successful Response

conversation_id
string
required

Reference to conversation

sender_id
string
required

ID of the message sender

content
string
required

Message content

workspace_id
string
required

Reference to workspace

created_at
string | null
updated_at
string | null
id
string
role
string
default:user

Message role (user, assistant, system, etc.)

tool_calls
Tool Calls · object[] | null

Tool calls made in this message

message_type
string
default:text

Type of message

tags
string[] | null

Message tags

checksum
string | null

Message checksum

attachments
Attachments · object[] | null

Message attachments

parent_message_id
string | null

Parent message ID for threading

meta_data
Meta Data · object

Additional metadata

sent_at
string<date-time> | null

When the message was sent

owner_id
string | null

Owner ID