WhatsApp messages
Send a template
Accepted, not delivered: delivery arrives later as message.status_changed or message.failed. It sends a message to a real person and cannot be undone: use dryRun=true first, which runs the same checks (template approved, variables, document, recipient allowlist, opt-out, WhatsApp number, human in control) and answers 200 with the message as it would be created, sending and saving nothing; its id is not saved. It checks opt-outs first: a contact that opted out answers 202 with status skipped and skipReason opted_out. With sendAt it is scheduled and can be canceled until it goes out. onReply.instructions is the context the agent gets if the contact answers.
Required scope: whatsapp:write.
query Parameters
dryRunWhen true, the request goes through the same validation as the real one and is answered with what would happen (always 200), and nothing is saved, sent or charged. The answer has the same shape as the real one plus dryRun: true; an id in it is not saved. It does not use the Idempotency-Key.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Send a template › Request Body
Exactly one of contactId, externalRef or phone.
templateIdThe document of the header, for templates that have one.
What the template needs besides its variables: image or video header, products, Flow data, cards.
sendAtSchedule it. Without it the message goes out now.
fromThe number to send from. By default the one that fits the template and the agent.
Send a template › Responses
dryRun=true: the message as it would be created; nothing is sent.
objectidstatustemplateIdcontactIdcaseIdsendAtskipReasonWhy it was skipped: opted_out, no_phone, template_not_approved, human_in_control, cooldown, not_allowed or canceled.
createdAtdryRunPresent and true when the request had dryRun=true.
Retrieve a template message
status: queued, scheduled, sent, delivered, read, failed (with failure.code from WhatsApp), skipped (with skipReason) or canceled.
Required scope: whatsapp:read.
path Parameters
id^wam_[0-9A-Za-z]{22}… · requiredThe id of the whatsapp message (wam_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a template message › Responses
objectidstatustemplateIdcontactIdcaseIdsendAtskipReasonWhy it was skipped: opted_out, no_phone, template_not_approved, human_in_control, cooldown, not_allowed or canceled.
createdAtCancel a scheduled message
Only a message that has not gone out yet. One already sent answers 409.
Required scope: whatsapp:write.
path Parameters
id^wam_[0-9A-Za-z]{22}… · requiredThe id of the whatsapp message (wam_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Cancel a scheduled message › Responses
objectidstatustemplateIdcontactIdcaseIdsendAtskipReasonWhy it was skipped: opted_out, no_phone, template_not_approved, human_in_control, cooldown, not_allowed or canceled.
createdAt