Publish the draft as a new, immutable version. A draft becomes active (if the organization has an approval threshold and the trigger can reach more contacts than that: 202, `pending_approval` until someone else approves it); contacts already inside stay on their version
const url = 'https://api.replifier.com/v1/flows/flw_01hx0000000000000000000000:publish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/flows/flw_01hx0000000000000000000000:publish \ --header 'Content-Type: application/json' \ --data '{ "note": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
flw_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "note": "example"}Responses
Section titled “Responses”Flow after the action
object
object
object
If awaiting approval: what was requested (activate, version or resume), by whom, and the estimated reach against the threshold. With version the flow stays active or paused on its previous version until the new one is approved
object
Unified status with reason (if applicable) and recommended action as i18n keys, same as Campaign.statusInfo
object
Full i18n key of the reason (e.g. flow.pause_reason.manual or flow.approval_reason.activate); null if not applicable
Full i18n key of the recommended action (e.g. flow.action.resume_or_archive)
Example
{ "status": "draft", "approval": { "kind": "activate" }, "statusInfo": { "status": "draft" }}Awaiting approval: the flow stays pending_approval and does not run
object
object
object
If awaiting approval: what was requested (activate, version or resume), by whom, and the estimated reach against the threshold. With version the flow stays active or paused on its previous version until the new one is approved
object
Unified status with reason (if applicable) and recommended action as i18n keys, same as Campaign.statusInfo
object
Full i18n key of the reason (e.g. flow.pause_reason.manual or flow.approval_reason.activate); null if not applicable
Full i18n key of the recommended action (e.g. flow.action.resume_or_archive)
Example
{ "status": "draft", "approval": { "kind": "activate" }, "statusInfo": { "status": "draft" }}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}