AI

AI-powered conversations: view drafts, approve/edit responses, and monitor usage.

AI agents automatically classify inbound messages, generate draft responses, and can auto-reply when confidence is high. Use the API to list conversations, review drafts, approve or edit responses, and monitor AI usage across your organization.

Endpoints

MethodPathPermission
GET
ai.conversations
GET
ai.conversations
GET
ai.conversations
POST
ai.drafts
POST
ai.drafts
POST
ai.conversations
GET
ai.agents_read
GET
ai.conversations

List Conversations

GET /api/v1/ai/conversations

Request

Response

{
  "success": true,
  "data": [
    {
      "id": "conv-uuid-1",
      "channel": "EMAIL",
      "contactIdentifier": "prospect@example.com",
      "contactName": "Marie Dupont",
      "status": "ACTIVE",
      "humanTakeover": false,
      "unreadCount": 2,
      "lastMessageAt": "2026-03-18T10:00:00.000Z",
      "createdAt": "2026-03-18T09:41:12.000Z",
      "agent": { "id": "agent-uuid-1", "name": "Support Bot" },
      "lastMessage": {
        "content": "Could you send me your pricing?",
        "direction": "INBOUND",
        "status": "RECEIVED",
        "createdAt": "2026-03-18T10:00:00.000Z"
      },
      "messageCount": 4
    },
    {
      "id": "conv-uuid-2",
      "channel": "WHATSAPP",
      "contactIdentifier": "+33612345678",
      "contactName": null,
      "status": "ACTIVE",
      "humanTakeover": true,
      "unreadCount": 0,
      "lastMessageAt": "2026-03-18T09:30:00.000Z",
      "createdAt": "2026-03-17T18:02:44.000Z",
      "agent": { "id": "agent-uuid-1", "name": "Support Bot" },
      "lastMessage": null,
      "messageCount": 11
    }
  ],
  "meta": { "page": 1, "per_page": 20, "total": 34, "total_pages": 2 }
}
json

Approve Draft

POST /api/v1/ai/drafts/:id/approve • POST /api/v1/ai/drafts/:id/edit

Request

Response

{
  "success": true,
  "data": {
    "id": "draft-uuid-1",
    "direction": "OUTBOUND",
    "content": "Thank you for reaching out! Our pricing starts at $29/mo. Would you like a demo?",
    "status": "APPROVED",
    "conversationId": "conv-uuid-1",
    "createdAt": "2026-03-18T10:05:00.000Z"
  }
}
json