Use the correct token family.
Automation sends use a line API token. Workspace actions use a workspace ID token. Do not mix them.
Agency templates
These templates are implementation contracts for agencies. Each one states what to build, which EZWhatsApp API surface to use, how replies return to the client workspace, and what acceptance evidence proves the workflow works.
Listen to Shopify, WooCommerce, ERP, or custom store events. Send transactional updates through POST /api/v1/messages/text or URL media through POST /api/v1/messages/media.
Customers can reply to the same WhatsApp line. Replies become visible in the shared inbox for the client's team.
Idempotency-Key: order:{storeOrderId}:ready
{
"to": "+972501234567",
"body": "Your order {orderNumber} is ready for pickup.",
"ctaUrlButton": {
"displayText": "Open order",
"url": "https://store.example.com/orders/{storeOrderId}"
}
}
Use calendar, booking, or CRM events to queue reminder text. Use one idempotency key per appointment and reminder stage.
Confirmations, cancellations, and reschedule requests return to the team inbox instead of being trapped in the automation tool.
Idempotency-Key: appointment:{appointmentId}:24h
{
"to": "+972501234567",
"body": "Reminder: your appointment is tomorrow at 10:30. Reply here if you need to reschedule."
}
conversationId so the integration can reply in-thread if needed.Capture qualified website form, ad lead, or landing-page data. Send the first WhatsApp follow-up through the line token, then let the client team take over inside EZWhatsApp.
A visible conversation with customer context. The agency does not need to build a custom inbox for sales handoff.
Idempotency-Key: lead:{leadId}:first-touch
{
"to": "+972501234567",
"body": "Hi {firstName}, thanks for your interest. A team member will help you here."
}
Use webhooks to receive inbound messages and status changes. Sync the conversation id, phone number, and relevant message metadata into the CRM.
CRM visibility without moving WhatsApp ownership out of EZWhatsApp. EZWhatsApp remains the shared workspace for the team.
POST /api/v1/webhooks
{
"targetUrl": "https://agency.example.com/ezw/webhook",
"events": ["messages.post", "statuses.post", "chats.post"],
"payloadFormat": "whapi",
"enabled": true
}
conversationId when present.Use the Platform customer-admin campaign surface for campaign workflows. Do not emulate campaigns by looping generic direct sends unless the product owner explicitly approves that scope.
Replies routed back into the workspace, with operational visibility for the team.
Use webhooks to detect inbound messages that match agency-defined escalation rules. Notify the client team in their own system, then keep the conversation in EZWhatsApp.
Urgent WhatsApp chats are surfaced faster without changing the source of truth for assignment, ownership, or conversation history.
Webhook event: messages.post
Agency action:
1. Validate X-EZW-Delivery-Id is new.
2. Read conversationId from payload if present.
3. Apply agency escalation rules.
4. Notify the client team.
5. If auto-replying, use conversationId with POST /api/v1/messages/text.
X-EZW-Delivery-Id.| Area | Handoff requirement | Evidence |
|---|---|---|
| Auth | Line token stored in the client/agency secret manager, not in tracked code. | Secret path or deployment variable name, without exposing the value. |
| Health | Automation checks /api/v1/health before production sends. |
Logged health response with sendable and state fields. |
| Idempotency | Every outbound attempt has a deterministic idempotency key. | Retry test proving no duplicate customer message. |
| Webhooks | Webhook handler stores delivery ids and returns 2xx only after accepted processing. | One inbound and one status event captured. |
| Workspace | Client team knows where replies appear and how to claim or assign work. | Visible conversation and client-side signoff. |
| Boundary | Unsupported asks are recorded as decisions, not hidden in code. | Scope note for campaigns, bots, CRM ownership, or compliance if relevant. |