Create a draft flow
const url = 'https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/flows';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","graph":{"triggers":[{"type":"list_subscribed","listId":"example","filter":{"additionalProperty":"example"}}],"goals":[{"condition":{"additionalProperty":"example"},"then":"exit","node":"example"}],"start":"example","nodes":{"additionalProperty":{"type":"example","config":"example","next":"example","timeoutNext":"example","branches":{"additionalProperty":"example"},"label":"example","ui":{"additionalProperty":"example"}}}},"settings":{"reentry":"after_exit","timezone":"example","gdprSafeSwitch":true},"templateId":"welcome","target":"example","email":{"connectionId":"example","fromEmail":"hello@example.com","fromName":"example","content":{"additionalProperty":"example"}},"subjects":["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/brands/brd_01hx0000000000000000000000/flows \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "graph": { "triggers": [ { "type": "list_subscribed", "listId": "example", "filter": { "additionalProperty": "example" } } ], "goals": [ { "condition": { "additionalProperty": "example" }, "then": "exit", "node": "example" } ], "start": "example", "nodes": { "additionalProperty": { "type": "example", "config": "example", "next": "example", "timeoutNext": "example", "branches": { "additionalProperty": "example" }, "label": "example", "ui": { "additionalProperty": "example" } } } }, "settings": { "reentry": "after_exit", "timezone": "example", "gdprSafeSwitch": true }, "templateId": "welcome", "target": "example", "email": { "connectionId": "example", "fromEmail": "hello@example.com", "fromName": "example", "content": { "additionalProperty": "example" } }, "subjects": [ "example" ] }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
brd_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Flow graph: start and nodes (id → node). See README, M9.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Re-enter after finishing (default after_exit). Never twice at the same time.
Time zone for contacts without a valid one (otherwise, the brand’s)
GDPR safe switch: the flow’s emails are not sent to contacts tagged gdpr without current consent (new flows are created with true; if missing, it is off)
Builds the graph from a template (see GET /v1/brands/{brand}/flow-templates). Excludes graph.
With templateId: the list (lst_…), segment (seg_…), contact date field or event name the trigger needs.
Sending data shared by the template’s emails: connection, sender and email content.
object
object
With templateId: one subject per template email, in order (emailCount).
Responses
Section titled “Responses”Flow
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" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}