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

# Send a message

> Send any WhatsApp Cloud API message. `type` selects the kind: text, image, audio, video, document, sticker, location, contacts, interactive, template, reaction.



## OpenAPI

````yaml openapi.meta.json POST /{phoneNumberId}/messages
openapi: 3.1.0
info:
  title: Meta Cloud API Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Meta Cloud API (WhatsApp Cloud API / Graph API
    passthrough). Base URL `https://pilotstatus.com.br/api/layer/meta`. Call
    Graph API nodes exactly as on `graph.facebook.com/<version>/` — Pilot swaps
    your `ps_` key for the number's real Meta system token. The `vNN.N` version
    prefix is optional (defaults to v22.0). Account/business/auth management and
    number (de)registration are blocked.
servers:
  - url: https://pilotstatus.com.br/api/layer/meta
security:
  - apiKey: []
tags:
  - name: Messages
  - name: Media
  - name: By id
  - name: Templates
  - name: Phone numbers
  - name: Business profile
  - name: Groups
  - name: Calls
paths:
  /{phoneNumberId}/messages:
    post:
      tags:
        - Messages
      summary: Send a message
      description: >-
        Send any WhatsApp Cloud API message. `type` selects the kind: text,
        image, audio, video, document, sticker, location, contacts, interactive,
        template, reaction.
      operationId: post__phoneNumberId_messages
      parameters:
        - name: phoneNumberId
          in: path
          required: true
          schema:
            type: string
          description: Meta phone-number id of the number linked to your API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                messaging_product:
                  type: string
                  description: Always `whatsapp`.
                  enum:
                    - whatsapp
                  example: whatsapp
                recipient_type:
                  type: string
                  description: '`individual` or `group`.'
                  enum:
                    - individual
                    - group
                  example: individual
                to:
                  type: string
                  description: Recipient MSISDN (or group id).
                  example: '5511999999999'
                type:
                  type: string
                  description: Message kind — selects which object below to fill.
                  enum:
                    - text
                    - image
                    - audio
                    - video
                    - document
                    - sticker
                    - location
                    - contacts
                    - interactive
                    - template
                    - reaction
                  example: text
                text:
                  type: object
                  properties:
                    preview_url:
                      type: boolean
                      description: Render a link preview.
                    body:
                      type: string
                      description: Message text.
                  required:
                    - body
                  example:
                    preview_url: false
                    body: Hello from Pilot Status 👋
                image:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Media id from an upload.
                    link:
                      type: string
                      description: Public https URL (alternative to id).
                    caption:
                      type: string
                      description: Optional caption.
                audio:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Media id from an upload.
                    link:
                      type: string
                      description: Public https URL (alternative to id).
                video:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Media id from an upload.
                    link:
                      type: string
                      description: Public https URL (alternative to id).
                    caption:
                      type: string
                      description: Optional caption.
                document:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Media id from an upload.
                    link:
                      type: string
                      description: Public https URL (alternative to id).
                    caption:
                      type: string
                      description: Optional caption.
                    filename:
                      type: string
                      description: File name shown to the recipient.
                sticker:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Media id from an upload.
                    link:
                      type: string
                      description: Public https URL (alternative to id).
                location:
                  type: object
                  properties:
                    latitude:
                      type: number
                    longitude:
                      type: number
                    name:
                      type: string
                      description: Place name.
                    address:
                      type: string
                      description: Address.
                  required:
                    - latitude
                    - longitude
                contacts:
                  type: array
                  items:
                    type: object
                  description: Contact cards.
                interactive:
                  type: object
                  properties:
                    type:
                      type: string
                      description: '`button`, `list`, `cta_url`, `flow`, `product`…'
                    header:
                      type: object
                    body:
                      type: object
                      properties:
                        text:
                          type: string
                    footer:
                      type: object
                      properties:
                        text:
                          type: string
                    action:
                      type: object
                      description: >-
                        Buttons / sections / parameters for the interactive
                        type.
                  description: Interactive message (buttons/list/CTA/flow).
                template:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Approved template name.
                    language:
                      type: object
                      properties:
                        code:
                          type: string
                          description: e.g. `pt_BR`.
                    components:
                      type: array
                      items:
                        type: object
                      description: Header/body/button parameters.
                reaction:
                  type: object
                  properties:
                    message_id:
                      type: string
                    emoji:
                      type: string
                      description: Emoji, or empty string to remove.
                context:
                  type: object
                  properties:
                    message_id:
                      type: string
                      description: Reply to this message id.
                  description: Quote/reply context.
              required:
                - messaging_product
                - to
                - type
      responses:
        '200':
          description: Meta Graph API response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  messaging_product:
                    type: string
                  contacts:
                    type: array
                    items:
                      type: object
                      properties:
                        input:
                          type: string
                        wa_id:
                          type: string
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Message id (wamid).
                        message_status:
                          type: string
              example:
                messaging_product: whatsapp
                contacts:
                  - input: '5511999999999'
                    wa_id: '5511999999999'
                messages:
                  - id: wamid.HBgL...
        default:
          description: Meta Graph API error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: Human-readable error.
                      type:
                        type: string
                        description: e.g. `OAuthException`.
                      code:
                        type: integer
                      error_subcode:
                        type: integer
                      error_data:
                        type: object
                      fbtrace_id:
                        type: string
                description: Meta Graph API error envelope.
              example:
                error:
                  message: (#131030) Recipient phone number not in allowed list
                  type: OAuthException
                  code: 131030
                  fbtrace_id: A...
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Pilot Status API key (ps_...). You may also send `Authorization:
        Bearer ps_...` or `?access_token=ps_...`.

````