API Reference
Send a message
/{phone-number-id}/messageshttps://whatsapp.mimicr.dev/v24.0 · provider: https://graph.facebook.com/v24.0Sends a message to a WhatsApp user: text, template, media, interactive, location, contacts or reaction. The response only means the message was accepted; delivery is reported asynchronously by the messages webhook with statuses (sent, delivered, read or failed with an error).
Free-form messages (anything but templates) need an open customer service window: the user must have messaged you in the last 24 hours. Outside it, the request is accepted and the status webhook reports failed with 131047.
In Mimicr, what happens after acceptance depends on the recipient: test numbers follow their persona and the sandbox mode, other numbers follow the audience rules. See the sandbox testing guide.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Path parameters
WhatsApp Business phone number ID.
"424361664134261"Body
application/jsontext
Messaging 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.
textShow child attributes
Message text, up to 4096 characters. URLs are allowed.
Renders a link preview for the first URL in body.
template
Messaging 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.
image | audio | video | document | sticker
Messaging 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.
imageaudiovideodocumentstickerMedia 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.
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.
interactive
Messaging 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.
interactiveShow child attributes
Interactive message type.
buttonlistcta_urlflowlocation_request_messageproductproduct_listcatalog_messageShow child attributes
Header type.
textimagevideodocumentHeader text, up to 60 characters.
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.
Show child attributes
Body text: up to 1024 characters for button, 4096 for the others. Required except for product.
Show child attributes
Footer text, up to 60 characters.
Show child attributes
button: 1 to 3 reply buttons.
Show child attributes
Always reply.
replyShow child attributes
Unique button ID, up to 256 characters. Returned in the button_reply webhook.
Button label, up to 20 characters.
list: label of the button that opens the list, up to 20 characters.
list: 1 to 10 sections with at most 10 rows in total.
Show child attributes
Section title, up to 24 characters. Required with more than one section.
Show child attributes
Unique row ID, up to 200 characters.
Row title, up to 24 characters.
Row description, up to 72 characters.
cta_url, flow or send_location, matching the interactive type.
Show child attributes
cta_url: button label, up to 20 characters.
cta_url: URL opened by the button.
flow: Flow ID (or flow_name).
flow: button label, up to 20 characters.
flow: token returned in the nfm_reply webhook.
flow: navigate or data_exchange.
location
Messaging 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.
locationShow child attributes
Latitude.
Longitude.
Location name.
Address.
contacts
Messaging 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.
contactsContact cards.
Show child attributes
Show child attributes
Full name, required.
First name.
Show child attributes
Phone number.
CELL, HOME, WORK…
WhatsApp ID.
Show child attributes
E-mail.
HOME or WORK.
reaction
Messaging 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.
reactionShow child attributes
wamid of the message to react to.
Emoji. An empty string removes the reaction.
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 message. Common codes: 100 (missing or invalid parameter), 131009 (parameter value not valid), 131051 (unsupported type), 132000 (template parameter count mismatch), 132001 (template does not exist or is not approved), 132015/132016 (template paused/disabled), 133010 (number not registered), 131056 (pair rate limit), 130429 (throughput reached).
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.