Skip to content

Send Message

POST
/v1/chat/conversations/{conversation_id}/messages
curl --request POST \
--url https://api.uavcrew.ai/v1/chat/conversations/example/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "content": "example", "tenant_id": "example", "agent": "example", "ai_mode": "chat", "reasoning_effort": "low", "message_type": "text", "mentions": [ "example" ], "client_message_id": "example", "context": { "source": "", "page": { "title": "", "description": "", "actions": [ "example" ] }, "focus": { "entity": "example", "id": "", "name": "" }, "related": [ { "entity": "example", "id": "", "name": "" } ], "attachments": [ { "filename": "example", "file_id": "example" } ], "records": {}, "entity_summary": "" } }'

Send a message to a conversation.

Required body fields:

  • content: Message text
  • tenant_id: Must match the tenant resolved from your K1 API key
  • agent: Agent slug to respond (concord, tucker, meridian, ren, sterling)
conversation_id
required
Conversation Id
string
Media typeapplication/json
SendMessageRequest

Send a message to a conversation.

Required fields: content: The message text (1-10000 chars). tenant_id: The tenant’s external ID (Ayna org UUID). Must match the tenant_id resolved from your K1 API key. This is a security check — the caller cannot lie about which tenant they are.

Optional fields: agent: Agent slug to respond (e.g. “sterling”, “concord”, “tucker”). Required when the conversation’s organization has auto_detect_handoff_enabled = false (preserves today’s strict contract). Optional when the flag is on — the API falls back to the most-recent-speaker, then the seeded specialist. The agent is auto-added as a participant if not already in the conversation.

object
content
required
Content
string
>= 1 characters <= 10000 characters
tenant_id
required
Tenant Id

Tenant external ID (must match K1 auth). Example: ‘9e07e5c3-f922-4999-8e54-060e572690e9’

string
agent
Any of:
string
ai_mode
Ai Mode

AI mode for this message. ‘chat’ = read-only tools, ‘agentic’ = read + write tools with approval.

string
default: chat
reasoning_effort
Any of:
string
Allowed values: low high max
message_type
MessageType
string
default: text
Allowed values: text system ai_response tool_call tool_result file action_card
mentions
Mentions

Participant UUIDs being @-mentioned (optional, for human mentions)

Array<string>
client_message_id
Any of:
string
context
Any of:
MessageContext

Context about what the user is looking at when chatting.

New format (v2): source: Page URL where chat was initiated focus: Primary entity the conversation is about related: Additional entities relevant to the conversation attachments: Files the user wants the agent to consider

Legacy format (v1) is also accepted for backward compatibility: entity, id, name, url, references → auto-mapped to v2 fields

object
source
Source

Page URL where chat was initiated

string
""
page
Any of:
PageContext

Describes the UI page the user is currently on.

object
title
Title

Page title (e.g. ‘Drone Detail’)

string
""
description
Description

Brief description of the page

string
""
actions
Actions

Actions available on this page (e.g. ‘Edit drone details’)

Array<string>
focus
Any of:
EntityReference

Reference to an entity (used in focus and related).

object
entity
required
Entity

Entity type (e.g. aircraft, pilot, mission)

string
id
Id

Entity UUID. Omit for singletons (company).

string
""
name
Name

Display name of the entity

string
""
related
Related

Additional entities relevant to the conversation

Array<object>
EntityReference

Reference to an entity (used in focus and related).

object
entity
required
Entity

Entity type (e.g. aircraft, pilot, mission)

string
id
Id

Entity UUID. Omit for singletons (company).

string
""
name
Name

Display name of the entity

string
""
attachments
Attachments

Files the user wants the agent to consider

Array<object>
FileAttachment

A file attachment in conversation context.

object
filename
required
Filename

Original filename

string
file_id
required
File Id

File UUID from the files/artifacts system

string
records
Any of:
object
key
additional properties
any
entity_summary
Entity Summary

Client-composed plain-text summary of the focus record — key fields (contact info, status, etc.) the agent needs without a tool call

string
""

Successful Response

Media typeapplication/json
MessageResponse

A single message.

object
id
required
Id
string
conversation_id
required
Conversation Id
string
participant
Any of:
ParticipantResponse

A participant in a conversation.

object
id
required
Id
string
participant_type
required
ParticipantType
string
Allowed values: human ai_agent external
user_id
Any of:
string
external_id
Any of:
string
display_name
required
Display Name
string
role
required
ParticipantRole
string
Allowed values: owner member observer
is_active
required
Is Active
boolean
last_read_at
Any of:
string format: date-time
message_type
required
MessageType
string
Allowed values: text system ai_response tool_call tool_result file action_card
content
required
Content
string
mentions
Mentions
Array<string>
default:
tool_data
Any of:
object
key
additional properties
any
client_message_id
Any of:
string
created_at
required
Created At
string format: date-time

Example

{
"participant": {
"participant_type": "human",
"role": "owner"
},
"message_type": "text",
"mentions": []
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}