Build against the current EZWhatsApp Platform API.
This is the public implementation reference for customers, agencies, and developers using EZWhatsApp. It covers the line-token Channel API, logged-in Workspace API, webhook setup, inbox reads, campaigns, contacts, Kanban status updates, and the operating boundaries that must not be guessed.
Send routes return 202 because delivery is asynchronous. Use a deterministic idempotency key for retry-safe sends.
curl -X POST 'https://app.ezw.solutions/api/v1/messages/text' \
-H 'Authorization: Bearer {lineApiToken}' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: client-order-123' \
-d '{
"to": "+972501234567",
"body": "Your order is ready"
}'
Base URLs
Production
Workspace API: https://app.ezw.solutions
Channel API v1: https://app.ezw.solutions/api/v1
Local operator runtime
Workspace API: http://127.0.0.1:3010
Channel API v1: http://127.0.0.1:3010/api/v1
Authentication
API family
Token
Use for
Do not use for
Channel API v1
Authorization: Bearer ezw_line_...
Machine-to-machine health, direct or group text sends, direct or group URL media sends, webhook configuration, and best-effort contact display-name updates by phone for one line.
Workspace admin/operator routes, team management, cross-line operations, campaigns, contact imports, or Kanban.
Workspace API
Authorization: Bearer {idToken}
Logged-in owner, admin, or operator work: lines, QR, tokens, webhooks, inbox, assignments, notes, image sends, contacts, campaigns, Kanban, billing, and signed media reads.
Channel API v1 routes.
Current support matrix
Capability
Endpoint
Auth
Status
Check line health
GET /api/v1/health
Line API token
Supported.
Send direct or group text
POST /api/v1/messages/text
Line API token
Supported. Direct/conversation text may include CTA URL; group text may not.
Send direct or group URL media
POST /api/v1/messages/media
Line API token
Supported for external URL image, video, audio, and document. No conversationId target on this route.
Configure line webhooks
GET/POST /api/v1/webhooks
Line API token
Supported for the current line.
Update contact display name by phone
PATCH /api/v1/contacts/by-phone
Line API token
Best-effort exact normalized-phone match on the current line. A miss is a successful no-op.
Create or rotate line token
POST /api/lines/{lineId}/api-token
Workspace ID token
Supported for allowed workspace users.
Request QR / reconnect line
POST /api/lines/{lineId}/qr
Workspace ID token
Supported when the line state allows QR request.
Workspace send
POST /api/lines/{lineId}/send
Workspace ID token
Supported for text, one image upload, or forwarding a stored message.
Read inbox data
GET /api/conversations, GET /api/conversations/{conversationId}/messages
Workspace ID token
Supported with organization and line visibility checks.
Contacts
GET/POST /api/contacts
Workspace ID token
Supported for owners/admins.
Campaigns
GET/POST /api/campaigns, POST /api/campaigns/{campaignId}/launch, POST /api/campaigns/{campaignId}/cancel
Workspace ID token
Supported for owners/admins in the scoped customer-admin campaign surface.
Supported as SSE hints only. Refetch DB APIs for truth.
Target model
Target
Fields
Allowed on
Rules
Direct phone recipient
to on Channel API, recipientPhoneNumber or phoneNumber on Workspace API
Channel text, Channel URL media, Workspace send.
Use an explicit phone number. Do not derive a phone number from provider-only ids.
WhatsApp group
groupId, group_id, groupJid, or group_jid
Channel text and Channel URL media only.
Must be an exact WhatsApp group JID ending in @g.us. Not a Workspace send target.
Existing Platform conversation
conversationId or conversation_id
Channel text and Workspace send.
Use this for replies to an existing Platform conversation. Channel URL media does not accept conversationId.
Check channel health
Use this before sending and before diagnosing automation failures. wakeup=false makes the check read-only; wakeup=true may queue a wakeup when the line needs one.
curl -X GET 'https://app.ezw.solutions/api/v1/health?wakeup=false&channel_type=web' \
-H 'Authorization: Bearer {lineApiToken}'
Direct recipient phone number. Use exactly one of to or groupId.
groupId, group_id, groupJid, or group_jid
Conditional
Exact WhatsApp group JID ending @g.us.
type or mediaKind
Yes
One of image, video, audio, or document.
media.url, mediaUrl, or url
Yes
External HTTP/HTTPS media URL. Localhost, loopback, and private IP targets are rejected.
media.mime_type, mimeType, or contentType
Yes
MIME type such as image/jpeg or application/pdf.
media.filename or fileName
Required for documents
Preserved as the document filename sent through the provider.
caption or body
No
Caption for image, video, or document media. Audio captions are ignored by the provider.
Workspace send
Workspace sends act as a logged-in user and enforce organization scope, line visibility, line sendability, and membership permissions. Idempotency-Key is required.
Reply to an existing conversation
curl -X POST 'https://app.ezw.solutions/api/lines/{lineId}/send' \
-H 'Authorization: Bearer {idToken}' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: workspace-send-001' \
-d '{
"conversationId": "{conversationId}",
"bodyText": "Thanks, I am checking this now."
}'
Send to a direct phone number
curl -X POST 'https://app.ezw.solutions/api/lines/{lineId}/send' \
-H 'Authorization: Bearer {idToken}' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: workspace-direct-001' \
-d '{
"recipientPhoneNumber": "+972501234567",
"bodyText": "Thanks, I am checking this now."
}'
Use exactly one target: conversationId or recipientPhoneNumber. phoneNumber is accepted as an alias.
Send content must be one of bodyText, one image in media, or forwardedFromMessageId.
Forwarded sends preserve the selected message content and cannot include replacement text, media, or CTA content.
Workspace multipart upload accepts one image file up to 25 MB. Generic documents, PDFs, video, audio, and arbitrary files are not supported on this route.
There is no Workspace API group send route.
Webhooks
Webhooks let customer or agency systems receive durable event deliveries for the configured line. Configure by line token or workspace token.
Deliveries include X-EZW-Webhook-Event, X-EZW-Line-Id, X-EZW-Webhook-Id, and X-EZW-Delivery-Id headers. Return any 2xx status to accept a delivery. Store delivery ids to make receivers idempotent.
Use workspace tokens for inbox reads. Routes are organization-scoped and enforce line visibility. SSE events are hints only; clients must refetch durable DB-backed APIs.
Contacts are customer organization data. A line API token can set the final operator-facing display name through an exact phone match on its own line. Owners and admins can separately list or import directory contacts.
Use an international number beginning with +. Platform searches only the line resolved from the token, updates every exact phone match, and never creates a contact. HTTP 200 with matched: false is an expected completed no-op.
External display-name updates are idempotent at the stored-value level: an exact match already holding the final name is not rewritten or audited again. For workspace imports, accepted row aliases include phone for phoneNumber, name for displayName, external_id for externalId, and semicolon/comma-separated string tags. Imports must contain 1 to 5000 rows.
Campaigns
Campaigns are a scoped customer-admin workflow for owners and admins. They are separate from inbox replies and direct-send loops. Do not use this surface for scraped, purchased, unrelated, or cold outbound recipient lists.
Required draft fields: name, lineId, bodyText, and recipientsCsv.
Optional fields: sourceFilename, minDelaySeconds, maxDelaySeconds, hourlyCap, and image file field image.
Campaign images must be PNG, JPEG, WebP, or GIF and 25 MB or smaller.
maxDelaySeconds must be greater than or equal to minDelaySeconds. hourlyCap must be positive.
A campaign can launch only from draft status and only when valid recipients exist. Terminal campaigns cannot be cancelled.
Kanban and conversation status
Kanban fields and conversation status changes are durable workspace state. Use expectedVersion when moving conversations so stale clients do not overwrite newer state.