---
title: "Retrieve a list of aicall messages"
method: GET
path: "/aimessages"
tags: ["AI"]
---

# Retrieve a list of aicall messages

`GET /aimessages`

Fetches a paginated list of aicall messages.

## Query parameters

- `page_size` integer
- `page_token` string
- `aicall_id` string, required

## Response `200`

A list of aicall messages.

- object
  - `next_page_token` string — Cursor token for the next page of results. Pass this value as the page_token parameter in the next request.
  - `result` AIManagerMessage[]
    - `id` string, uuid — The unique identifier of the message.
    - `customer_id` string, uuid — The unique identifier of the associated customer. Returned from the `GET /customers` response.
    - `aicall_id` string, uuid — The unique identifier of the associated AI call. Returned from the `GET /aicalls` response.
    - `activeflow_id` string, uuid — The unique identifier of the activeflow. Returned from the `GET /activeflows` response.
    - `active_ai_id` string, 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.
    - `content` string — Content of the message.
    - `direction` '' | 'incoming' | 'outgoing' — Direction of the message.
    - `tool_calls` object[] — List of tool calls made during the message.
      - `id` string — The unique identifier of the tool call.
      - `type` string — The type of tool call.
      - `function` object — The function call details.
        - `name` string — The name of the function to call.
        - `arguments` string — The arguments to pass to the function as a JSON string.
    - `tool_call_id` string — The tool call ID this message is responding to.
    - `tm_create` string, date-time — Timestamp when the message was created.

## Other responses

- `401` — Authentication required (UNAUTHENTICATED).
- `500` — Internal error (INTERNAL).

---

[API](https://skmtc.net/voipbin/apis/voipbin-api.md) · [All operations](https://skmtc.net/voipbin/apis/voipbin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voipbin/voipbin-api/revisions/79e779080bcc/schema)
