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

# Initiate Flow

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

## Request

- Base URL: `https://onekyc.ky.id.sandbox.gopayapi.com`
- URL: `https://onekyc.ky.id.sandbox.gopayapi.com/esign-partner/v1/initiate-flow`
- Auth: none declared. Required headers: `x-onekyc-token`, `x-esign-onboarding-partner`, `x-partner-user-id`, `x-partner-user-id-type`, `x-partner-session-id`

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-esign-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

- 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.
    - `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`: Bad Request - Invalid input or missing required parameters
- `401`: Unauthorized - Invalid or missing authentication token
- `403`: Invalid onboarding partner
- `500`: Internal Server Error - An unexpected error occurred on the server

---

[API](https://skmtc.dev/midtrans/apis/esign-apis.md) - [All operations](https://skmtc.dev/midtrans/apis/esign-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/midtrans/apis/esign-apis/revisions/46d7a61df8a0?raw)
