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

# Send a message

> **Protocols:** Linked Device API · Meta Cloud API

**Required scope:** `messages:write`

Graph read and typing status requests require an Official API connection. Linked Device connections return a capability error; use the native Messaging API with chat context for read or typing actions there. Official API typing requests are a successful no-op. Structured order_details and order_status interactive messages are not generally available. They are sent only for teams where they are enabled, from Official API Numbers that Meta has made eligible for payments in Brazil. Other teams receive Meta-compatible capability error 131026 without a provider send.

Structured `order_details` and `order_status` interactive messages are not
available for Linked Devices or Official API Numbers. The API returns
capability error `131026` before a provider send. A received order message is
an order snapshot, not proof that the customer paid. Confirm settlement with
your payment provider before marking an order paid.


## OpenAPI

````yaml api-reference/features/messaging-graph.json POST /graph/whatsapp/{version}/{phoneNumberId}/messages
openapi: 3.0.3
info:
  title: Messaging Polymorfa Graph API methods
  version: 1.0.0
  description: Task-focused messaging methods exposed by the Polymorfa Graph API.
servers: []
security: []
paths:
  /graph/whatsapp/{version}/{phoneNumberId}/messages:
    post:
      tags:
        - Messages
      summary: Send a message
      description: >-
        **Protocols:** Linked Device API · Meta Cloud API


        **Required scope:** `messages:write`


        Graph read and typing status requests require an Official API
        connection. Linked Device connections return a capability error; use the
        native Messaging API with chat context for read or typing actions there.
        Official API typing requests are a successful no-op. Structured
        order_details and order_status interactive messages are not generally
        available. They are sent only for teams where they are enabled, from
        Official API Numbers that Meta has made eligible for payments in Brazil.
        Other teams receive Meta-compatible capability error 131026 without a
        provider send.
      operationId: graphSendMessage
      parameters:
        - schema:
            type: string
            example: v26.0
          required: true
          name: version
          in: path
          description: Specifies version for this path parameter.
        - schema:
            type: string
            example: '123456789012345'
          required: true
          name: phoneNumberId
          in: path
          description: Identifier for the phone number.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/graph__GraphSendMessageRequest'
      responses:
        '200':
          description: Message sent, or status update accepted
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/graph__GraphSendMessageResponse'
                  - $ref: '#/components/schemas/graph__GraphSuccessResponse'
        '400':
          description: Bad request
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '401':
          description: Unauthenticated
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '403':
          description: Permission error
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '404':
          description: Object does not exist
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '409':
          description: Conflict
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '429':
          description: Rate limited
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '500':
          description: Internal error
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
        '503':
          description: Service unavailable
          headers:
            X-Polymorfa-Error-Code:
              description: >-
                Polymorfa routing or operation error code; the JSON body retains
                Meta's numeric error code.
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/graph__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/graph__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/graph__X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/graph__GraphError'
      security:
        - graph__BearerAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    graph__GraphSendMessageRequest:
      type: object
      properties:
        messaging_product:
          type: string
          example: whatsapp
          description: Messaging product associated with this Graph API object.
        recipient_type:
          type: string
          description: Category assigned to recipient.
        to:
          type: string
          description: >-
            Recipient phone number. When both `to` and `recipient` are present,
            `to` is used.
          example: '15551234567'
        recipient:
          type: string
          description: >-
            Recipient business-scoped user ID, for Official API numbers only.
            Omit `to` to address this ID. Parent business-scoped user IDs are
            not accepted.
          example: US.13491208655302741918
        type:
          type: string
          enum:
            - text
            - image
            - video
            - document
            - audio
            - sticker
            - location
            - contacts
            - reaction
            - interactive
            - template
          description: |-
            Type discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `text` | Text. |
            | `image` | Image. |
            | `video` | Video. |
            | `document` | Document. |
            | `audio` | Audio. |
            | `sticker` | Sticker. |
            | `location` | Location. |
            | `contacts` | Contacts. |
            | `reaction` | Reaction. |
            | `interactive` | Interactive. |
            | `template` | Template. |
        text:
          type: object
          properties:
            body:
              type: string
              description: Primary text content shown to the recipient.
            preview_url:
              type: boolean
              description: >-
                Whether WhatsApp renders a link preview for URLs in the text
                message.
          description: Text content carried by this object.
        image:
          type: object
          properties:
            id:
              type: string
              description: Identifier for this resource.
            link:
              type: string
              description: Link associated with this resource.
            caption:
              type: string
              description: Caption shown with the attached media.
            filename:
              type: string
              description: Filename presented for the media attachment.
            voice:
              type: boolean
              description: >-
                Whether WhatsApp treats this media payload as a push-to-talk
                voice message; set this only for audio attachments.
          description: Image attached to or representing this resource.
        video:
          type: object
          properties:
            id:
              type: string
              description: Identifier for this resource.
            link:
              type: string
              description: Link associated with this resource.
            caption:
              type: string
              description: Caption shown with the attached media.
            filename:
              type: string
              description: Filename presented for the media attachment.
            voice:
              type: boolean
              description: >-
                Whether WhatsApp treats this media payload as a push-to-talk
                voice message; set this only for audio attachments.
          description: Structured video values for this graph graph send message request.
        document:
          type: object
          properties:
            id:
              type: string
              description: Identifier for this resource.
            link:
              type: string
              description: Link associated with this resource.
            caption:
              type: string
              description: Caption shown with the attached media.
            filename:
              type: string
              description: Filename presented for the media attachment.
            voice:
              type: boolean
              description: >-
                Whether WhatsApp treats this media payload as a push-to-talk
                voice message; set this only for audio attachments.
          description: >-
            Structured document values for this graph graph send message
            request.
        audio:
          type: object
          properties:
            id:
              type: string
              description: Identifier for this resource.
            link:
              type: string
              description: Link associated with this resource.
            caption:
              type: string
              description: Caption shown with the attached media.
            filename:
              type: string
              description: Filename presented for the media attachment.
            voice:
              type: boolean
              description: >-
                Whether WhatsApp treats this media payload as a push-to-talk
                voice message; set this only for audio attachments.
          description: Structured audio values for this graph graph send message request.
        sticker:
          type: object
          properties:
            id:
              type: string
              description: Identifier for this resource.
            link:
              type: string
              description: Link associated with this resource.
            caption:
              type: string
              description: Caption shown with the attached media.
            filename:
              type: string
              description: Filename presented for the media attachment.
            voice:
              type: boolean
              description: >-
                Whether WhatsApp treats this media payload as a push-to-talk
                voice message; set this only for audio attachments.
          description: Structured sticker values for this graph graph send message request.
        location:
          type: object
          properties:
            latitude:
              type: number
              description: Latitude in decimal degrees.
            longitude:
              type: number
              description: Longitude in decimal degrees.
            name:
              type: string
              description: Human-readable name for this resource.
            address:
              type: string
              description: Specifies address for this location.
          description: >-
            Structured location values for this graph graph send message
            request.
        contacts:
          type: array
          items:
            nullable: true
          description: |-
            Contact cards to send in this message.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Item alternative | Accepted input |
            | --- | --- |
            | Item alternative 1 | Any JSON value matching this alternative |
            | Item alternative 2 | `null` |
        reaction:
          type: object
          properties:
            message_id:
              type: string
              description: Identifier for the message.
            emoji:
              type: string
              description: Specifies emoji for this reaction.
          description: Reaction applied to the referenced message.
        interactive:
          nullable: true
          description: >-
            For Official API product and product_list sends, catalog_id must
            belong to a catalog linked to the Number's WABA. Product retailer
            IDs remain subject to Meta validation.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Any JSON value matching this alternative |

            | Alternative 2 | `null` |
        template:
          nullable: true
          description: |-
            Specifies template for this graph graph send message request.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Any JSON value matching this alternative |
            | Alternative 2 | `null` |
        context:
          type: object
          properties:
            message_id:
              type: string
              description: Identifier for the message.
          required:
            - message_id
          description: Structured context values for this graph graph send message request.
        status:
          type: string
          example: read
          description: Message delivery status to report to WhatsApp.
        message_id:
          type: string
          description: Identifier for the message.
        typing_indicator:
          type: object
          properties:
            type:
              type: string
              enum:
                - text
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `text` | Text. |
          required:
            - type
          description: >-
            Shows a typing indicator and marks `message_id` read. Requires
            `status: "read"`.
      required:
        - messaging_product
    graph__GraphSendMessageResponse:
      type: object
      properties:
        messaging_product:
          type: string
          example: whatsapp
          description: Messaging product associated with this Graph API object.
        contacts:
          type: array
          items:
            type: object
            properties:
              input:
                type: string
                description: Specifies input for this contact.
              wa_id:
                type: string
                description: >-
                  Recipient phone number. Omitted when the message was addressed
                  with `recipient`.
              user_id:
                type: string
                description: >-
                  Recipient business-scoped user ID. Present only when the
                  message was addressed with `recipient`.
            required:
              - input
          description: Contacts returned or affected by this operation.
        messages:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Identifier for this resource.
            required:
              - id
          description: Messages associated with this graph graph send message response.
      required:
        - messaging_product
        - contacts
        - messages
    graph__GraphSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the request succeeded.
      required:
        - success
    graph__GraphError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable message associated with this result.
            type:
              type: string
              description: Type discriminator for this object.
            code:
              type: number
              description: Stable machine-readable code for this result.
            error_subcode:
              type: number
              description: Machine-readable error subcode for this error.
            error_data:
              nullable: true
              description: |-
                Specifies error data for this error.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Any JSON value matching this alternative |
                | Alternative 2 | `null` |
            fbtrace_id:
              type: string
              description: Identifier for the fbtrace.
          required:
            - message
            - type
            - code
            - fbtrace_id
          description: Error details returned when the operation fails.
      required:
        - error
  headers:
    graph__X-RateLimit-Limit:
      description: >-
        Team request quota per rolling minute, when the per-team request limiter
        applies.
      schema:
        type: integer
        minimum: 1
    graph__X-RateLimit-Remaining:
      description: >-
        Requests left in the per-team quota; zero when this limiter rejects the
        request.
      schema:
        type: integer
        minimum: 0
    graph__X-RateLimit-Reset:
      description: >-
        Unix timestamp in seconds when the oldest counted request leaves the
        rolling window, when the per-team request limiter applies. Follow
        Retry-After on a rejected request.
      schema:
        type: integer
        minimum: 0
  securitySchemes:
    graph__BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (pmfa_ prefix) or project token (pmfa_pt_
        prefix). Client tokens are not accepted by Graph operations.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.