Send a WhatsApp message (template, text, image, document, location, buttons or list) to an E.164 number (credentials.manage, or an API key with whatsapp.send).
const url = 'https://api.replifier.com/v1/connections/whatsapp/pcn_01hx0000000000000000000000/send';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":"example","campaignId":"example","brandId":"example","contactId":"example","type":"template","templateName":"example","languageCode":"example","components":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/connections/whatsapp/pcn_01hx0000000000000000000000/send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": "example", "campaignId": "example", "brandId": "example", "contactId": "example", "type": "template", "templateName": "example", "languageCode": "example", "components": [ "example" ] }'Templates can be sent at any time. Every other type needs the 24-hour window opened by the recipient’s last message (422 whatsapp_window_closed otherwise). An API key must send the Idempotency-Key header (400 idempotency_key_required): a retry with the same key returns the stored response and never sends twice. Limits: per API key (120 messages per minute) and per number, following the Meta messaging tier (429 with Retry-After).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
pcn_01hx0000000000000000000000Header Parameters
Section titled “Header Parameters”Required when authenticating with an API key. Unique per message (for example a UUID).
Required when authenticating with an API key. Unique per message (for example a UUID).
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
object
object
object
object
Responses
Section titled “Responses”Send result
object
Example generated
{ "ok": true, "providerMessageId": "example", "providerCode": "example", "providerMessage": "example"}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Too many attempts
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}