---
title: "Initiate Flow"
method: POST
path: "/coe-partner/v1/initiate-flow"
---

# Initiate Flow

`POST /coe-partner/v1/initiate-flow`

Generates a required token (for SDK) or a launch URL (for Web SDK) to start the Face Verification flow.

## Headers

- `x-onekyc-token` string, required
- `x-onboarding-partner` string, required
- `x-partner-user-id` string, required
- `x-partner-user-id-type` string, required
- `x-partner-session-id` string, required

## Request body

- object
  - `flow` 'FACE_VERIFICATION' | 'KTP_SCAN' | 'KYC_LITE' | 'ON_DEMAND_FR' | 'STANDALONE_LIVENESS', required — Specifies which flow to generate the URL/Token for. For face verification this value should be FACE_VERIFICATION.
  - `source` 'SDK' | 'WEB_SDK', required — Source of the request. SDK uses native/flutter SDK, WEB_SDK uses h5/web.
  - `successRedirectionUrl` string — URL to redirect the user to upon completion of the flow. Mandatory if source is WEB_SDK.
  - `failureRedirectionUrl` string — URL to redirect the user to upon facing any error. Mandatory if source is WEB_SDK.
  - `theme` 'DARK_MODE' | 'LIGHT_MODE' | 'NO_PREFERENCE' — Theme to use for this flow. Dark and Light theme, with the respective values of DARK_MODE, LIGHT_MODE, and NO_PREFERENCE by default. Default will be NO_PREFERENCE, then it will take from device setting.
  - `additionalDetails` object — Additional details sent in the request, depending on Flow and Source.
    - `referenceImageUrl` string — Downloadable URL containing the reference KTP image.
    - `userLocale` 'id_ID' | 'en_ID' — Language locale to display to the user.
    - `allowQr` boolean — Specifies if QR Redirection Flow will be used when condition is met (i.e. allowQr == true AND device has no camera).
    - `forceQr` boolean — Specifies if QR Redirection Flow will always be used regardless of condition.
    - `portraitOnly` boolean — Specifies whether the Face Verification flow can only proceed in portrait mode for Tablet/Desktop.

## Response `200`

Success - Token or Launch URL generated

- object
  - `success` boolean
  - `data` object
    - `token` string — Present if source is SDK. IAB user token generated for the session.
    - `launchUrl` string — Present if source is WEB_SDK. Launch Url to start kyc flow for users that can access from the web.
    - `expirySeconds` string — Time period in seconds for which the generated token will be valid.
    - `expiresAt` string — End time value in epoch timestamp for which the generated token will be valid.

## Other responses

- `400` — Bad Request - Missing or invalid parameters in headers or body
- `401` — Unauthorized - Missing or expired OneKYC token
- `403` — Forbidden - Configuration mismatch
- `500` — Internal Server Error

---

[API](https://skmtc.net/midtrans/apis/snap-api.md) · [All operations](https://skmtc.net/midtrans/apis/snap-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/midtrans/snap-api/revisions/67e029cf926a/schema)
