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

# Send a message via WhatsApp

> Queues a message for delivery via WhatsApp. Supports 10 message types: text, image, video, audio, document, location, poll, contact, forward, and reaction. The message is processed asynchronously via BullMQ. Brazilian phone numbers are automatically retried with/without the 9th digit on failure.



## OpenAPI

````yaml openapi.json post /api/instances/{instanceId}/messages/send
openapi: 3.0.0
info:
  title: Wappfy API
  description: >-
    WhatsApp API Platform — Manage instances, send messages, and build
    integrations.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.wappfy.io
    description: Production
security: []
tags:
  - name: Instances
    description: Create, connect, and manage WhatsApp instances (WAHA or Cloud API)
  - name: Messages
    description: >-
      Send messages via WhatsApp (text, media, location, poll, contacts, and
      more)
  - name: Chats
    description: List chats, read messages, mark as seen, and manage typing indicators
  - name: Groups
    description: Create and manage WhatsApp groups, participants, and invite links
  - name: Contacts
    description: Look up contacts, check phone numbers, and fetch profile pictures
  - name: Labels
    description: Organize chats with WhatsApp Business labels
  - name: Channels
    description: Create and manage WhatsApp Channels (newsletters)
  - name: Status
    description: Publish text status/stories
  - name: Presence
    description: Set and get online/offline presence
  - name: Webhooks
    description: Configure webhook endpoints to receive real-time event notifications
  - name: Admin
    description: >-
      Platform administration — user management, statistics, and proxy
      monitoring (admin only)
paths:
  /api/instances/{instanceId}/messages/send:
    post:
      tags:
        - Messages
      summary: Send a message via WhatsApp
      description: >-
        Queues a message for delivery via WhatsApp. Supports 10 message types:
        text, image, video, audio, document, location, poll, contact, forward,
        and reaction. The message is processed asynchronously via BullMQ.
        Brazilian phone numbers are automatically retried with/without the 9th
        digit on failure.
      operationId: MessagesController_send
      parameters:
        - name: instanceId
          required: true
          in: path
          description: The WhatsApp instance UUID
          schema:
            format: uuid
            example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageDto'
      responses:
        '201':
          description: Message queued for delivery
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageResponseDto'
        '401':
          description: Missing or invalid authentication token
        '403':
          description: Insufficient permissions
        '500':
          description: Internal server error
      security:
        - bearer: []
components:
  schemas:
    SendMessageDto:
      type: object
      properties:
        to:
          type: string
          description: Recipient phone number or chatId
        type:
          type: string
          enum:
            - text
            - image
            - video
            - audio
            - document
            - location
            - template
            - poll
            - contact
            - forward
            - reaction
        body:
          type: string
        media_url:
          type: string
        caption:
          type: string
        template_name:
          type: string
        template_params:
          type: object
        location:
          $ref: '#/components/schemas/LocationDto'
        quoted_message_id:
          type: string
          description: Message ID to reply/quote
        edit_message_id:
          type: string
          description: Message ID to edit
        mentions:
          description: '@mentions (phone numbers with @c.us)'
          type: array
          items:
            type: string
        poll:
          description: Poll data (type=poll)
          allOf:
            - $ref: '#/components/schemas/PollDto'
        contacts:
          description: Contact cards (type=contact)
          type: array
          items:
            $ref: '#/components/schemas/ContactDto'
        forward_message_id:
          type: string
          description: Message ID to forward (type=forward)
        reaction:
          type: string
          description: Reaction emoji (type=reaction), empty string to remove
        reaction_message_id:
          type: string
          description: Message ID to react to (type=reaction)
      required:
        - to
        - type
    SendMessageResponseDto:
      type: object
      properties:
        message:
          type: string
          example: Message queued for delivery
          description: Confirmation message
        jobId:
          type: string
          example: '42'
          description: BullMQ job ID for tracking
      required:
        - message
        - jobId
    LocationDto:
      type: object
      properties:
        latitude:
          type: number
          description: Latitude coordinate
          example: -23.5505
        longitude:
          type: number
          description: Longitude coordinate
          example: -46.6333
        name:
          type: string
          description: Location name or address
          example: Av. Paulista, São Paulo
      required:
        - latitude
        - longitude
    PollDto:
      type: object
      properties:
        name:
          type: string
          description: Poll question
        options:
          description: Poll options
          type: array
          items:
            type: string
        multipleAnswers:
          type: boolean
          description: Allow multiple answers
      required:
        - name
        - options
        - multipleAnswers
    ContactDto:
      type: object
      properties:
        fullName:
          type: string
        phoneNumber:
          type: string
        organization:
          type: string
        whatsappId:
          type: string
      required:
        - fullName
        - phoneNumber
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````