The prepare step is the first API call in the KYC sequence. It tells StarkFi which email will go through verification and ensures the address is known before you send a one-time code or open a Didit session.Documentation Index
Fetch the complete documentation index at: https://docs.starkfi.io/llms.txt
Use this file to discover all available pages before exploring further.
Call prepare once per user (or before OTP) when they choose to start KYC. If the email is already registered, the API returns 200 with the current high-level state so you can skip duplicate setup or resume the flow.
Endpoint
Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | End user’s email address. Use the same value (we recommend lowercase) for OTP, session creation, and status checks. |
After prepare, continue with email verification (
POST /security/email/send-otp → POST /security/email/verify-otp) before starting the Didit session. See Getting started for the full flow.Examples
Responses
201 — New registration
The email was registered for KYC. Ask the user to complete email verification next.200 — Already registered
The email was already known to StarkFi for KYC. Usedata to drive your UI (for example skip prepare or show the right next step).
Field in data | Meaning |
|---|---|
email_verified | Whether the user has completed the email OTP step |
kyc_approved | Whether KYC has been approved |
kyc_status | Current KYC status string for that email |
400 — Missing email
500 — Server error
What to do next
- Send OTP —
POST /security/email/send-otpwith the sameemail. - Verify OTP —
POST /security/email/verify-otpwithemailandcode. - Start KYC session —
POST /kyc/create/verify_public_kyc(after the email is verified).
.png?fit=max&auto=format&n=I_v6ul4JDafNKFQP&q=85&s=f0ad25536f8a3ca42331fcff88ab2b26)