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
| Parameter | Type | Required | Description |
|---|---|---|---|
environment | string | Yes | Environment identifier (e.g. live, staging) |
flowId | string | Yes | The unique identifier of the flow |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer 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:
| Field | Type | Description |
|---|---|---|
info.title | string | Flow display name |
info.description | string | Flow description |
info.version | string | Deployed flow version number |
info.x-flow-id | string | Flow unique identifier |
info.x-flow-version | number | Deployed flow version number (numeric) |
info.x-environment | string | Environment (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
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing token |
403 | Forbidden — environment mismatch |
404 | Flow 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
404is 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.