API reference
REST API for journeys, broadcasts, templates, contacts, and billing. Auth, errors, idempotency, rate limits, and a per-endpoint reference.
Last updated: September 30, 2026

Base URL
Production: https://api.dialogplus.ai
Sandbox: https://sandbox.dialogplus.ai — same API surface, mock data, no Meta send-out. Use this for end-to-end testing.
Authentication
Every request authenticates with a Bearer token. There are two token types:
- API keys — long-lived, org-scoped, revocable. Create under Settings → Security → API keys. Use for backend integrations.
- Session JWTs — short-lived (24h default), user-scoped. Issued by
POST /api/auth/login. Use for dashboards / SPAs.
curl https://api.dialogplus.ai/api/journeys \
-H "Authorization: Bearer dpk_live_XXXXXXXXXXXX"
Errors
Every error returns a JSON body with a detail string. HTTP status codes are used semantically:
| Code | Meaning |
|---|---|
| 200 / 201 / 204 | Success. |
| 400 | Validation error. Body has detail describing the failed field. |
| 401 | Missing / invalid token. |
| 402 | Payment required — e.g. wallet underfunded for an upgrade. |
| 403 | Token is valid but lacks permission for this resource. |
| 404 | Resource not found in your org. Resources in other orgs return 404, never 403. |
| 409 | Conflict — e.g. duplicate idempotency key, conflicting state. |
| 410 | Endpoint disabled in this environment (e.g. dev-only routes in prod). |
| 422 | Schema validation failure (Pydantic). |
| 429 | Rate-limit or fraud-velocity guard tripped. |
| 502 / 503 | Upstream provider (Meta, payment gateway) unreachable. Safe to retry. |
Idempotency
All POST endpoints that create resources accept an Idempotency-Key header. Re-sending the same key within 24 hours returns the original response without creating a duplicate. Use a v4 UUID per logical operation.
curl -X POST https://api.dialogplus.ai/api/broadcast \
-H "Authorization: Bearer dpk_live_XXXXXXXXXXXX" \
-H "Idempotency-Key: 9d4f3b56-21c4-4b58-9a92-5b8e3f9c0e7a" \
-H "Content-Type: application/json" \
-d '{"template_id":"...","audience":"all"}'
Rate limits
Default per-org limit: 100 requests / minute. Burst-tolerant token bucket (you can briefly hit 200 rpm). Limits per endpoint group:
- Read endpoints (
GET) — 600/min. - Write endpoints (POST/PUT/PATCH/DELETE) — 100/min.
- Broadcast send — paced internally by Meta's tier limit; the API call returns immediately.
- Auth endpoints — 10 attempts / minute / IP.
Exceeding the limit returns 429 with a Retry-After header (seconds). Higher quotas available on Enterprise.
Pagination
List endpoints accept limit and offset query params. Default limit: 50, max: 200. The response wraps items in { items, limit, offset, total? }. Some hot-path lists use cursor-based pagination instead — they return a next_cursor field; pass it back as cursor on the next call.
Resources
Journeys
GET /api/journeys— list journeys.POST /api/journeys— create a journey from JSON.GET /api/journeys/{id}— fetch one.PUT /api/journeys/{id}— replace the journey body (creates a new version).POST /api/journeys/{id}/activate— toggle live.GET /api/journeys/{id}/versions— version history.GET /api/journeys/{id}/export— export as JSON.
Broadcasts
POST /api/broadcast— create a broadcast.POST /api/broadcast/{id}/send— launch it.POST /api/broadcast/{id}/pause//resume//cancel.GET /api/broadcast/{id}/audience-count— pre-compute audience size.GET /api/broadcast/stats— aggregate delivery stats.
Templates
GET /api/templates— list approved + pending templates.POST /api/templates— submit a new template to Meta.POST /api/templates/sync— pull latest status from Meta.POST /api/templates/ai-assist— AI-draft a template from a description.
Contacts
GET /api/contacts/POST /api/contacts/PUT /api/contacts/{phone}.POST /api/contacts/upload— CSV bulk import (returns a job id).POST /api/contacts/{phone}/tags— add/remove tags.
Billing
GET /api/billing/overview— wallet + plan + MTD spend in one call.POST /api/billing/wallet/recharge/order— create a gateway recharge intent.POST /api/billing/wallet/refund— request a refund on unused balance.POST /api/billing/subscription/checkout— change plan with proration.GET /api/billing/invoices/GET /api/billing/invoices/{id}/pdf.
SDKs
Official clients are coming for Node, Python, Go, and PHP. Until then any HTTP client works — the API is REST + JSON. The OpenAPI spec is published at https://api.dialogplus.ai/openapi.json.
What's next
- Webhooks — receive events from us.
- Integrations — Razorpay, Stripe, Zapier.
- Security & RBAC — token scoping, allowlist, audit log.
Official Meta documentation
Our REST surface mostly translates into Meta Graph API calls. When you need to know the exact field a Meta endpoint returns, or you're working with a feature we don't yet expose, go to the source:
- WhatsApp Cloud API reference — the endpoints we wrap.
- Meta Graph API overview — auth, versioning, rate limits.
- WhatsApp error codes — what each Meta error means and how to recover.
- Business Management API — WABAs, phone numbers, templates.
- WhatsApp Flows — interactive forms inside chat.