Send Template Messages API · WABPO Developer Documentation
WABPO-docs / Docs / Template Messaging / Send Template Messages API Send Template Messages API Learn how to dispatch single or bulk transactional and marketing messages from your CRM or ERP backend using WABPO. Includes structural payload examples, variable mapping, validation rules, and error handling for approved Meta templates.
Send Template Messages Use this endpoint to send outbound WhatsApp template messages from your internal backend or CRM system. Each dispatched message is logged under a unified integration campaign, allowing customers to view consolidated delivery and performance analytics directly within their WABPO dashboard.
HTTP Method: POST URL: https://api.wabpo.com/api/v1/public/campaigns/:campaignId/messages/template Headers: HTTP Authorization: Bearer YOUR_API_KEY Content-Type: application/json Not finding what you are looking for? Chat with us or send us an email.
© 2026 WABPO-docs Help Center
Crafted with love by Spadasoft
⚠️
Prerequisites:
Messaging will fail with an error response if the target phone number is not fully connected via Meta or if the requested
templateId
has not achieved an
APPROVED
status.
Path Parameters Parameter Type Required Description campaignId String Yes The unique campaign identifier returned during project creation. Groups message metrics together.
Request Payload Fields Field Type Required Description projectId String Yes The unique identifier for the customer workspace. templateId String Yes The approved WABPO template ID used to format the message. recipients Array Yes A list of recipient objects containing destination phone numbers and variable data.
Recipient Object Attributes
Field Type Required Description number String Yes Target phone number including country code, with or without a leading plus sign (e.g., "923089049255"). idempotencyKey String Recommended Unique string generated per recipient to prevent duplicate sends if your CRM retries a timed-out network request. externalReference String No Custom tracking ID from your own database to map downstream delivery webhooks back to your local records. {{variable_name}} String Conditional Pass custom key-value pairs matching any dynamic placeholders defined in your template text (e.g., "first_name": "Saif").
Code Implementation Examples Example A: Send Single Message with Dynamic Variables
{
"projectId": "PROJECT_ID",
"templateId": "TEMPLATE_ID",
"recipients": [
{
"number": "923089049255",
"first_name": "Saif",
"last_name": "Alam",
"order_number": "ORD-1001",
"externalReference": "order-1001",
"idempotencyKey": "order-1001-template-v1"
}
]
}
Example B: Bulk Send to Multiple Recipients
When processing bulk batches, ensure each recipient block contains a distinct idempotencyKey . If a network interruption occurs mid-batch, your system can safely resend the entire payload without messaging the same customer twice.
{
"projectId": "PROJECT_ID",
"templateId": "TEMPLATE_ID",
"recipients": [
{
"number": "923089049255",
"first_name": "Saif",
"last_name": "Alam",
"order_number": "ORD-1001",
"externalReference": "order-1001",
"idempotencyKey": "order-1001-template-v1"
},
{
"number": "923316800069",
"first_name": "Ali",
"last_name": "Khan",
"order_number": "ORD-1002",
"externalReference": "order-1002",
"idempotencyKey": "order-1002-template-v1"
}
]
}
Response Handling Example: Success Response ( 200 OK )
A 200 OK indicates that WABPO accepted the batch and queued the items for delivery via Meta's infrastructure.
{
"success": true,
"data": {
"batchId": "BATCH_UUID_STRING",
"totalQueued": 2,
"status": "processing",
"details": [
{
"number": "923089049255",
"messageId": "MSG_ID_1",
"status": "queued",
"idempotencyMatch": false
},
{
"number": "923316800069",
"messageId": "MSG_ID_2",
"status": "queued",
"idempotencyMatch": false
}
]
}
}
Example: Idempotency Block Response ( 200 OK )
If a request is resent using a key that was successfully processed in a prior transaction, WABPO skips sending a new message and returns the original message log metadata with idempotencyMatch: true .
{
"success": true,
"data": {
"batchId": "BATCH_UUID_STRING",
"totalQueued": 1,
"status": "processed",
"details": [
{
"number": "923089049255",
"messageId": "MSG_ID_1",
"status": "sent",
"idempotencyMatch": true
}
]
}
}
Error Codes and Troubleshooting HTTP Status Error Code Reason / Mitigation 400 INVALID_PAYLOAD Missing standard structural fields like projectId or missing custom template template variables (e.g., defined {{order_number}} but did not pass it). 403 PROJECT_SUSPENDED The workspace has been disabled due to billing failures or Meta policy violations. 404 TEMPLATE_NOT_FOUND The specified templateId does not exist or belongs to a different project. 422 TEMPLATE_NOT_APPROVED The template exists but its status is currently marked as DRAFT, PENDING, or REJECTED. 429 RATE_LIMIT_EXCEEDED Your CRM backend is sending requests faster than allowed by your current tier limits. Back off and retry with an exponential delay.