Update a flow definition by id
Update a flow definition by id. This endpoint replaces the existing flow definition. If `flow_definition.status` is omitted, the current status is preserved
Update a flow definition by id. This endpoint replaces the existing flow definition.
If flow_definition.status is omitted, the current status is preserved
Authorization
oauth2 flow_definitions.writeIn: header
Scope: flow_definitions.write
Path Parameters
The id returned by the POST /flow_definitions endpoint.
Query Parameters
The project id to filter by.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Replaces the existing flow definition.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/flow_definitions/fd_123abc456def?project_id=river-8421" \ -H "Content-Type: application/json" \ -d '{ "flow_definition": { "name": "standard-login", "status": "active", "user_schema": "sch_01KWHF18816ZQESRCS7Z2STJ05", "purposes": { "login": "identify" }, "steps": [ { "name": "identify", "fields": [ "email" ], "actions": [ { "name": "submit", "kind": "submit", "primary": true } ], "transitions": { "submit": { "target": "authenticate" }, "user_not_found": { "target": "register", "action": "switch" } } }, { "name": "authenticate", "fields": [ "password" ], "actions": [ { "name": "submit", "kind": "submit", "primary": true } ], "transitions": { "submit": { "target": "done" } } }, { "name": "done", "complete": "redirect" } ] } }'{ "id": "fd_123abc456def", "project_id": "proj_789ghi012jkl", "flow_definition": { "name": "standard-login", "status": "active", "user_schema": "sch_01KWHF18816ZQESRCS7Z2STJ05", "purposes": { "login": "identify" }, "audience": { "app_ids": [ "app_saas" ] }, "steps": [ { "name": "identify", "fields": [ "email" ], "actions": [ { "name": "submit", "kind": "submit", "primary": true } ], "transitions": { "submit": { "target": "authenticate" }, "user_not_found": { "target": "register", "action": "switch" } } }, { "name": "authenticate", "fields": [ "password" ], "actions": [ { "name": "submit", "kind": "submit", "primary": true } ], "transitions": { "submit": { "target": "done" } } }, { "name": "done", "complete": "redirect" } ] }, "created_at": "2020-01-28T14:25:39.123456Z", "updated_at": "2020-01-28T14:25:39.123456Z"}{ "code": "string", "message": "string", "details": {}}{ "code": "string", "message": "string", "details": {}}{ "code": "string", "message": "string", "details": {}}Get a flow definition by id GET
Get a flow definition by id
Delete a flow definition by id DELETE
Delete a flow definition by id. If the flow definition is currently being used by a flow, the deletion will fail. If the flow definition is the last active flow definition for a given purpose, the deletion will fail to prevent disruption of new flows being started for that purpose.