Skip to main content

KYC API Documentation: A Practical Integration Guide for 2026

Three calls do it: create a workflow, create a session, read the signed decision. A full KYC check is $0.33, the sandbox is free, and two API hosts mean two auth headers.

KYC API Documentation: A Practical Integration Guide for 2026

Contents

In this guide

Jump to the part you need.

This page is the working guide we hand to engineers who are integrating KYC. It fits a backend or full-stack developer who needs a live identity check inside an app, not a survey of vendors. A full KYC check costs $0.33 on our public price list and the sandbox is free. The caveat: Didit runs two API hosts, verification.didit.me and apx.didit.me, with different authentication schemes, so keep their headers separate.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

KYC API integration at a glance
What you needWhere it is documentedCost
Organization and applicationbusiness.didit.meFree plan with $10 of monthly credit for console sign-ups with a work email
API keyDevelopers, then API keys in the console, or the programmatic register flowFree
Verification workflowPOST /v3/workflows/Free, the Workflow Orchestrator is not billed
Verification sessionPOST /v3/session/$0.33 per completed full KYC check
Result deliveryWebhook destination and X-Signature-V2Not a priced line
Decision readGET /v3/session/{session_id}/decision/Not a priced line
AML screening add-onAML feature inside the workflow$0.20 per check, $0.53 for KYC plus AML
TestingSandbox scenarios and magic valuesSandbox testing is free and unlimited.

Start free in the sandbox at business.didit.me with no sales call, and keep the User Verification (KYC) product page open next to these calls. Developers who work from an AI assistant can connect Didit through the Didit MCP server, and every number on this page is on the pricing page.

What the KYC API covers

The documentation is public, so you can read the contract before you create an account. The documented route sequence is:

  • POST /v3/workflows/ defines the check: OCR, liveness, face match, AML, proof of address and the rest, in the order you want them.
  • POST /v3/session/ starts one verification and returns the hosted url plus a session_token.
  • POST /v3/webhook/destinations/ registers the endpoint that receives status events, signed with X-Signature-V2.
  • GET /v3/session/{session_id}/decision/ returns the same decision when a webhook is late, lost or delivered twice.
  • Standalone server-to-server APIs exist for single steps such as face match, ID verification and AML screening, billed as their own price-book lines.

For an API for KYC client onboarding, the sequence is identical whether you verify at signup, before a payout, or before an account upgrade. What changes is the workflow, not the call sequence. A KYB workflow uses the same endpoint, but the response shape and the decision arrays differ: session_kind comes back as business, and you read registry_checks and key_people_checks instead of id_verifications. If you would rather have a coding agent assemble the integration, the integration prompt covers the full recipe, and the docs index lists every page in a form an assistant can fetch.

What you have at the end

An approved or declined KYC result attached to your own user id, stored in your own database. If the webhook does not arrive, retrieve the decision from the API. Didit signs webhook payloads with HMAC-SHA256 in the X-Signature-V2 header, so you can verify a delivery before you act on it.

Prerequisites before the first call

  • A Didit organization and an application. Keys belong to an application, so decide up front whether you need a sandbox application, a live one, or both.
  • A workflow. This is the check itself, and the create-session call refuses to run without a valid workflow_id.
  • An HTTPS endpoint on your side that can receive a POST from the internet, and a place to keep its signing secret.
  • An allowed callback domain if you redirect users back into your app. A callback outside the application's allowed domains fails with 400.
  • Credit on the live key. Sandbox keys are free. A console organization that signs up with a work email gets $10 of credit a month, and an organization created through the API starts at $0.

The steps, in order

  1. Create the account, the organization and the application. Sign up at business.didit.me, then create your organization. Inside it, an application is the workspace that holds the workflows and keys for one project or environment.

  2. Build the workflow. Open Workflows in the sidebar and click New workflow. Choose Verifying users, then start from the KYC template, describe what you need and review the draft, or start empty. A simple workflow runs its steps in a fixed order; a node-based workflow branches on results. The same thing through the API:

    curl -X POST https://verification.didit.me/v3/workflows/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "workflow_label": "Standard KYC",
    "workflow_type": "kyc",
    "features": [
      {"feature": "OCR"},
      {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}},
      {"feature": "FACE_MATCH"},
      {"feature": "AML"}
    ]
    }'

    Persist workflow.id. It is the only value you need from this step.

  3. Get the API key. In the console, pick the application, then Developers and API keys. The Primary key is the application's own secret, and you can create additional keys with only the access a service or partner needs. Or do it in two calls, with no console at all:

    # 1) Register: emails a 6-char code (10 min TTL).
    curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \
    -H "Content-Type: application/json" \
    -d '{"email": "you@yourdomain.com", "password": "StrongP@ss1"}'
    
    # 2) Verify email: returns both api_keys inline.
    curl -X POST https://apx.didit.me/auth/v2/programmatic/verify-email/ \
    -H "Content-Type: application/json" \
    -d '{"email": "you@yourdomain.com", "code": "A3K9F2"}'

    Store sandbox_application.api_key as DIDIT_API_KEY while you build and application.api_key as DIDIT_LIVE_API_KEY. New keys start with sk_live_ or sk_test_ followed by 43 URL-safe characters, but older keys have no prefix and still work, so never validate a key by its prefix.

  4. Create the session. One call starts the verification and returns the link to hand the user:

    curl -X POST https://verification.didit.me/v3/session/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"workflow_id": "$WORKFLOW_ID", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return"}'

    The response contains session_id, url and session_token. Pass your own id in vendor_data so the session, and any duplicate detection, stays bound to the right user.

  5. Send the user to the hosted flow. Redirect to url, or open it in an SDK or an iframe. When the user finishes, Didit appends the session id and the status to your callback as query parameters. If the callback sometimes fails to fire, set callback_method to both.

    The hosted Didit verification flow a user sees after being redirected to the session URL
    The hosted flow your user sees after you redirect to the session url, screen by screen.
  6. Register the webhook destination. Create the destination once, then subscribe to the events you care about:

    curl -X POST https://verification.didit.me/v3/webhook/destinations/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"label": "Production", "url": "https://myapp.com/api/webhooks/didit", "subscribed_events": ["status.updated", "data.updated", "user.status.updated", "user.data.updated"], "webhook_version": "v3"}'

    label and url are required. Save the returned secret_shared_key as DIDIT_WEBHOOK_SECRET. There is no wildcard, so list every event family you want.

  7. Verify the signature and apply the decision. Follow the order the webhook page gives, because each step depends on the one before:

    • Read the raw request body. Do not parse JSON before you verify.
    • Recompute the HMAC-SHA256 over the canonical JSON and compare it to X-Signature-V2 with a constant-time comparison. Also accept a match on the -Previous header when it is present, which keeps delivery working for 24 hours after a secret rotation.
    • Reject a request whose X-Timestamp is more than 300 seconds away from now.
    • De-duplicate on event_id, update state idempotently, and answer with 2xx within 5 seconds.
    • Branch on status, which is case-sensitive, and read the decision from the payload. If you verified with the deprecated X-Signature-Simple header, re-fetch the decision from the API instead of trusting the body.
  8. Read the decision when the webhook does not arrive. The decision is available on demand from the retrieval endpoint, which returns the decision object and not the full webhook envelope:

    curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \
    -H "x-api-key: <API_KEY>"

    The v3 contract always returns feature data in plural arrays, and a feature that did not run is absent or null. Branch on session_kind before you touch any array:

    const decision = await (await fetch(url, { headers: { "x-api-key": API_KEY } })).json();
    switch (decision.session_kind) {
    case "user": return handleUserDecision(decision);
    case "business": return handleBusinessDecision(decision);
    }
  9. Test the outcomes in the sandbox. Sandbox sessions accept sandbox_scenario, a slug from GET /v1/sandbox/scenarios/, which expands the scenario's magic values so a session reproduces that result. You can also arm or re-arm a scenario after creation with POST /v3/session/{session_id}/sandbox/arm/ while the session is still Not Started. Live applications reject sandbox_scenario with 400, so a live key cannot drift into a mocked result. Sandbox testing is free and unlimited.

Expected output

On a session event, the webhook body looks like this. The decision object is present only for Approved, Declined, In Review and Abandoned:

{
"event_id": "uuid",
"session_id": "uuid",
"status": "Approved",
"webhook_type": "status.updated",
"created_at": 1627680000,
"timestamp": 1627680000,
"application_id": "uuid",
"environment": "live",
"workflow_id": "uuid",
"workflow_version": 1,
"vendor_data": "user-42",
"metadata": { "user_type": "premium" },
"decision": { }
}

Your handler should see exactly one of these status strings: Approved, Declined, In Review, In Progress, Not Started, Expired, Abandoned, Kyc Expired, Resubmitted or Awaiting User. Note the single capital K in Kyc Expired. A KYB payload adds business_session_id and session_kind.

A verification session in the Didit Business Console with its warnings listed
The same session in the Didit Business Console, with the warnings that also appear in the decision payload.

Inputs and outputs you will use first

Request fields and response fields for a KYC session
FieldDirectionRequiredNotes
x-api-keyRequest headerYesLong-lived key for every /v3 route. The verification API does not use OAuth bearer tokens.
workflow_idSession requestYesUUID from the workflow. A KYC workflow creates a user session and a KYB workflow creates a business session.
vendor_dataSession requestRecommendedYour stable id for the person. Binds the session to an entity and drives duplicate detection.
callbackSession requestOptionalWhere the hosted flow returns the user. Must sit on an allowed domain when the application sets one; custom URL schemes are always accepted.
metadataSession requestOptionalArbitrary JSON echoed in responses and webhooks. Never shown to the user.
session_expiration_timeSession requestOptionalSeconds, between 3600 and 2419200. Overrides the workflow setting for this session only.
sandbox_scenarioSession requestSandbox onlyScenario slug that reproduces a fixed outcome. Rejected with 400 on live applications.
session_id, url, session_tokenSession responseReturnedSend the user to url and keep session_id for the decision call.
statusWebhook and decisionReturnedExact, case-sensitive strings listed above.
id_verifications[], liveness_checks[], face_matches[], aml_screenings[]DecisionReturned when runAlways plural arrays in v3.

Failure cases and recovery

What the docs say to do when a call or a delivery fails
What you seeWhat it meansRecovery
401 on verification.didit.meThe key is wrong, malformed, revoked or expiredIssue a new key under Developers and API keys, or run the recover-key flow through apx.didit.me
403 on verification.didit.meNo key header, a scoped key without access to this resource, or a call from an address outside the key's IP listUse a key that carries that access
403 on apx.didit.meThe JWT is missing or expiredCall POST /auth/v2/programmatic/login/ again
400 on workflow_idThe workflow id is invalidCopy the UUID from the create response or the console
400 on callbackThe callback host is not on the application's allowed domainsUse an allowed origin or a custom URL scheme
404 on a session routeThe session does not exist, belongs to another application, or sits outside the scoped key's limitsCheck which application the key belongs to
429 with a wait fieldRate limit, and the response says how long to waitBack off for that many seconds, then retry
Webhook missingThe handler answered 5xx or 404, or took longer than 5 seconds. Didit retries twice, after about 1 and 4 minutes, then drops the deliveryResend from the destination delivery log, and read the decision from the API
Webhook repeatedDelivery is at least onceDe-duplicate on event_id and make the state update idempotent

You pay per completed check, not per HTTP call. Creating a workflow, creating a session, registering a destination, answering a webhook and reading a decision are not priced lines. The check is billed when it finishes with a result, at the module prices on the pricing page. A full KYC check is $0.33: ID document verification $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03. AML screening adds $0.20 per check, priced on the docs pricing page, which puts the KYC plus AML combination at $0.53.

Sandbox sessions are not billed. Sandbox testing is free and unlimited, on every plan. Standalone server-to-server APIs are priced separately from the same step inside a workflow, and the price-book table lists both.

Review is a boundary you set, not something the API decides for you. When the status is In Review, a person holds the session in the Didit Business Console, and the decision carries assignee, waiting_since and sla_due_at while it waits. decision_trace records how the status was reached and whether it was manual, automatic or an investigator. A human change is preserved in status_override, which keeps the automatic_status next to it, and the review history sits in reviews. The Investigator agent, included from the Growth plan up, writes reports and can decide items on its own; those actions arrive as their own webhook events.

Didit billing explained, showing credits, auto top-up and volume discounts
How credit, auto top-up and plan discounts work, from the Didit Academy lesson on billing.

Worked cost example

Take a client onboarding flow with 2,000 completed full KYC checks a month and AML screening on every user.

  • List price for the checks: 2,000 × $0.33 = $660.00.
  • AML screening: 2,000 × $0.20 = $400.00.
  • Total at list: $660.00 + $400.00 = $1,060.00, the same as 2,000 × $0.53 for the KYC plus AML combination.
  • On Growth the same volume is 4% cheaper: 2,000 × $0.3168 = $633.60 for the checks and 2,000 × $0.192 = $384.00 for AML, so $1,017.60.
  • Growth includes $115.00 of credit a month, which pays the first $115.00 of that bill. The remaining $902.60 comes from top-ups, which last 12 months.

Arithmetic check: $1,017.60 minus $115.00 equals $902.60. Without AML, the same 2,000 checks cost $660.00 at list price and $633.60 on Growth. Sandbox sessions never appear on a bill.

Sources

The next step is a sandbox session, not a sales call: create your application at business.didit.me, run the calls above against your sk_test_ key, and move to your live key once the decision lands in your database.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

What is a KYC API?

A KYC API is a set of HTTPS endpoints your server calls to run an identity check: it creates a verification session, returns a hosted flow for the user, and sends the result back as a signed webhook or a decision you read on demand. On Didit the sequence is create a workflow, create a session, then read the decision. A full check costs $0.33 and the sandbox is free.

Is there a free KYC API I can test before paying?

Yes. Every Didit plan includes a free sandbox, and sandbox testing is free and unlimited. Sandbox sessions are not billed, so you can reproduce approved, declined, expired and review outcomes with sandbox scenarios before you switch to a live key. A console organization that signs up with a work email also gets $10 of credit a month for live checks.

How much does one KYC API call cost?

Billing is per completed check, not per HTTP request. A full KYC check is $0.33 at list price: ID document verification $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03. Adding AML screening at $0.20 makes the combined check $0.53. Sandbox sessions are not billed.

Which endpoint starts a KYC verification?

POST https://verification.didit.me/v3/session/ with the x-api-key header and a workflow_id in the body. The workflow type decides whether the session is a user verification or a business verification, so there is no separate KYB endpoint. The response returns session_id, url and session_token.

What is the difference between verification.didit.me and apx.didit.me?

verification.didit.me serves every /v3 route and authenticates with a long-lived key in the x-api-key header. apx.didit.me serves account, organization and application management and authenticates with a JWT in an Authorization: Bearer header. The verification API does not accept OAuth bearer tokens, so keep the two hosts and their headers apart.

Can I get an API key without opening the console?

Yes, in two calls. POST /auth/v2/programmatic/register/ emails a six character code with a ten minute lifetime, and POST /auth/v2/programmatic/verify-email/ returns the live and sandbox API keys inline. Reserved test domains such as example.com are rejected with email_undeliverable, and an organization created this way starts at $0 of credit.

Why did my webhook not arrive, or arrive twice?

A handler that answers 5xx or 404, or takes longer than 5 seconds, counts as a failed delivery; Didit retries twice, after about one minute and four minutes, then drops the delivery. Duplicates happen because delivery is at least once, so de-duplicate on event_id. You can resend from the destination delivery log and read the same decision from GET /v3/session/{session_id}/decision/.

How do I read a Declined decision?

Read status first, then the feature array that produced it, for example id_verifications[] or aml_screenings[]. decision_trace says whether the status was automatic, manual or set by an investigator, and status_override keeps the automatic status when a reviewer changed it. Feature arrays are always plural in v3 and are absent or null when a feature did not run.

Does the same API handle KYB and business client onboarding?

Yes. A KYB workflow uses the same POST /v3/session/ endpoint and the decision comes back with session_kind of business, carrying registry_checks and key_people_checks instead of id_verifications. Branch on session_kind before reading any array, rather than assuming a single shape.

Where do I find developer API guides?

Didit publishes the endpoint list, the authentication header and the error codes at docs.didit.me, with a machine-readable index at docs.didit.me/llms.txt and OpenAPI contracts for the verification API and the programmatic auth API. You can read all of it without an account. The same pages link the integration prompt that a coding agent can follow end to end.

What happens when a session goes to In Review?

The status value is In Review, and a person on your team holds the session in the Didit Business Console. While it waits, the decision carries assignee, waiting_since and sla_due_at, and the review activity sits in reviews and decision_trace. The check is billed when it finishes with a result.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.