Skip to main content

Publishing

Before a flow can be sent, it has to exist on WhatsApp. This takes two steps:

  1. Push a valid version. SendSeven uploads it to WhatsApp as a draft. WhatsApp checks it and reports any errors.
  2. 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.

MethodEndpointScope
GET/whatsapp-flows/publish-targetswhatsapp_flows:read
GET/whatsapp-flows/{id}/publicationswhatsapp_flows:read
POST/whatsapp-flows/{id}/publicationswhatsapp_flows:write
POST/whatsapp-flows/publications/{publication_id}/publishwhatsapp_flows:write
POST/whatsapp-flows/publications/{publication_id}/deprecatewhatsapp_flows:write
POST/whatsapp-flows/publications/{publication_id}/refresh-previewwhatsapp_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-…"
}'
FieldNotes
channel_ids1–50 WhatsApp channels. They are grouped by WABA, so two numbers on the same WABA create one publication.
version_idOptional. 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".

Publishing cannot be undone

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:

StatusMeaning
DRAFTPushed, not yet live.
PUBLISHEDLive and sendable.
DEPRECATEDStopped.
BLOCKEDWhatsApp blocked the flow, usually because its data endpoint was unhealthy.
THROTTLEDWhatsApp 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​

StatusCodeCause
403feature_not_availableDynamic flow on a plan without dynamic flows.
404channel_not_foundOne of channel_ids does not exist (details.ids).
404publication_not_foundUnknown publication.
409dynamic_not_supported_on_coexistenceDynamic flows cannot run on a Coexistence number. Use a static flow or another number.
409channel_waba_missingThe WhatsApp channel has no WABA. Reconnect it.
409CHANNEL_DISCONNECTEDNo connected number serves this publication any more.
409version_invalidThe version has validation errors.
409version_missingThe flow has no saved version.
409meta_validation_errorsWhatsApp reported errors in the draft.
409not_a_draftOnly a draft can be published.
409not_publishedOnly a published flow can be deprecated.
409flow_archivedThe flow is archived.
409read_onlyFlows imported from WhatsApp are read-only in SendSeven.
502meta_api_error, preview_unavailableWhatsApp returned an error. Retry later.