Publishing
Before a flow can be sent, it has to exist on WhatsApp. This takes two steps:
- Push a valid version. SendSeven uploads it to WhatsApp as a draft. WhatsApp checks it and reports any errors.
- Publish the draft. From now on, it can be sent.
A flow is published per WhatsApp Business Account (WABA), not per phone number. SendSeven keeps one publication per WABA. All numbers of that WABA can send the published flow.
| Method | Endpoint | Scope |
|---|---|---|
GET | /whatsapp-flows/publish-targets | whatsapp_flows:read |
GET | /whatsapp-flows/{id}/publications | whatsapp_flows:read |
POST | /whatsapp-flows/{id}/publications | whatsapp_flows:write |
POST | /whatsapp-flows/publications/{publication_id}/publish | whatsapp_flows:write |
POST | /whatsapp-flows/publications/{publication_id}/deprecate | whatsapp_flows:write |
POST | /whatsapp-flows/publications/{publication_id}/refresh-preview | whatsapp_flows:write |
Choose channels
GET /whatsapp-flows/publish-targets lists your WhatsApp channels with their WABA and whether they can run dynamic flows (supports_dynamic).
Push
curl -X POST https://api.sendseven.com/api/v1/whatsapp-flows/0f9e8d7c-…/publications \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"channel_ids": ["8c1d0f5e-…", "77aa31b0-…"],
"version_id": "a1b2c3d4-…"
}'
| Field | Notes |
|---|---|
channel_ids | 1–50 WhatsApp channels. They are grouped by WABA, so two numbers on the same WABA create one publication. |
version_id | Optional. Defaults to the flow's current version. The version must be valid. |
Response 200:
{
"items": [
{
"id": "pub_3c9e…",
"definition_id": "0f9e8d7c-…",
"waba_id": "102938475610293",
"waba_name": "Example GmbH",
"channel_ids": ["8c1d0f5e-…", "77aa31b0-…"],
"meta_flow_id": "1234567890123456",
"meta_flow_name": "Rückruf anfordern",
"meta_status": "DRAFT",
"health_status": null,
"pushed_version_id": "a1b2c3d4-…",
"pushed_version_number": 3,
"published_version_id": null,
"published_version_number": null,
"validation_errors": [],
"preview_url": null,
"preview_expires_at": null,
"last_error": null,
"last_synced_at": "2026-10-03T09:30:00Z",
"published_at": null,
"deprecated_at": null,
"created_at": "2026-10-03T09:30:00Z",
"updated_at": "2026-10-03T09:30:00Z"
}
]
}
When you push to several WABAs and only some fail, the successful publications are in items and the failures in errors:
{
"items": [ … ],
"errors": [
{
"waba_id": "556677889900112",
"channel_ids": ["77aa31b0-…"],
"code": "meta_api_error",
"message": "…",
"details": {}
}
]
}
If every WABA fails, the request fails with that error.
For a dynamic flow, the push also registers SendSeven's managed endpoint and the encryption key with WhatsApp. You do not need to do anything for this.
WhatsApp's validation
WhatsApp validates the draft itself. Its findings are stored in validation_errors on the publication; they do not fail the push. A draft with validation_errors cannot be published (409 meta_validation_errors). Fix the doc, save a new version and push again.
Publish
curl -X POST https://api.sendseven.com/api/v1/whatsapp-flows/publications/pub_3c9e…/publish \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00"
Returns the publication with meta_status: "PUBLISHED".
WhatsApp does not allow changes to a published flow. To change it, save a new version and push again (see Updating a live flow). You can only stop a published flow by deprecating it.
Preview
POST /publications/{publication_id}/refresh-preview fetches a web preview link from WhatsApp and stores it in preview_url. The link is valid for about 30 days (preview_expires_at). Open it in a browser to click through the flow exactly as WhatsApp renders it, without sending it to a phone.
Updating a live flow
Push a new version to a WABA where the flow is already published:
- SendSeven creates a new draft on WhatsApp (its name gets a version suffix, for example
Rückruf anfordern v4). - The old version stays live and can still be sent until you publish the new draft.
- When you publish the new draft, the old flow is deprecated automatically.
Pushing to a WABA where the flow is still a draft simply replaces the draft's content.
Deprecate
curl -X POST https://api.sendseven.com/api/v1/whatsapp-flows/publications/pub_3c9e…/deprecate \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00"
A deprecated flow can no longer be sent. If a new draft sits on top of a live flow, deprecate stops the live flow and keeps the draft. Only a published flow can be deprecated (409 not_published).
To send the flow again later, push and publish again; this creates a new WhatsApp flow.
Statuses
meta_status follows WhatsApp:
| Status | Meaning |
|---|---|
DRAFT | Pushed, not yet live. |
PUBLISHED | Live and sendable. |
DEPRECATED | Stopped. |
BLOCKED | WhatsApp blocked the flow, usually because its data endpoint was unhealthy. |
THROTTLED | WhatsApp limits how often the flow can be sent. |
Status and health changes arrive as whatsapp_flow.status_changed and whatsapp_flow.health_changed webhooks. health_status is GREEN or RED for dynamic flows.
Errors
| Status | Code | Cause |
|---|---|---|
403 | feature_not_available | Dynamic flow on a plan without dynamic flows. |
404 | channel_not_found | One of channel_ids does not exist (details.ids). |
404 | publication_not_found | Unknown publication. |
409 | dynamic_not_supported_on_coexistence | Dynamic flows cannot run on a Coexistence number. Use a static flow or another number. |
409 | channel_waba_missing | The WhatsApp channel has no WABA. Reconnect it. |
409 | CHANNEL_DISCONNECTED | No connected number serves this publication any more. |
409 | version_invalid | The version has validation errors. |
409 | version_missing | The flow has no saved version. |
409 | meta_validation_errors | WhatsApp reported errors in the draft. |
409 | not_a_draft | Only a draft can be published. |
409 | not_published | Only a published flow can be deprecated. |
409 | flow_archived | The flow is archived. |
409 | read_only | Flows imported from WhatsApp are read-only in SendSeven. |
502 | meta_api_error, preview_unavailable | WhatsApp returned an error. Retry later. |