Skip to content

Initialize a Flow Engine session.

POST
/api/flow/init
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/flow/init \
--header 'Content-Type: application/json' \
--data '{ "flowType": "authorization", "clientId": "client_123", "oauthParams": { "responseType": "code", "redirectUri": "https://app.example.com/callback", "scope": "openid profile", "codeChallenge": "rfc7636-code-challenge", "codeChallengeMethod": "S256" } }'

Creates a Flow Engine runtime session for login, authorization, consent, or logout and returns the initial UI contract.

Media type application/json
object
flowType
required
string
Allowed values: login authorization consent logout
clientId
required
string
tenantId
string
oauthParams
object
responseType
string
redirectUri
string format: uri
scope
string
state
string
nonce
string
codeChallenge
string
codeChallengeMethod
string
acrValues
string
loginHint
string
prompt
string
maxAge
integer
key
additional properties
Example
{
"flowType": "authorization",
"clientId": "client_123",
"oauthParams": {
"responseType": "code",
"redirectUri": "https://app.example.com/callback",
"scope": "openid profile",
"codeChallenge": "rfc7636-code-challenge",
"codeChallengeMethod": "S256"
}
}

Successful JSON response.

Media type application/json
object
sessionId
required
string
uiContractVersion
required
string
Allowed values: 0.1
uiContract
required

Server-driven Flow Engine UI contract for the current node.

object
version
string
sessionId
string
nodeId
string
capabilities
Array<object>
object
key
additional properties
key
additional properties
Example
{
"sessionId": "flow_sess_123",
"uiContractVersion": "0.1",
"uiContract": {
"version": "0.1",
"sessionId": "flow_sess_123",
"nodeId": "start",
"capabilities": []
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}