> ## Documentation Index
> Fetch the complete documentation index at: https://devs.izap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a message into a chat

> Creates a message in an existing conversation. `sender: "human-assistant"` sends immediately to the consumer via WhatsApp; omitting `sender` (or other values) queues an AI-generated reply and returns `ai_response_pending: true`.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/chats/{chat_id}/messages
openapi: 3.1.0
info:
  title: iZap API
  version: v1
  description: Public REST API for the iZap WhatsApp business messaging platform.
  contact:
    name: iZap API Support
    email: suporte@izap.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.izap.ai
    description: Production
  - url: https://api-staging.izap.ai
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Login and token refresh.
  - name: OAuth
    description: OAuth 2.1 / PKCE authorization for third-party and MCP clients.
  - name: Businesses
    description: Business profile, hours, menus, and chatbot configuration.
  - name: Chats
    description: Conversations, messages, and template sends.
  - name: Scheduling
    description: Customers, services, providers, and bookings (Trinks-backed).
  - name: WhatsApp Templates
    description: Manage and sync WhatsApp message templates.
  - name: Transmissions
    description: Bulk WhatsApp template broadcasts.
  - name: Me
    description: The authenticated user's own profile and active business.
paths:
  /api/v1/chats/{chat_id}/messages:
    post:
      tags:
        - Chats
      summary: Send a message into a chat
      description: >-
        Creates a message in an existing conversation. `sender:
        "human-assistant"` sends immediately to the consumer via WhatsApp;
        omitting `sender` (or other values) queues an AI-generated reply and
        returns `ai_response_pending: true`.
      operationId: sendChatMessage
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
                sender:
                  type: string
                  enum:
                    - human-assistant
                  description: >-
                    Set to send as a human operator; omit for an AI-generated
                    reply.
                sender_user_id:
                  type: string
                  format: uuid
                attachments:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
      responses:
        '200':
          description: Message accepted.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                user_message:
                  id: m1a2b3c4-1234-4a5b-9c8d-abcdef123456
                  content: Oi!
                  status: sent
                ai_messages: []
                ai_response_pending: true
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: Not authenticated
components:
  schemas:
    Error:
      type: object
      properties:
        detail:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token obtained from POST /api/v1/auth/jwt/login, the OAuth
        token endpoint, or a business-scoped API token. Some
        Business/Chat/Template/Scheduling endpoints alternatively accept HTTP
        Basic credentials scoped to the business slug.

````