Zitadel Preview Docs

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

PUT
/flow_definitions/{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

Authorization

oauth2 flow_definitions.write
AuthorizationBearer <token>

In: header

Scope: flow_definitions.write

Path Parameters

id*string

The id returned by the POST /flow_definitions endpoint.

Query Parameters

project_id*string

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": {}}