Skip to content
Shortcut: /, ⌘K or Ctrl+K

Messages

View as Markdown

Send a message

POST/graph/whatsapp/{version}/{phoneNumberId}/messagesGraph APILinked Device APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
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.

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • phoneNumberIdstringrequired

    Identifier for the phone number.

Body

  • messaging_productstringrequired

    Messaging product associated with this Graph API object.

  • recipient_typestring

    Category assigned to recipient.

  • tostring

    Recipient phone number. When both to and recipient are present, to is used.

  • recipientstring

    Recipient business-scoped user ID, for Official API numbers only. Omit to to address this ID. Parent business-scoped user IDs are not accepted.

  • typestring

    Type discriminator for this object.

    Allowed valuestextimagevideodocumentaudiostickerlocationcontactsreactioninteractivetemplate
  • textobject

    Text content carried by this object.

    Show 2 child fields
  • imageobject

    Image attached to or representing this resource.

    Show 5 child fields
  • videoobject

    Structured video values for this graph graph send message request.

    Show 5 child fields
  • documentobject

    Structured document values for this graph graph send message request.

    Show 5 child fields
  • audioobject

    Structured audio values for this graph graph send message request.

    Show 5 child fields
  • stickerobject

    Structured sticker values for this graph graph send message request.

    Show 5 child fields
  • locationobject

    Structured location values for this graph graph send message request.

    Show 4 child fields
  • contactsarray of anymax items1000nullable items

    Contact cards to send in this message.

  • reactionobject

    Reaction applied to the referenced message.

    Show 2 child fields
  • interactiveanynullable

    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.

  • templateanynullable

    Specifies template for this graph graph send message request.

  • contextobject

    Structured context values for this graph graph send message request.

    Show 1 child field
  • statusstring

    Message delivery status to report to WhatsApp.

  • message_idstring

    Identifier for the message.

  • typing_indicatorobject

    Shows a typing indicator and marks message_id read. Requires status: "read".

    Show 1 child field

Responses

  • 200Message sent, or status update accepted
    One of
    • messaging_productstringrequired

      Messaging product associated with this Graph API object.

    • contactsarray of objectrequired

      Contacts returned or affected by this operation.

      Show 3 child fields
    • messagesarray of objectrequired

      Messages associated with this graph graph send message response.

      Show 1 child field
    Show 4 headers
  • 400Bad request
  • 401Unauthenticated
  • 403Permission error
  • 404Object does not exist
  • 409Conflict
  • 413The complete JSON request exceeds 72 MiB before parsing
  • 429Rate limited
  • 500Internal error
  • 503Service unavailable
POST /graph/whatsapp/{version}/{phoneNumberId}/messagescURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/messages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "messaging_product": "whatsapp"
}'
Response
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "string"
    }
  ],
  "messages": [
    {
      "id": "string"
    }
  ]
}

Create QR code

POST/graph/whatsapp/{version}/{phoneNumberId}/message_qrdlsGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
messages:write

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • phoneNumberIdstringrequired

    Identifier for the phone number.

Body

Responses

POST /graph/whatsapp/{version}/{phoneNumberId}/message_qrdlscURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/message_qrdls" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d 'null'
Response
null

List QR codes

GET/graph/whatsapp/{version}/{phoneNumberId}/message_qrdlsGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
sessions:read

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • phoneNumberIdstringrequired

    Identifier for the phone number.

Responses

GET /graph/whatsapp/{version}/{phoneNumberId}/message_qrdlscURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/message_qrdls" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
null