List flow definitions
Lists the project's flow definitions with their configurations, newest by creation time first. A flow definition sets which step of a sign-in renders when, and which fields each step collects.
The id of an entry is the flow definition ID that getFlowDefinition (GET /flow_definitions/{flow_definition_id})
takes. Filter by name to list the revisions of one flow.
AuthorizationBearer <token>Scope: flow_definition.read
limit?integerMaximum number of items to return.
1 <= value <= 10020page_token?stringToken for fetching the next page of results.
Obtain this value from next_page_token in the previous response.
Omit to start from the beginning.
Its format is opaque and may change between releases.
project_id*stringThe project ID: the id that createProject (POST /projects) returns. zitadel setup prints
it as "Project id" in its summary and as project_id with --json, and
writes it to .env.local as ZITADEL_PROJECT_ID.
^[a-zA-Z0-9_-]+$purpose?stringOnly flow definitions with this purpose, for example login.
"login""register""recovery""profiling""reauth""link_account"name?stringThe flow name to filter by. Every revision of a flow shares its
name, so the result is that flow's revisions, newest by creation
time first.
^[a-z][a-z0-9-]*$revisions?stringWhich revisions to return. Every revision of a flow shares its
name, so publishing a definition under an existing name adds a new
revision.
all (the default) returns every revision: the full history an
export, an audit or a GitOps diff needs. latest returns the newest
revision of each name, which is one entry per flow.
A page_token is bound to the mode it was issued in and is rejected by
the other.
"all""all""latest"expand?array<>Related entities to embed on each returned flow definition.
A page of flow definitions.
application/json- response
List of flow definitions, newest by creation time first.
flow_definitions*array<>next_page_token?|The token to retrieve the next page of results. Absent if there are no more results.
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const api = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const flowDefinitions = await api.listFlowDefinitions({ project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });{ "flow_definitions": [ { "id": "string", "project_id": "string", "flow_definition": { "$schema": "string", "name": "standard-login", "user_schema": "string", "purposes": { "property1": "string", "property2": "string" }, "audience": { "team_ids": [ "string" ], "app_ids": [ "string" ] }, "steps": [ { "name": "string", "fields": [], "actions": [], "gates": {}, "sso_providers": [], "on_success": "create_user", "complete": "redirect", "transitions": { "property1": { "target": "string", "action": "switch", "purpose": "login" }, "property2": { "target": "string", "action": "switch", "purpose": "login" } } } ] }, "user_schema": { "id": "string", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "objectType": "string", "kind": "user-schema", "metaSchema": "http://example.com", "x-auth-methods": { "password": { "enabled": true }, "passkey": { "enabled": true }, "magic_link": { "enabled": true }, "sso": { "providers": [ "google" ], "enabled": true }, "otp": { "enabled": true } }, "x-identifier": "string", "x-display": [ "string" ], "properties": { "property1": { "x-unique": "unspecified", "x-claim": "string", "x-audit": false, "properties": { "property1": {}, "property2": {} } }, "property2": { "x-unique": "unspecified", "x-claim": "string", "x-audit": false, "properties": { "property1": {}, "property2": {} } } } }, "metadata": { "created_at": "2019-08-24T14:15:22Z", "in_use": true } }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_page_token": "string"}Was this helpful?