Create or replace the flow's record action
PUT/v1/flows/:flow_id/record-action
The API face of the editor's Records card: what completing this flow does to a register. A full replacement; 201 when the flow had no action, 200 when it had one. Omitting register_id uses the flow's own backing register, created and named after the flow the first time and reused after that. record_id_key must be an option list of the flow's current version bound to that register; label_key and every excluded_keys entry must be fields of that version (any named component, including pickers). update or create_or_update with a null record_id_key is allowed, and means only sends started from a record can aim the flow. Field-referencing settings need a version WhatsApp has processed: while the flow's version is still pending they are 422 validation_failed (no_processed_version); a field-free action (mode alone) is accepted at any time. Other errors[] codes: unknown, not_register_bound, not_applicable (a record_id_key with create), not_a_flow_register (a CSV register). The current version is the published one when there is one, else the newest. No Idempotency-Key: the request is a full replace, so retrying after a lost response lands on the same state; the only difference a retry sees is 200 where the first attempt would have said 201. Requires flows:write.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
- 415
- 422
- 429
Existing action replaced.
Action created, the register provisioned when none was named.
A malformed flow_id (code: invalid_parameter), or an unrecognised query parameter (code: unknown_parameter).
Missing, malformed, unknown, revoked, or expired key — one body for all of them (code: unauthorized), with WWW-Authenticate: Bearer realm="hop".
The key lacks the scope (code: insufficient_scope), named in WWW-Authenticate: Bearer error="insufficient_scope", scope="…".
No such flow, or no such register: nonexistent or another organisation's, one body either way.
code: unsupported_media_type: the body was not application/json.
code: validation_failed with errors[]: an unknown body key, an invalid mode, a setting that names no field or no bound option list (with a did-you-mean), a record_id_key on a create action, a CSV register, or field-referencing settings while the version is still pending.
Over a bucket. Obey Retry-After (seconds); RateLimit-* fields are informational.
Response Headers
Requests allowed in the current window. Informational.
Requests left in the current window. Informational.
Seconds until the window resets. Informational.
Seconds to wait before retrying. The binding contract.