---
title: "Initiate Flow"
method: POST
path: "/esign-partner/v1/initiate-flow"
tags: ["Flow"]
---

# Initiate Flow

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

Fetch the user token/launch URL needed to start the identity verification flow on frontend.
Additional details passed in this API will be stored and used during submission processing.

## 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, uuid, required

## Request body

- InitiateFlowRequest
  - `flow` 'STANDALONE_IDENTITY_VERIFICATION', required — Specifies which flow to use
  - `source` 'SDK' | 'WEB_SDK', required — Specifies which source the partner uses
  - `successRedirectionUrl` string — URL where user will be redirected upon successful completion (required if source = WEB_SDK)
  - `failureRedirectionUrl` string — URL where user will be redirected if flow fails (required if source = WEB_SDK)
  - `additionalDetails` AdditionalDetails
    - `email` string, email — Email of the user
    - `phoneNumber` string — Phone number of user. Validation: Start with 62, 11-15 chars (62 included)
    - `dataVerification` DataVerification — Details of verification done by partner on behalf of the user
      - `email` object
        - `isVerified` boolean — Boolean field to determine if email has been verified by partner
        - `verificationReferenceId` string — Required if email.isVerified = true. ReferenceId for email verification.
      - `phoneNumber` object
        - `isVerified` boolean — Boolean field to determine if phone number has been verified by partner
        - `verificationReferenceId` string — Required if phoneNumber.isVerified = true. ReferenceId for phone verification.
    - `userLocale` 'en_ID' | 'id_ID' — Language to use for this flow

## Response `200`

Successfully initiated flow

- union
  - InitiateFlowSdkResponse
    - `success` boolean
    - `data` object
      - `token` string — IAB user token generated for the session
      - `expirySeconds` string — Time period in seconds for which the token will be valid
      - `expiresAt` string — End time value in epoch timestamp
  - InitiateFlowWebSdkResponse
    - `success` boolean
    - `data` object
      - `launchUrl` string, uri — Launch URL to start KYC flow for web users
      - `expirySeconds` string — Time period in seconds for which the token will be valid
      - `expiresAt` string — End time value in epoch timestamp

## Other responses

- `400` — Request headers or body validation failed
- `401` — Invalid credentials
- `403` — Invalid onboarding partner

---

[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)
