Skip to main content

Didit Create Session API: <code>vendor_data</code> and Duplicate Sessions

Send a stable <code>vendor_data</code> on every <code>POST /v3/session/</code>. If an unfinished session with the same <code>vendor_data</code> exists on the workflow's latest published version, Didit returns that session.

Didit Create Session API: <code>vendor_data</code> and Duplicate Sessions

Contents

In this guide

Jump to the part you need.

This page is for teams whose app can send the same Create Session request twice. Send a stable vendor_data on every POST /v3/session/ call and Didit returns the unfinished session it already holds instead of starting a second one. Creating a session is not a billed step; a full ID check is $0.33. The caveat: reuse covers four statuses only, and only on the workflow's latest published version.

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

Didit Create Session API idempotency at a glance

How the Create Session API avoids duplicate sessions with vendor_data
QuestionAnswer
EndpointPOST https://verification.didit.me/v3/session/ with the x-api-key header. KYC and KYB use the same endpoint; the workflow type decides which session is created.
Duplicate keyvendor_data, your stable identifier for the user or business. Optional in the schema, strongly recommended in the docs.
Statuses that are reusedNot Started, In Progress, Resubmitted, Awaiting User
What comes backThe existing session with HTTP 201, its callback and metadata updated, and status reflecting the session that already exists
Scope of the lookupThe workflow you pass and its latest published version
Cost of a create callNot billed. Billing is per completed check from prepaid credit.
Full ID check (KYC)$0.33 per completed check
Free plan credit$10 of credit every month for eligible organizations, sandbox free and unlimited

Start free in the sandbox at business.didit.me, no sales call. This endpoint creates the session behind our User Verification (KYC) flow, and the per-check rates are on the Didit pricing page. Developers who build with an AI assistant can connect Didit to it through the Didit MCP server.

The outcome and the method we recommend

The outcome is one unfinished session per entity, per workflow, and per that workflow's latest published version, even when a double click, a page reload or a mobile network retry sends the create request more than once.

The method is vendor_data. The docs describe it as your stable identifier for the entity, and it is the field Didit uses for duplicate detection across sessions. When you send it and an unfinished session with the same value exists, the API returns that session with HTTP 201 instead of creating another. The callback and metadata on the existing session are updated with what you send, and the returned status reflects the session that already exists.

Decide the value on your server, once per entity, before the first call, and keep it next to the session_id so a repeat call is easy to trace. That record is our recommendation for your own bookkeeping, not something the API reads. Do not derive the value from an email address that can change or from a timestamp, because a new value is a new entity as far as the API is concerned.

A session overview in the Didit Business Console showing the session status and its warnings
Every session you create, or that Didit returns to you, is visible in the Business Console with its status and warnings.

Prerequisites

  • A Didit organization and an application. Sign up at business.didit.me; the sandbox is free.
  • An API key with access to the session endpoint. Find it in the Business Console under Developers, then API keys. Keys start with sk_live_ or sk_test_, and older keys without a prefix keep working.
  • A published workflow and its UUID. KYC workflows create user verification sessions, KYB workflows create business verification sessions.
  • A field in your own system that identifies the person or business and does not change, for example user-42.
  • If your application has allowed domains set, an HTTP or HTTPS callback on one of those origins. Custom app schemes such as myapp:// are always accepted.

How to avoid duplicate sessions, step by step

  1. Pick one stable vendor_data per entity. Write it next to the user or business record, not inside a request builder. The value you use on the first call is the value the API must see on every later call.

  2. Create the session with that value in the body. The request below is the documented create call with vendor_data and callback. The match covers workflow_id and that workflow's latest published version, so a session created by an earlier published version is not returned.

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/return"}'
  1. Read status and session_id before doing anything else. If status is one of the four reusable statuses in the table at the top of this page, that is the live session for this entity, so send the user to its url.

  2. Send the callback and metadata you want on every call, not only the first. On reuse those two fields are written onto the existing session, so a retry can repair a return URL or an internal reference.

  3. Store the mapping from vendor_data to session_id, plus the last status you saw. Recommended, not required: that record lets you skip the create call entirely once the session is past the reusable statuses.

  4. De-duplicate your webhooks separately. The session envelope carries event_id, session_id, vendor_data, status and metadata, and Didit can deliver the same event more than once, so de-duplicate on event_id. For the full result, fetch the decision from GET /v3/session/<session_id>/decision/.

A create call that also carries metadata, tags and a callback method looks like this. Every field below is documented on the Create Session page.

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",
  "callback_method": "both",
  "metadata": {"signup_attempt": 2},
  "tags": ["ONBOARDING Q4"]
}'

Expected output

A successful create answers HTTP 201, whether the session is new or reused. Read the body in this order:

HTTP/1.1 201 Created

{
  "session_id": "b3f1...",
  "url": "<hosted verification link>",
  "session_token": "<session token>",
  "status": "In Progress",
  "vendor_data": "user-42",
  "metadata": {"signup_attempt": 2}
}

A reused session returns the same session_id you stored on the first call: if the value above, b3f1..., is one you already had, nothing new was created and the user carries on where they stopped. If status reads In Progress while your own record says the link was never sent, the session has been opened, and you should send the user back to the same url rather than start a second flow. Tags come back in the create response and appear on the session in the console, where you can filter by them.

Inputs and outputs

Create Session inputs that change duplicate behaviour
FieldTypeRequiredEffect on duplicate sessions
workflow_idstring, UUIDRequiredSelects the workflow. The lookup runs against this workflow and its latest published version. The workflow type decides KYC or KYB; there is no separate KYB endpoint.
vendor_datastringOptional, strongly recommendedThe duplicate key. Same value plus an unfinished session returns the existing session. Without it, the vendor_data duplicate check cannot match the request to an existing session.
callbackstring, URLOptionalUpdated on the existing session when it is reused. Must sit on one of the application's allowed domains when that list is set, or the call fails with 400.
callback_methodstringOptional, default initiatorOne of initiator, completer, both. Use both if the callback sometimes fails to fire.
metadataobjectOptionalEchoed in responses and webhooks, never shown to the user. Updated on the existing session when it is reused.
tagsarray of stringsOptionalUp to 10 tags, 50 characters each, stored in upper case. Returned in the create response.
session_expiration_timeintegerOptionalSeconds between 3600 and 2419200. Overrides the workflow setting for this session only.
multi_account_segmentstring, max 64OptionalRealm for duplicate face checks inside your organization. It does not control session reuse, and blocklist and allowlist matching ignore it.
What the create response gives you
OutputWhat it isWhat to do with it
session_idThe session identifier, new or existingStore it next to vendor_data and use it for the decision call
urlThe hosted verification linkRedirect the user to it, or open it in the SDK
session_tokenToken returned with the create responseKeep it server side, alongside the session id
statusExact, case-sensitive session statusOn a reused session it reflects the session that already exists
vendor_dataYour identifierEcho it in logs so a repeat call is easy to trace
tagsThe tags on the sessionFilter on them in the Business Console

Failure cases and recovery

HTTP errors on Create Session and what to do
StatusWhat it meansRecoveryRetry
400The callback is not on one of the application's allowed domainsMove the callback to an allowed origin, or add the domain to allowed_domains on PATCH /v3/webhook/After fixing
400Not enough credits to perform the requestTop up in the Business ConsoleAfter topping up
400A field failed validation, for example a missing workflow_id or a session_expiration_time outside 3600 to 2419200Fix the field the body namesAfter fixing
401The key is wrong, malformed, revoked or expiredUse a valid key, or create a new oneAfter fixing
403No key, a scoped key without access, a call from outside the key's IP list, or a suspended contract billing stateRead the body, then use a key with that accessAfter fixing
404The session sits outside the key's workflow or status limitsUse a key whose limits include itNo
409The request conflicts with the current state, for example a reused Idempotency-Key or a step that already ranRead code and reload the stateDepends on the code
429A rate limit or quota was reachedWait for Retry-AfterYes, after waiting
500, 502, 503An unexpected error, a dependency error, or a temporary outageBack off and retry; the body may not be JSONYes, with backoff

When vendor_data does not stop a duplicate

Four situations account for almost every report of a duplicate session that still appeared although vendor_data was sent:

  • The earlier session is past the reusable statuses. Only the four statuses in the table at the top of this page are matched. A session in In Review, Approved, Declined, Expired, Abandoned or Kyc Expired is not returned, so the call creates a new one. Recovery: check your stored status or the decision endpoint before calling create again.
  • The value changed between calls. A random suffix, a temporary ID or a mutable email address produces a different entity. Recovery: use the record ID that never changes and backfill it for existing users.
  • The request used a different workflow. Treat the pair of workflow and vendor_data as the key, and keep one workflow per verification purpose.
  • A new workflow version was published. The lookup targets the latest published version, so sessions created on an earlier version are no longer the match. Recovery: store the session_id and skip the create call while that session is alive.
The ID document tab of a session in the Didit Business Console, showing the extracted document data
A reused create call returns the same session and its current status. Open it in the console to see the document data behind that status.

What is billed, and where review starts

Creating a session is not a billed step. Billing is per completed check from prepaid credit, so a duplicate session costs money only when the checks inside it actually run. That is exactly why the reuse matters: two sessions for one person can mean two ID checks and two liveness checks for one human.

  • Full ID check (KYC): $0.33, made up of ID document verification $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03.
  • AML screening: $0.20 per check. KYC plus AML is $0.53.
  • Business verification (KYB): registry data priced by country and data tier, from $2.00 per company, with linked KYC and person AML billed per person.
  • Plans: Free with $10 of credit a month, Growth at $99 a month with $115 of credit and 4% off every Didit price, Scale at $299 a month with $350 of credit and 10% off. Enterprise is a custom annual contract from $15,000 a year. See the Didit pricing page before you quote a plan.
  • Listed as free or included: Workflow Orchestrator, Reusable KYC and the MCP server are currently listed as free or included, and the sandbox is free and unlimited.

Review is a decision boundary, not a duplicate control. A session in In Review is waiting on a person in the Business Console, or on PATCH /v3/session/<sessionId>/update-status/, and it is not one of the four statuses that Create Session will return. If you need one open session per person even during review, enforce that in your own record before you call create.

Worked cost example

An onboarding team adds 5,000 new users a month and runs a full ID check plus AML screening on each: $0.33 + $0.20 = $0.53 per completed check, so 5,000 x $0.53 = $2,650 a month.

Before vendor_data, 12% of users triggered the create call twice because the page reloaded during signup: 5,000 x 0.12 = 600 extra sessions. In 500 of those the user finished the second flow as well, so the team paid twice for one person: 500 x $0.53 = $265.00 a month, or $265 x 12 = $3,180 a year.

After vendor_data, a repeat call returns the session that already exists only while that original session is still in one of the four reusable statuses. The example above assumes all 600 repeats stay eligible for the whole month, which is the best case. Where the first session is already Approved, a second flow still starts and still bills. On that assumption the second completed check disappears and the annual saving is the $3,180. On the Scale plan the numbers shift, not disappear: $0.33 x 0.9 = $0.297 and $0.20 x 0.9 = $0.18, so $0.477 per bundle and 500 x $0.477 = $238.50 a month.

On credit, $10 of monthly credit at $0.33 buys about 30 live full ID checks ($10 / $0.33 = 30.3). Sandbox testing itself is free and unlimited, so watch the reuse work there first, then spend the $10 on live traffic.

Didit Academy lesson cover on how billing works with credits and volume discounts
Credits, auto-recharge and volume discounts, explained in the Didit Academy billing lesson.

Didit runs identity and fraud checks for 4,000+ companies. For KYB flows, the same duplicate rule matters more, because a parent business session waiting on key people sits in Awaiting User, which is one of the four reusable statuses. A repeat create call for that business returns the parent instead of starting a second key-people collection round. See business verification for what that flow covers.

Sources

Start with one sandbox session and one vendor_data value: sign up at business.didit.me, create the workflow, send the call twice, and watch the second response come back with the same session_id. No sales call, and the sandbox is free.

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

Does the Didit Create Session API return an existing session when vendor_data matches?

Yes, for unfinished sessions. If you send vendor_data on POST /v3/session/ and an unfinished session with the same value exists on the workflow's latest published version, Didit returns that session with HTTP 201 instead of creating a new one. The returned status reflects the session that already exists, and its callback and metadata are updated with the values you sent. Sessions in a terminal or review status are not matched.

Which session statuses count as unfinished for the vendor_data check?

Four: Not Started, In Progress, Resubmitted and Awaiting User. Every other status, including In Review, Approved, Declined, Expired, Abandoned and Kyc Expired, is not matched, so a create call with the same vendor_data starts a new session. All status strings are exact and case-sensitive, and Kyc Expired uses a single capital K.

Is vendor_data required to create a Didit session?

No. The field is optional, but the docs strongly recommend it because it binds the session to a user or business entity and is used for duplicate detection across sessions. Without it, two identical create calls produce two sessions. With it, the second call returns the first session while that session is still unfinished.

What HTTP status does Didit return when it reuses a session?

Didit answers HTTP 201 and returns the existing session in the body, not a new one. session_id is the identifier you already stored, so comparing it with your own record is the quickest way to confirm nothing was created. Read status to learn how far the user got.

What happens to callback and metadata when an existing session is returned?

They are updated on the existing session. Whatever callback and metadata you send on the repeat call are written to the session you get back, so a retry can repair a return URL or an internal reference. Do not assume the session keeps the values from its first creation.

Why did I still get a duplicate session after sending vendor_data?

Four common causes. The earlier session is past the reusable statuses, for example In Review or Approved. The value differs between calls because of a random suffix, a temporary ID or a mutable email. The request went to a different workflow, or a new workflow version was published so the older session is no longer on the latest published version. Check your stored session_id and the current status before you assume the API failed.

Does creating a Didit session cost anything?

No. Creating a session is not a billed step; Didit bills per completed check from prepaid credit. A full ID check is $0.33 and AML screening is $0.20, so KYC plus AML is $0.53. A duplicate session costs money only when the checks inside it actually run, which is why the reuse saves budget rather than API calls alone.

How is vendor_data different from multi_account_segment?

vendor_data is your identifier for the entity, and it controls whether Create Session returns an unfinished session. multi_account_segment is a duplicate-detection realm for face duplicate checks inside your own organization, so separate account bases do not report one person as a duplicate. Blocklist and allowlist matching ignore multi_account_segment, and it has no effect on session reuse.

How do I stop creating a second session after the first one is Approved or Declined?

The API will not do that for you, because only the four unfinished statuses are reused. Store vendor_data next to session_id and the last status you saw, then check GET /v3/session/<id>/decision/ or your own record before calling create again. For a genuine re-verification, a new session is the correct outcome, so make that a deliberate decision in your code.

Can I reuse the same vendor_data across two workflows?

The duplicate lookup runs against the workflow you pass and its latest published version, so treat the pair of workflow and vendor_data as the key rather than the value alone. Keep one workflow per verification purpose to avoid surprises. A KYC workflow and a KYB workflow are separate in any case, and only the workflow type decides which kind of session is created.

What does a 409 mean on create session?

The error reference lists 409 as a request that conflicts with the current state, for example a reused Idempotency-Key or a step that already ran. Read code in the body and reload the state before retrying, because the right action depends on that code. For duplicate sessions specifically, the documented control on Create Session is vendor_data.

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.