Send WhatsApp Template
Send an approved WhatsApp template and record it in your inbox. The recipient is created as a contact automatically if they are not one already, with lead direction ‘outbound’.
Quick Example
Use Cases
- Transactional notifications: order confirmations, shipping updates, appointment reminders
- Re-opening a conversation: outside the 24-hour customer service window a template is the only thing WhatsApp allows
- Campaign attribution: pass
wa_campaign_idso the send, its delivery status and any follow-ups all roll up to one campaign - Enriching your CRM as you send: pass
metadataand the data you already have about this person is saved onto their contact, instead of being discarded after the send
What happens on your account
Ownership is verified
phone_number_id is checked against your WhatsApp Business Account. A number that is not yours returns 403, so a valid API key can never send from another customer’s number.The language is resolved
language_code, the language the template is actually approved in is used. Pass it explicitly to override.The message is recorded
A contact is created if needed
outbound. An existing contact is never reclassified.metadata is saved onto that contact
metadata keys matching your contact attributes are written in the same operation, so one call sends the template and populates the contact.Saving contact attributes with metadata
The data you already have about a person — their plan, their city, an order number — is usually worth keeping after the send. Pass it as metadata and it is saved onto that recipient’s CRM contact, exactly the way extra columns in a campaign CSV are.
400 rather than truncated — silently shortening a value would put corrupted data in your CRM with no way to tell.
metadata vs components. components fills the template’s variables for this one message. metadata is saved on the contact and persists. They are separate on purpose: a value in components is not stored on the contact, and metadata is never sent to WhatsApp. Send a value in both if you want it to do both.Delivery status
The responsemessage_id is WhatsApp’s wamid. Delivery is asynchronous, and a 200 here does not mean the user received the message.
sent and only delivered or read confirms it arrived. To read the current status, use Get WhatsApp Messages, or subscribe to the message_status_updated webhook event.
Errors worth handling
400 with a whatsapp_error object
400 with a whatsapp_error object
message field carries Meta’s own reason, which is specific — a wrong template name, a variable count that does not match the approved template, or a field over its length limit (footer max 60 characters, body max 1024). Fix the payload rather than retrying.403 phone_number_id does not belong to this account
403 phone_number_id does not belong to this account
400 WhatsApp Business Account not linked
400 WhatsApp Business Account not linked
wabaId. Complete WhatsApp onboarding first.400 metadata must be an object / too many keys / value too long
400 metadata must be an object / too many keys / value too long
metadata has to be a JSON object of {attribute_name: value}, with at most 50 keys and values of at most 1000 characters. Note that an undefined attribute name is not an error — it is ignored and reported in metadata_ignored.Authorizations
API key from https://callkaro.ai/dashboard/api-key
Body
WhatsApp phone number ID you are sending from. Must belong to your WABA.
Recipient, digits only including country code.
Name of an approved WhatsApp template.
Defaults to the language the template is actually approved in when that can be resolved, otherwise "en".
Meta template components (variable values). Same shape Meta's own send API takes.
Optional. Tags the stored message with one of your agents.
Optional campaign to attribute this send to. 1-64 characters of letters, digits, '_' or '-'. Alias: waCampaignId. Follow-ups triggered by this message inherit it.
Optional. Contact attributes to save onto the recipient's CRM contact, as {attribute_name: value}. The attribute must already be defined on your account; keys matching no definition are ignored and listed in metadata_ignored. Name matching ignores case, spaces, underscores and hyphens. Blank values are skipped, and a value edited by hand in the CRM is never overwritten. Max 50 keys, each value max 1000 characters. Nothing is written if the send fails.
Optional. Stored verbatim on the message row. Unlike metadata, this is not written to the contact.
Response
Template sent
"success"
"Template sent"
WhatsApp message ID (wamid) of the sent message.
Attribute names from metadata that were saved onto the contact.
metadata keys that matched no attribute definition and were dropped. The send still succeeded -- check this on first integration to catch a mistyped name.