API Reference
Send a marketing message
/{phone-number-id}/marketing_messageshttps://whatsapp.mimicr.dev/v24.0 · provider: https://graph.facebook.com/v24.0Marketing Messages API: sends a MARKETING template through the marketing messages pipeline. Only type: template is accepted (131009 otherwise). In Mimicr it uses the same delivery engine as /messages.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Path parameters
WhatsApp Business phone number ID.
"424361664134261"Body
application/jsonMessaging service. Must be whatsapp.
whatsappRecipient type.
individualgroupWhatsApp ID or phone number of the recipient, with country code. In Mimicr, Brazilian numbers with or without the ninth digit resolve to the same wa_id.
"5511987654321"Sends the message as a reply to a previous message.
Show child attributes
wamid of the message you are replying to.
Arbitrary string returned in the status webhooks of this message (up to 512 characters).
Message type.
templateShow child attributes
Template name.
Show child attributes
Language and locale code of an approved translation of the template.
"pt_BR"Variable values. The number of parameters must match the template (132000 otherwise). Authentication templates take the code as the single body parameter and again in the url button.
Show child attributes
Component the parameters fill.
headerbodybuttonButton type, for button components.
quick_replyurlcopy_codeflowPosition of the button (0-based), for button components.
Values of the variables, in order (or by parameter_name).
Show child attributes
Parameter type.
textcurrencydate_timeimagevideodocumentlocationpayloadcoupon_codeactionParameter name, for templates created with parameter_format: NAMED.
Text value.
Payload returned in the button webhook when a quick reply is tapped.
Coupon code of a copy_code button.
Show child attributes
Default text.
ISO 4217 currency code.
Amount multiplied by 1000.
Show child attributes
Default text.
Media to send. Use either id or link.
Show child attributes
Media ID from POST /{phone-number-id}/media. Required when link is not set.
Public http(s) URL of the media. Required when id is not set.
Caption. Not allowed for audio and sticker.
File name shown to the recipient. Documents only.
Media to send. Use either id or link.
Show child attributes
Media ID from POST /{phone-number-id}/media. Required when link is not set.
Public http(s) URL of the media. Required when id is not set.
Caption. Not allowed for audio and sticker.
File name shown to the recipient. Documents only.
Media to send. Use either id or link.
Show child attributes
Media ID from POST /{phone-number-id}/media. Required when link is not set.
Public http(s) URL of the media. Required when id is not set.
Caption. Not allowed for audio and sticker.
File name shown to the recipient. Documents only.
Responses
200Message accepted.
Always whatsapp.
Show child attributes
The to you sent.
WhatsApp ID of the recipient.
Show child attributes
Message ID (wamid). Status webhooks refer to it.
Template messages only: accepted.
accepted400Invalid request. The body follows the Graph API error envelope; code identifies the error (for example 100 invalid parameter, 131009 parameter value not valid).
Show child attributes
Human-readable error message, for WhatsApp errors prefixed with (#code).
Exception type.
"OAuthException"Error code. See the error codes reference.
More specific code, when there is one (for example 33 for objects that do not exist or are not visible to the token, 460 for revoked tokens, 2388024 for duplicate templates).
Title meant to be shown to the end user.
Message meant to be shown to the end user.
Show child attributes
Always whatsapp.
Details about the error.
Trace ID. Include it when you contact support.
401Missing, invalid or revoked access token (190; a revoked token adds error_subcode: 460). A missing token answers 400 with code 104.
Show child attributes
Human-readable error message, for WhatsApp errors prefixed with (#code).
Exception type.
"OAuthException"Error code. See the error codes reference.
More specific code, when there is one (for example 33 for objects that do not exist or are not visible to the token, 460 for revoked tokens, 2388024 for duplicate templates).
Title meant to be shown to the end user.
Message meant to be shown to the end user.
Show child attributes
Always whatsapp.
Details about the error.
Trace ID. Include it when you contact support.