Create or clone Flow
Creates a Flow in DRAFT, or clones an existing one. Answers 201 with {id, metaFlowId} — the two fields only, not the whole Flow. Accepts exactly name, categories and cloneFromFlowId: any other key is REFUSED with 400 FLOW_UNKNOWN_FIELDS, never ignored, so {"status":"PUBLISHED"} cannot answer 201 and let you conclude you published. The number and its WABA come from the key — sending whatsappNumberId, wabaId or metaWabaId is 400 FLOW_NUMBER_FROM_KEY. Permission flows:manage (ADMIN and above).
Requires a number-scoped key. A tenant-scoped key must name the number with the x-whatsapp-number-id header, or it gets 403 TENANT_SCOPE_NOT_ALLOWED.
Authorizations
Your ps_ API key
Body
Flow name. Non-empty; trimmed.
1"Agendamento v2"
One or more of Meta's closed set. A value outside it is 400 FLOW_CATEGORY_INVALID.
1SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER The LOCAL id of the source Flow — the id field GET /v1/flows returns, never the metaFlowId. Confusing the two is the natural mistake and we cannot detect it for you: both are opaque strings, and Meta answers with its own error. metaFlowId is also nullable (a draft never pushed), so an id from Meta would have nothing to resolve. Omit to create from scratch; null is refused.
"cmf1a2b3c4d5e6f7g8h9i0j1"
Response
Flow created in DRAFT