Skip to main content
Use this step after the user has verified their email (OTP) or wallet (signed challenge). StarkFi returns session details you use to send the user to the hosted KYC experience.
Prerequisite: Prepare + email OTP, or Prepare wallet. If identity is not verified yet, the API responds with 403 identity_not_verified.

Endpoint

POST /kyc/create/verify_public_kyc

Request body

Provide email or wallet (same identifier used in prepare):
FieldTypeRequiredDescription
emailstringOne of email or walletSame email used in prepare and OTP
walletstringOne of email or walletSame wallet used in prepare-wallet

Example (email)

curl --request POST \
  --url https://api.starkfi.io/kyc/create/verify_public_kyc \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{"email":"user@example.com"}'

Example (wallet)

curl --request POST \
  --url https://api.starkfi.io/kyc/create/verify_public_kyc \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{"wallet":"FmTGYpzX27fDqaiytXUdFVaphC5o68G61Q3uhVM2d8bm"}'

Responses

201 — Session created or returned

{
  "statusCode": 201,
  "success": true,
  "status": "kyc_session_created",
  "message": "KYC session created",
  "data": {
    "success": true,
    "message": "didit_create_kyc_session",
    "session": {
      "session_id": "string",
      "session_url": "https://..."
    }
  }
}
The exact shape of data can vary when a session already exists or the user is already approved. Read session_url to open the hosted flow and session_id to correlate status checks.

403 — Identity not verified

{
  "statusCode": 403,
  "success": false,
  "status": "identity_not_verified",
  "message": "You must verify your email or wallet before starting KYC"
}

403 — User not prepared

{
  "statusCode": 403,
  "success": false,
  "status": "user_not_prepared",
  "message": "Complete KYC prepare and verify your email or wallet before starting a session"
}

429 — Quota exceeded

status: verify_quota_exceeded — monthly KYC session quota exhausted.

404 — Unsupported path

status: method_not_found — the kyc_type in the URL is not supported.