Skip to main content

Get flow OpenAPI spec

Retrieve a flow-specific OpenAPI specification for the create-session endpoint

Use this endpoint to obtain an OpenAPI 3.0 specification tailored to a specific flow. The returned spec describes the create-session endpoint with a request body schema that includes only the data blocks required by that flow. This is useful for generating typed API clients or for validating payloads before creating a session.

Endpoint

GET /v1/flows/{environment}/{flowId}

Path parameters

ParameterTypeRequiredDescription
environmentstringYesEnvironment identifier (e.g. live, staging)
flowIdstringYesThe unique identifier of the flow

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication

Request

No request body is required for this endpoint.

Response

Returns an OpenAPI 3.0 specification object. The paths section contains a single POST endpoint for creating a session, with a request body schema restricted to the data blocks required by the flow.

The info object includes flow metadata as extension fields:

FieldTypeDescription
info.titlestringFlow display name
info.descriptionstringFlow description
info.versionstringDeployed flow version number
info.x-flow-idstringFlow unique identifier
info.x-flow-versionnumberDeployed flow version number (numeric)
info.x-environmentstringEnvironment (live or staging)
{
"openapi": "3.0.0",
"info": {
"title": "Document-based IDV - Capture",
"description": "Verifies identity by capturing and checking official ID documents",
"version": "2",
"x-flow-id": "082dc7d8-05cb-458b-9767-241b109097fb",
"x-flow-version": 2,
"x-environment": "live"
},
"paths": {
"/api/v1/flows/082dc7d8-05cb-458b-9767-241b109097fb/live/sessions": {
"post": {
"summary": "Create a session",
"operationId": "createSession",
"description": "Creates a new session for this flow. The request body includes only the data blocks required by this specific flow.",
"security": [{ "bearer": [] }],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {
"basicIdentity": { "...": "..." },
"documentImages": { "...": "..." }
},
"required": ["basicIdentity", "documentImages"]
},
"metadata": { "...": "..." }
},
"required": ["input", "metadata"]
}
}
}
},
"responses": {
"201": { "description": "Session successfully created" },
"400": { "description": "Bad request - validation error" },
"401": { "description": "Unauthorized - invalid or missing token" },
"403": { "description": "Forbidden - environment mismatch" },
"404": { "description": "Flow not found" }
}
}
}
}
}

Error responses

StatusDescription
401Unauthorized — invalid or missing token
403Forbidden — environment mismatch
404Flow not found, or no deployed version in this environment

Example

curl https://api.eu.platform.idnow.io/api/v1/flows/live/082dc7d8-05cb-458b-9767-241b109097fb \
-H "Authorization: Bearer YOUR_API_KEY"

Notes

  • The flow must have an active deployment in the specified environment. If no version is deployed, a 404 is returned.
  • The request body schema in the returned spec reflects the exact data blocks required by the current deployed version of the flow.
  • Use this spec to generate a typed API client or to discover the expected payload structure before creating a session.