50% OFF with code BLACKFRIDAY5020% OFF with code BLACKFRIDAY20
Integrations & APIGrowth / Pro and up

API: list and send WhatsApp templates

Two endpoints let your software use your WhatsApp templates. GET /api/v1/whatsapp/templates lists your approved templates, and POST /api/v1/whatsapp/send-template sends one to a customer from your default number. Both need a key with WhatsApp access.

Where
Ask Menuthere support for a key
Plan
Needs a connected WhatsApp Business number, which starts on Starter / Pro.
Updated

List your templates

curl 'https://menuthere.com/api/v1/whatsapp/templates' -H 'Authorization: Bearer ck_live_YOUR_KEY'

It returns the approved templates on your default number, so you know the exact name and how many values each one needs.

FieldMeaning
name, languageThe template's name and language code.
category, statusCategory such as MARKETING or UTILITY. Status is APPROVED.
body_variablesHow many {{n}} values the body needs.
has_header, header_formatWhether there is a header, and TEXT, IMAGE, VIDEO or DOCUMENT.

Send a template

POST /api/v1/whatsapp/send-template with a JSON body. The message goes out from your default sender, set under Several numbers and the primary number. You cannot choose the number in the call.

FieldRequiredWhat it is
toYesThe customer's number with country code.
template_nameYesThe name from the list call.
languageNoLooked up from the approved template if you leave it out.
body_paramsNoArray of values for {{1}}, {{2}} and so on, in order.
header_paramsNoArray of values for a text header.
header_media_url, header_media_typeNoA link and image, video or document for a media header.
button_paramsNoArray of values for a dynamic URL button.
idempotency_keyNoA reference you choose. id and an Idempotency-Key header work too.

A successful send returns ok: true, the message_id, the to number and status: "sent". If you send the same idempotency key again, you get the first result back with duplicate: true and nothing is sent twice. A failed send releases the key so you can retry.

Errors and limits

Status`error`Meaning
400missing_fields, invalid_json, invalid_number, template_errorA required field is missing, the number looks wrong, or the template is wrong for the values you sent.
404template_not_foundNo approved template with that name on your default number.
409recipient_opted_outThe customer replied STOP. No message is sent.
409in_progressA request with the same idempotency key is still running.
412no_whatsapp_numberNo default WhatsApp number is connected.
429daily_limit_reached, rate_limitedYour number's daily WhatsApp limit is used up, or the key is over its rate limit.
502send_failedWhatsApp could not be reached. Try again.
Good to knowEvery API send is a normal WhatsApp message, so Meta charges for it like any other. See What WhatsApp messages cost. A template must be approved before it can be sent. See Message templates.

Questions

Can I send a normal text message through the API?
No. The API sends approved templates only, which also reach customers outside the 24-hour window.
Will it message someone who opted out?
No. A customer who replied STOP is skipped and the call returns recipient_opted_out.

Can't find it? Email help@mail.menuthere.com or chat with us, 9 AM – 9 PM.Help centerPricingmenuthere.com