API Docs

Workspace API for WhatsApp support inbox operations.

Use the EZW API to manage lines, staff, assignments, customer conversations, internal notes, and outbound replies from the same organization-scoped control layer used by the app.

Current API status

Built for controlled inbox integrations.

The public documentation describes the current customer workspace API. API-key provisioning and formal partner access are handled during onboarding; self-serve developer apps are not public yet.

Base URLhttps://app.ezw.solutions
AuthAuthorization: Bearer {idToken}
FormatJSON; multipart for image sends
ScopeSupport inbox, not bulk messaging
Quick start

Authenticate, read the inbox, then queue a reply.

1. Sign in

Use a workspace account to receive an ID token. Use that token as the bearer token for API calls.

curl -X POST https://app.ezw.solutions/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "owner@example.com",
    "password": "your-password"
  }'

2. Assign work

Assignment writes require the current conversation version, which prevents overwriting another user.

curl -X POST https://app.ezw.solutions/api/conversations/{conversationId}/assign \
  -H "Authorization: Bearer {idToken}" \
  -H "Content-Type: application/json" \
  -d '{
    "targetUserId": "{userId}",
    "expectedVersion": 7
  }'

3. Send a reply

Outbound sends require an idempotency key so retries do not create duplicate attempts.

curl -X POST https://app.ezw.solutions/api/lines/{lineId}/send \
  -H "Authorization: Bearer {idToken}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: send-2026-05-07-001" \
  -d '{
    "conversationId": "{conversationId}",
    "bodyText": "Thanks, I am checking this now."
  }'
Endpoint reference

Customer workspace endpoints.

Most endpoints require an organization principal. Returned resources are scoped by organization, actor role, line visibility, and conversation assignment rules.

Authentication

Sign in, refresh a session, and inspect the current principal.

POST/api/auth/login

Exchange workspace email and password for an ID token.

POST/api/auth/refresh

Exchange a refresh token for a fresh ID token.

GET/api/auth/session

Validate the bearer token and return the authenticated principal.

Workspace onboarding

Create the first organization record before billing and line setup.

POST/api/signup/organization

Create an organization, owner user, pending billing state, and allocated line slots.

WhatsApp lines

Create, connect, inspect, assign, restrict, and archive WhatsApp numbers.

GET/api/lines

List visible WhatsApp lines with lifecycle and sendability state.

POST/api/lines

Create a line and queue QR pairing for the new number.

POST/api/lines/{lineId}/qr

Request a fresh QR pairing command for an existing line.

GET/api/lines/{lineId}/qr

Read the current short-lived QR image data URL when one is available.

PUT/api/lines/{lineId}/assignment

Set or clear the default assignee for conversations on a line.

GET/api/lines/{lineId}/permissions

List explicit staff permissions for one line.

PUT/api/lines/{lineId}/permissions/{targetUserId}

Set whether a staff member can view and send from a line.

DELETE/api/lines/{lineId}/permissions/{targetUserId}

Clear explicit permissions back to the workspace default.

POST/api/lines/{lineId}/archive

Archive a line and stop it from being used for new work.

Inbox conversations

Read conversations, claim ownership, assign staff, edit contact names, and add internal notes.

GET/api/conversations

List conversations visible to the authenticated operator.

GET/api/conversations/{conversationId}/messages

Read the timeline for one conversation.

POST/api/conversations/{conversationId}/claim

Claim an unassigned conversation using expectedVersion conflict protection.

POST/api/conversations/{conversationId}/assign

Assign a conversation to another staff member using expectedVersion conflict protection.

PATCH/api/conversations/{conversationId}/contact

Update the internal display name for a customer contact.

GET/api/conversations/{conversationId}/notes

List internal-only notes for a conversation.

POST/api/conversations/{conversationId}/notes

Create an internal-only note that is never sent to WhatsApp.

Outbound replies

Queue operator replies from a connected line with durable idempotency.

POST/api/lines/{lineId}/send

Queue a text reply or one image attachment to an existing conversation or direct recipient.

Media access

Fetch signed URLs for archived customer media without exposing storage credentials.

GET/api/attachments/{attachmentId}/url

Create a short-lived signed media URL, with expiresInSeconds from 1 to 3600.

Team administration

Invite staff, update roles, disable users, and inspect access history.

GET/api/memberships

List active and invited workspace members.

POST/api/memberships

Invite a staff member with a supported organization role.

PATCH/api/memberships/{targetUserId}

Change a member role.

DELETE/api/memberships/{targetUserId}

Disable a member.

GET/api/audit-logs

Read organization audit events, optionally filtered by eventType.

Billing and live updates

Read billing state, start recovery checkout, and subscribe to workspace changes.

GET/api/billing/status

Read current billing state, policy, line slots, and seat counts.

POST/api/billing/recovery/checkout

Create a billing recovery checkout session when the workspace is restricted.

GET/api/live/stream

Open an authenticated Server-Sent Events stream for workspace updates.

Request rules

Operational guarantees and limits.

Idempotent writes

Outbound sends require the Idempotency-Key header. Line creation and QR commands accept an idempotencyKey body field when the caller needs retry-safe setup.

Conflict protection

Conversation assignment and claim calls require expectedVersion. If another operator changes the conversation first, the API returns a conflict instead of guessing.

Media handling

Outbound media sends currently support image attachments up to 25 MB. Archived inbound media is read through short-lived signed URLs.

Live updates

GET /api/live/stream opens an authenticated Server-Sent Events stream for durable refresh hints. Clients should still refetch the source endpoint after an event.

Errors

Common response statuses.

400

Invalid request body, query value, idempotency key, or send target.

401

Missing, expired, invalid, or unconfigured bearer token.

403

Authenticated user does not have the required workspace, role, or line permission.

404

The scoped organization resource was not found or is not visible to the caller.

409

Conflict, duplicate setup, stale expectedVersion, or non-sendable line state.

501

The deployment is missing a required source-of-truth service for that endpoint.

v1 boundary

EZW v1 is a support inbox and owner-control API for teams using their existing WhatsApp numbers. It does not expose campaign broadcasts, cold outbound lists, or a chatbot-first automation surface.

Request integration access