---
title: "Send a message to a chat"
method: POST
path: "/api/v1/chats/{chat_id}/messages"
tags: ["messages"]
---

# Send a message to a chat

`POST /api/v1/chats/{chat_id}/messages`

## Request

- Base URL: `https://api.izap.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.izap.ai/api/v1/chats/{chat_id}/messages`
- Auth: HTTP bearer

Sends a message as a human agent and stores it on the conversation. The assistant does not reply to messages sent this way. Attachments are supported.

## Path parameters

- `chat_id` string, uuid, required

## Request body

- CreateMessageIn: Schema for creating a new message in a chat
  - `content` string, required
  - `sender_user_id` string, uuid, nullable
  - `sender` string, nullable
  - `attachments` MessageAttachment[], nullable
    - `id` string, uuid, nullable
    - `filename` string, required
    - `file_type` string, required
    - `file_size` integer, required
    - `url` string, required
  - `client_message_id` string, uuid, nullable

## Response `200`

Successful Response

- SendChatMessageOut: Response for ``POST /chats/{chat_id}/messages``. ``ai_messages``/``ai_response_pending`` are absent on the human-assistant path (no AI reply was generated) and present on the AI path — kept absent rather than null via ``response_model_exclude_unset`` on the route.
  - `user_message` ChatMessageSummaryOut, required: A chat message as embedded in the send-message responses below.
    - `id` string, uuid, required
    - `content` string, nullable, required
    - `no_reply` boolean, required
    - `timestamp` string, date-time, required
    - `status` 'new' | 'queued' | 'sending' | 'sent' | 'failed' | 'delivered' | 'undelivered' | 'receiving' | 'received' | 'accepted' | 'scheduled' | 'read' | 'played' | 'cancelled', required
    - `error_code` integer, nullable, required
    - `error_reason` string, nullable, required
    - `message_sid` string, nullable
    - `receiver` string, nullable
    - `updated_at` string, date-time, nullable
    - `sender_user_id` string, uuid, nullable, required
    - `client_message_id` string, uuid, nullable
  - `ai_messages` ChatMessageSummaryOut[], nullable
    - `id` string, uuid, required
    - `content` string, nullable, required
    - `no_reply` boolean, required
    - `timestamp` string, date-time, required
    - `status` 'new' | 'queued' | 'sending' | 'sent' | 'failed' | 'delivered' | 'undelivered' | 'receiving' | 'received' | 'accepted' | 'scheduled' | 'read' | 'played' | 'cancelled', required
    - `error_code` integer, nullable, required
    - `error_reason` string, nullable, required
    - `message_sid` string, nullable
    - `receiver` string, nullable
    - `updated_at` string, date-time, nullable
    - `sender_user_id` string, uuid, nullable, required
    - `client_message_id` string, uuid, nullable
  - `ai_response_pending` boolean, nullable

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The business hit the free plan's per-chat daily message limit.
- `404`: The resource, or the business named in the request, does not exist.
- `409`: The 24-hour customer service window for this conversation is closed. Send an approved template message to reopen it.
- `422`: Validation Error
- `default`: Unexpected error.

---

[API](https://skmtc.dev/izap/apis/izap-api.md) · [All operations](https://skmtc.dev/izap/apis/izap-api/llms.txt) · [OpenAPI document](https://skmtc.dev/izap/apis/izap-api/revisions/e6358c8bf5e9?raw)
