Overview v1
The PingDaily REST API lets you send and receive WhatsApp messages from your own applications using the WhatsApp Business account you have already connected inside PingDaily.
For read-only lead-system integrations, use GET /v1/messages,
GET /v1/contacts and GET /v1/whatsapp/account.
Sending messages is optional and is not required for inbound sync.
Base URL: https://api.pingdaily.app
All requests use JSON. All timestamps are ISO 8601 UTC.
Authentication
Every request must include an API key in the
Authorization header:
Authorization: Bearer pd_live_XXXXXXXXXXXXXXXXXXXXXXXX
Generate keys under Sidebar → API Access → API Keys after installing the API Access add-on. The plaintext key is shown once at creation time — copy it into your secret manager immediately.
Errors
All errors return JSON in the shape:
{
"detail": {
"code": "invalid_api_key",
"message": "API key is invalid or has been revoked."
}
}
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_payload | Body validation failed. |
| 401 | missing_api_key | No Authorization header. |
| 401 | invalid_api_key | Key unknown or revoked. |
| 403 | addon_required | API Access add-on not active. |
| 404 | template_not_found | Template name does not exist on your WABA. |
Send a message
POST /v1/messages
Provide exactly one of text (only inside the 24-hour customer-care window) or an approved template.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
| to | string | yes | E.164 phone, e.g. +919812345678 |
| text | string | either | Free-form text, max 4096 chars. |
| template | string | either | Approved template name. |
| language | string | no | Template language code (default en). |
| variables | string[] | no | Ordered substitutions for {{1}}..{{n}}. |
| button_variables | object | for dynamic URL buttons | Dynamic URL values keyed by zero-based button index, e.g. {"0": "login-token"}. Send the variable suffix/value, not the complete template URL. |
Example — free text
curl https://api.pingdaily.app/v1/messages \
-H "Authorization: Bearer $PINGDAILY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919812345678",
"text": "Hi Rahul, your invoice is ready."
}'
Example — template
curl https://api.pingdaily.app/v1/messages \
-H "Authorization: Bearer $PINGDAILY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919812345678",
"template": "invoice_due_reminder",
"language": "en",
"variables": ["Rahul", "INV-2091", "20 Aug 2026"]
}'
Example — Chopda login OTP with dynamic URL button
curl https://api.pingdaily.app/v1/messages \
-H "Authorization: Bearer $PINGDAILY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919812345678",
"template": "chopda_login_otp_v1",
"language": "en_US",
"variables": ["654321"],
"button_variables": {"0": "dynamic-url-value"}
}'
For button index 0, PingDaily generates a Meta
button component with sub_type: "url" and
passes dynamic-url-value as its text parameter.
Response
{
"ok": true,
"provider": "meta-user",
"provider_message_id": "wamid.HBg...",
"status": "sent",
"error": null
}
List messages
GET /v1/messages
Returns inbound messages received on your connected WhatsApp number. This endpoint is read-only and is the recommended historical sync source for lead systems.
Query parameters
| Param | Type | Default | Notes |
|---|---|---|---|
| limit | integer | 50 | 1–200. |
| before | ISO-8601 UTC | — | Return messages older than this timestamp. |
| after | ISO-8601 UTC | — | Return messages received after this timestamp for incremental sync. |
Example
curl "https://api.pingdaily.app/v1/messages?limit=20" \ -H "Authorization: Bearer $PINGDAILY_API_KEY"
Response
{
"data": [
{
"id": "0b9c...",
"direction": "inbound",
"contact_id": "7f2a...",
"from_phone": "+919812345678",
"message_type": "text",
"text": "Sure, sending it now.",
"provider_message_id": "wamid.HBg...",
"media": null,
"referral": {
"source_type": "ad",
"source_id": "2385...",
"headline": "August consultation offer"
},
"raw": {
"id": "wamid.HBg...",
"type": "text",
"referral": { "source_type": "ad" }
},
"received_at": "2026-08-20T09:31:20.512Z",
"created_at": "2026-08-20T09:31:20.512Z"
}
],
"next_cursor": "2026-08-20T09:31:20.512Z"
}
Click-to-WhatsApp referral data
When Meta includes Click-to-WhatsApp ad attribution on the inbound
webhook, PingDaily returns it as referral and also keeps
the original provider payload in raw. Meta only sends
referral/campaign fields when the user enters via a CTWA ad; normal
organic messages have referral: null.
List contacts
GET /v1/contacts
Returns contacts for the API key owner. Use this with
GET /v1/messages to hydrate a lead system before
processing new inbound replies.
Query parameters
| Param | Type | Default | Notes |
|---|---|---|---|
| limit | integer | 50 | 1–200. |
| before | ISO-8601 UTC | — | Return contacts updated before this timestamp. |
| updated_after | ISO-8601 UTC | — | Return contacts updated after this timestamp for incremental sync. |
Example
curl "https://api.pingdaily.app/v1/contacts?limit=100" \ -H "Authorization: Bearer $PINGDAILY_API_KEY"
Response
{
"data": [
{
"id": "7f2a...",
"name": "Rahul Sharma",
"phone": "+919812345678",
"email": "rahul@example.com",
"company_name": "Sharma Textiles",
"tags": ["lead"],
"metadata": {"auto_created_from_inbound": true},
"opted_out_at": null,
"last_inbound_at": "2026-08-20T09:31:20.512Z",
"created_at": "2026-08-20T09:31:20.512Z",
"updated_at": "2026-08-20T09:31:20.512Z"
}
],
"next_cursor": null
}
Connected WhatsApp account
GET /v1/whatsapp/account
Returns the WhatsApp Business Account and phone-number metadata PingDaily has cached from Meta for this account.
Example
curl https://api.pingdaily.app/v1/whatsapp/account \ -H "Authorization: Bearer $PINGDAILY_API_KEY"
Response
{
"connected": true,
"phone_number_id": "1216484484884364",
"waba_id": "919738311179258",
"display_phone_number": "+91 97262 98740",
"verified_name": "PingDaily",
"business_name": "EPAGESTORE",
"quality_rating": "HIGH",
"messaging_limit": "TIER_1K",
"phone_status": "CONNECTED",
"account_review_status": "APPROVED",
"name_status": "APPROVED",
"platform_type": "WHATSAPP_BUSINESS_APP",
"code_verification_status": "VERIFIED",
"connected_at": "2026-08-25T08:52:21.000Z",
"metadata_refreshed_at": "2026-08-25T08:52:21.000Z"
}
Webhook signature verification
PingDaily receives WhatsApp webhooks directly from Meta and verifies
X-Hub-Signature-256 using the configured Meta App Secret.
API Access integrations do not need to expose their own webhook endpoint
for phase-one read-only sync; poll /v1/messages and
/v1/contacts using timestamp cursors.
If PingDaily later adds partner outbound webhooks, they will be signed
with an HMAC header and documented separately. Today, the public API is
authenticated with Authorization: Bearer API keys.
List templates
GET /v1/templates
Returns every APPROVED template that lives on your own WhatsApp Business Account (BYO). Shared PingDaily catalog templates are intentionally not exposed here.
Example
curl https://api.pingdaily.app/v1/templates \ -H "Authorization: Bearer $PINGDAILY_API_KEY"
Response
{
"data": [
{
"name": "invoice_due_reminder",
"language": "en_US",
"category": "UTILITY",
"status": "APPROVED",
"source": "user"
}
]
}
Get a template
GET /v1/templates/{name}
Fetch a single template plus its variables. Use this to know
exactly how many values to pass in variables when
calling Send a message, and in what order. Only BYO
templates on your own WABA are returned.
Variable keys
- Body placeholders
{{1}}, {{2}}, ...get keys"1","2", ... - Header placeholders are prefixed
h("h1"). Headers are optional and only present on BYO templates. - The
variablesarray in the response is already in the correct order — pass values in that order to/v1/messages.
Example
curl https://api.pingdaily.app/v1/templates/invoice_due_reminder \ -H "Authorization: Bearer $PINGDAILY_API_KEY"
Response
{
"name": "invoice_due_reminder",
"language": "en_US",
"category": "UTILITY",
"status": "APPROVED",
"source": "user",
"display_name": "Invoice due reminder",
"header_type": "TEXT",
"header_text": "Hi {{1}}",
"body_text": "Your invoice {{1}} is due on {{2}}.",
"footer_text": "PingDaily",
"variables": [
{"key": "h1", "label": "Header \u00b7 Variable 1", "location": "header",
"placeholder": "1", "example": "Rahul", "required": true},
{"key": "1", "label": "Body \u00b7 Variable 1", "location": "body",
"placeholder": "1", "example": "INV-2091", "required": true},
{"key": "2", "label": "Body \u00b7 Variable 2", "location": "body",
"placeholder": "2", "example": "20 Aug 2026", "required": true}
],
"buttons": null
}
Then send it:
curl https://api.pingdaily.app/v1/messages \
-H "Authorization: Bearer $PINGDAILY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+919812345678",
"template": "invoice_due_reminder",
"language": "en_US",
"variables": ["Rahul", "INV-2091", "20 Aug 2026"]
}'
Roadmap
- Delivery status webhooks.
- Media send helpers.
Missing something? Email support@pingdaily.app.