Skip to main content

Sending messages

Send user message

Sends a message from the end-user to the AI Agent. The response is delivered asynchronously to your webhook.

POST /v1/custom/:integration_id/sessions/:session_id/messages

Path parameters

ParameterTypeRequiredDescription
integration_idUUIDYesYour custom integration ID.
session_idUUIDYesThe session ID from the create session response.

Request body

{
"input": {
"text": "Hello, I need help with my order",
"attachments": [
{
"type": "image",
"mime_type": "image/png",
"url": "https://example.com/uploads/screenshot.png",
"filename": "error-screenshot.png"
}
]
},
"context": {
"current_page": "order-tracking"
}
}
FieldTypeRequiredDescription
inputobjectYesThe message input.
input.textstringNo*Text message content.
input.attachmentsarrayNo*Array of attachments. See attachment object.
contextobjectNoContext updates. See context object.

*Either text or attachments must be provided. The message cannot be empty.

Response202 Accepted

{
"request_id": "550e8400-e29b-41d4-a716-446655440002"
}

Example

curl -X POST "https://channels.moveo.ai/v1/custom/YOUR_INTEGRATION_ID/sessions/SESSION_ID/messages" \
-H "Authorization: apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"text": "Hello, I need help with my order"
}
}'

Send agent message

Records a message from an external human agent into the conversation history for analytics and reporting purposes. Use this endpoint when your system handles agent messaging externally and you want Moveo to track the full conversation, including agent replies.

POST /v1/custom/:integration_id/sessions/:session_id/messages/agent

Path parameters

ParameterTypeRequiredDescription
integration_idUUIDYesYour custom integration ID.
session_idUUIDYesThe session ID.

Request body

{
"input": {
"text": "Hi, I'm Sarah and I'll help you today."
},
"agent": {
"agent_id": "agent-123",
"agent_name": "Sarah Johnson",
"agent_avatar": "https://example.com/avatars/sarah.jpg",
"team_id": "support-team"
}
}
FieldTypeRequiredDescription
inputobjectYesThe message input (same as send user message).
input.textstringNo*Text message content.
input.attachmentsarrayNo*Array of attachments.
agentobjectNoAgent identity information. Defaults to "External Agent" if not provided.
agent.agent_idstringNoAgent's unique identifier.
agent.agent_namestringNoAgent's display name.
agent.agent_avatarstringNoURL to agent's avatar image.
agent.team_idstringNoAgent's team or department ID.

*Either text or attachments must be provided.

Response202 Accepted

{
"request_id": "550e8400-e29b-41d4-a716-446655440003"
}

Mark messages as read

Marks messages as read up to a given timestamp. If no timestamp is provided, the current time is used.

POST /v1/custom/:integration_id/sessions/:session_id/messages/read

Path parameters

ParameterTypeRequiredDescription
integration_idUUIDYesYour custom integration ID.
session_idUUIDYesThe session ID.

Request body

{
"timestamp": 1704067200000
}
FieldTypeRequiredDescription
timestampintegerNoUnix timestamp in milliseconds. Defaults to the current time.

Response200 OK

{
"request_id": "550e8400-e29b-41d4-a716-446655440011"
}

Mark messages as delivered

Marks messages as delivered up to a given timestamp. If no timestamp is provided, the current time is used.

POST /v1/custom/:integration_id/sessions/:session_id/messages/delivered

Path parameters

ParameterTypeRequiredDescription
integration_idUUIDYesYour custom integration ID.
session_idUUIDYesThe session ID.

Request body

{
"timestamp": 1704067200000
}
FieldTypeRequiredDescription
timestampintegerNoUnix timestamp in milliseconds. Defaults to the current time.

Response200 OK

{
"request_id": "550e8400-e29b-41d4-a716-446655440012"
}

Attachment object

Used in message inputs for both user and agent messages.

FieldTypeRequiredDescription
typestringYesAttachment type: image, audio, video, or file.
mime_typestringYesMIME type (e.g., image/jpeg, audio/mp3, application/pdf).
urlstringNoURL to the attachment file.
idstringNoAttachment identifier (use with presigned URLs from the file upload endpoint).
titlestringNoDisplay title for the attachment.
filenamestringNoOriginal filename.