---
title: "Create a flow"
method: POST
path: "/admin/flows"
tags: ["admin"]
---

# Create a flow

`POST /admin/flows`

Starts a new OAuth2 authentication flow for a pending connection.

## Request body

- CreateFlowRequest
  - `connection_id` string
  - `error_url` string
  - `restart_url` string — RestartURL is where the SPA sends the user when their flow link expires — typically a tenant-app route that creates a fresh flow. Optional; empty means the expired screen has no recovery button.
  - `return_to` string

## Response `201`

createFlow is the 201 response envelope for POST /admin/flows.

- CreateFlowResponse
  - `expires_at` string
  - `flow_id` string
  - `start_url` string

## Other responses

- `400` — errorGeneric wraps the error model as a response.
- `500` — errorGeneric wraps the error model as a response.

---

[API](https://skmtc.net/hintoric/apis/contains-the-generated-openapi-specification-for-hekate.md) · [All operations](https://skmtc.net/hintoric/apis/contains-the-generated-openapi-specification-for-hekate/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hintoric/contains-the-generated-openapi-specification-for-hekate/revisions/72bd83b55019/schema)
