Skip to content

Create Conversation

POST
/v1/chat/conversations
curl --request POST \
--url https://api.uavcrew.ai/v1/chat/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "", "conversation_type": "direct", "participant_ids": [ "example" ], "agent_slugs": [ "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": "" }, "context_type": "example", "context_id": "example" }'

Create a new conversation with participants.

Media typeapplication/json
CreateConversationRequest

Create a new conversation.

object
title
Title
string
""
conversation_type
ConversationType
string
default: group
Allowed values: direct group channel
participant_ids
Participant Ids

User UUIDs to add as human participants

Array<string>
agent_slugs
Agent Slugs

AI agent slugs to add (arpa, concord, tucker, etc.)

Array<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
""
context_type
Any of:
string
context_id
Any of:
string

Successful Response

Media typeapplication/json
ConversationResponse

A conversation with participants and last message.

object
id
required
Id
string
title
required
Title
string
conversation_type
required
ConversationType
string
Allowed values: direct group channel
context_type
Any of:
string
context_id
Any of:
string
participants
Participants
Array<object>
default:
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
last_message
Any of:
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
unread_count
Unread Count
integer
0
is_archived
Is Archived
boolean
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Example

{
"conversation_type": "direct",
"participants": [],
"last_message": {
"participant": {
"participant_type": "human",
"role": "owner"
},
"message_type": "text",
"mentions": []
},
"unread_count": 0,
"is_archived": false
}

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": {}
}
]
}