Send Message
const url = 'https://api.uavcrew.ai/v1/chat/conversations/example/messages';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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":""}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”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
Tenant external ID (must match K1 auth). Example: ‘9e07e5c3-f922-4999-8e54-060e572690e9’
AI mode for this message. ‘chat’ = read-only tools, ‘agentic’ = read + write tools with approval.
Participant UUIDs being @-mentioned (optional, for human mentions)
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
Page URL where chat was initiated
Describes the UI page the user is currently on.
object
Page title (e.g. ‘Drone Detail’)
Brief description of the page
Actions available on this page (e.g. ‘Edit drone details’)
Reference to an entity (used in focus and related).
object
Entity type (e.g. aircraft, pilot, mission)
Entity UUID. Omit for singletons (company).
Display name of the entity
Additional entities relevant to the conversation
Reference to an entity (used in focus and related).
object
Entity type (e.g. aircraft, pilot, mission)
Entity UUID. Omit for singletons (company).
Display name of the entity
Files the user wants the agent to consider
A file attachment in conversation context.
object
Original filename
File UUID from the files/artifacts system
Client-composed plain-text summary of the focus record — key fields (contact info, status, etc.) the agent needs without a tool call
Responses
Section titled “Responses”Successful Response
A single message.
object
A participant in a conversation.
object
Example
{ "participant": { "participant_type": "human", "role": "owner" }, "message_type": "text", "mentions": []}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}