v51

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014102371.0 MB
AI

Send a aicall message

Creates and send a new aicall message and returns the details of the created message.

post/aimessages

Request body

aicall_idstring required
role'' | 'system' | 'user' | 'assistant' | 'function' | 'tool' | 'notification' required

Role of the entity in the conversation.

contentstring required

Example request

{
  "role": "assistant"
}

Response

idstring uuid

The unique identifier of the message.

customer_idstring uuid

The unique identifier of the associated customer. Returned from the GET /customers response.

aicall_idstring uuid

The unique identifier of the associated AI call. Returned from the GET /aicalls response.

activeflow_idstring uuid

The unique identifier of the activeflow. Returned from the GET /activeflows response.

active_ai_idstring uuid

The unique identifier of the AI configuration that was active when this message was created. Returned from the GET /ais response.

role'' | 'system' | 'user' | 'assistant' | 'function' | 'tool' | 'notification'

Role of the entity in the conversation.

contentstring

Content of the message.

direction'' | 'incoming' | 'outgoing'

Direction of the message.

tool_call_idstring

The tool call ID this message is responding to.

tm_createstring date-time

Timestamp when the message was created.

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "customer_id": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
  "aicall_id": "550e8400-e29b-41d4-a716-446655440000",
  "activeflow_id": "550e8400-e29b-41d4-a716-446655440000",
  "active_ai_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "role": "assistant",
  "content": "Hello, how can I help you today?",
  "direction": "incoming",
  "tool_calls": [
    {
      "id": "call_abc123",
      "type": "function",
      "function": {
        "name": "get_weather",
        "arguments": "{\"location\": \"San Francisco\"}"
      }
    }
  ],
  "tool_call_id": "call_abc123",
  "tm_create": "2026-01-15T09:30:00.000000Z"
}