Didit Create Session API: pass user state and biometric consent
Send user state as an ISO 3166-2 code or US state, and biometric consent as the given timestamp plus your text version, in your POST /v3/session/ body.

Contents
In this guide
Jump to the part you need.
This guide fits developers who already know where their user lives, or who collected biometric consent on their own screen before the verification started. Both cases are one optional field each on Didit's Create Session API: user_state and biometric_consent. Neither field adds a charge; the list price for a full KYC check remains $0.33. The caveat: these fields record what you tell us, they do not decide whether your journey meets BIPA, CUBI or Colorado law.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Field | Type and limits | Accepted values | What it changes |
|---|---|---|---|
user_state | string, max 16 chars | ISO 3166-2 subdivision (US-IL, ES-M) or a US state code or name (IL, Illinois) | In Auto consent mode, Illinois, Texas or Colorado makes the flow ask for explicit biometric consent before the first face capture. Recorded as trigger: declared_state. Unknown value returns 400. |
biometric_consent | object | given_at (ISO 8601, not in the future), text_version (max 64 chars) | The flow does not ask again. The decision records status: given with trigger: customer_collected. A future given_at is rejected. |
Start free in the sandbox at business.didit.me, no sales call. Developers who want an AI assistant in the loop can connect Didit through Didit MCP, hosted at mcp.didit.me/mcp. The KYC product page is didit.me/products/free-kyc, and every unit price used on this page is on didit.me/pricing.
Why these two fields exist
Illinois (BIPA), Texas (CUBI) and Colorado require a notice and an explicit release before a business collects face geometry, whether that geometry comes from a selfie or from the photo on an ID. Didit can show a consent step before the first face capture to the people those laws cover, and keeps the answer on the session as evidence.
That leaves a gap for teams that already ask. If your signup flow shows its own notice and records its own timestamp, you do not want a second screen in the verification asking the same person the same thing again. And if you already know the person lives in Illinois, you do not want us to guess from an IP address that may sit behind a VPN. The two optional Create Session fields close that gap. One declares the state. The other hands over the consent you already hold.
Didit shows the step and records the answer. You decide whether your user journey meets the biometric laws that apply to your business. This page is not legal advice, so review your implementation with your counsel. The full behaviour lives on Biometric consent for BIPA, CUBI and Colorado.
The consent step appears only when two things are true
A session shows the consent step when the workflow captures a face and the application's consent mode asks for it. Face capture means a Liveness, Face Match or Age Estimation step, the front-camera selfie the ID Verification step takes unless you turned it off, or full-session video recording.
The mode is set in the console under the application's Settings > Data and privacy > Biometric consent, and every change is written to the audit log.
| Mode | What happens | Trigger recorded |
|---|---|---|
| Auto (default, recommended) | Shows the step only where a trigger applies. Everyone else sees the standard one-line notice. | The first rule that applies, for example declared_state or ip_state |
| Always | Every person whose face is captured sees the step, wherever they are. | forced |
| Never | Didit never shows the step. Where state law requires consent, you collect it yourself before the selfie and keep the record. | None from Didit |

What triggers the step in Auto mode
Didit checks these rules in order and records the first one that applies in biometric_consent.trigger.
| Trigger | When it applies |
|---|---|
declared_state | You declared a covered state on Create Session, through user_state or a US address in expected_details. |
ip_state | The person's IP is located in Illinois, Texas or Colorado. |
ip_unknown | The person looks to be in the US but the state cannot be told: a US IP with no state, or no location while your details or the document place the person in the US. |
document_issuer | The identity document read at ID capture was issued by a covered state. |
Two more values describe how a session's consent was settled rather than why it was asked: forced when the mode is Always, and customer_collected when you sent consent you had already collected.
What user_state accepts and what it changes
user_state answers one question: where does this person live, when you already know. It takes an ISO 3166-2 subdivision code such as US-IL or ES-M, or a US state code or name such as IL or Illinois. The field is a string of at most 16 characters and it is optional.
In Auto mode, a covered state shows the step with trigger: declared_state. A value Didit does not recognise returns HTTP 400, so a typo in a state name fails loudly at create time instead of quietly skipping the consent screen.
This covers cases where IP-based location is inconclusive. VPNs, proxies and hosting networks do not ask on their own, and did not before. Didit locates the IP like any other request: one in Illinois, Texas or Colorado shows the step, one anywhere else does not. A person in a covered state behind a VPN that exits elsewhere, holding an ID that no covered state issued, is not asked. Sending user_state, or switching the application to Always mode, covers that case.
What biometric_consent accepts and what it changes
biometric_consent is the consent you already collected. It is an object with two members.
given_at: an ISO 8601 timestamp of when the person agreed. It cannot be in the future.text_version: your identifier for the exact notice text the person saw, up to 64 characters. Use something you can look up later, such as a version number or a commit hash of the copy.
Send it and the flow does not ask again. The decision records status: given with trigger: customer_collected, alongside the timestamp and text version you sent.

Prerequisites
| Item | What you need | Where it comes from |
|---|---|---|
| Plan | Any plan. The Free plan includes $10 of monthly credit for the first organization created with an eligible work email for a company domain, and sandbox testing is free and unlimited. | didit.me/pricing |
| API client | An API key sent in the x-api-key header. A wrong, malformed or revoked key returns 401, a missing key returns 403. | API authentication, API keys |
| Permissions | Create needs a key that can create sessions. Reading the decision needs a key with the read:sessions privilege; without it you get 403. | Retrieve Session API |
| Workflow | A KYC workflow that captures a face, and its stable UUID. | Console, and /v3/workflows/ |
| Console setting | A consent mode: Auto, Always or Never. | Application Settings > Data and privacy > Biometric consent |
Step by step: send both fields and read the result
Step 1: pick a workflow that captures a face
Open the Didit Business Console, go to Workflows, and pick the KYC workflow you will run. It needs at least one step that captures a face: Liveness, Face Match, Age Estimation, the default selfie inside ID Verification, or full-session video. Copy its workflow UUID. The workflow's type decides the session kind, so a KYC workflow creates a User Verification session and there is no separate endpoint to call.
Step 2: create an API key
Create a key in the console and store it as DIDIT_API_KEY. Every call below sends it in the x-api-key header to https://verification.didit.me. Reading decisions requires a key with the read:sessions privilege.
Step 3: choose the consent mode
In the application's Settings > Data and privacy > Biometric consent, pick Auto, Always or Never. Auto is the default and the one this guide assumes. Choose Never only if you collect consent entirely on your own screens and keep your own record, and pass biometric_consent so the session shows what you collected.
Step 4: send user_state when you know the state
Add the field to the body of POST https://verification.didit.me/v3/session/. Use US-IL, IL or Illinois. Any ISO 3166-2 subdivision works, for example ES-M for Madrid, so you can send the field everywhere and let Didit decide whether it matters.
Step 5: send biometric_consent when you already collected it
The example below is the documented payload. The two consent fields sit next to the workflow and your own user identifier.
curl -X POST https://verification.didit.me/v3/session/ \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "YOUR_WORKFLOW_ID",
"vendor_data": "user-42",
"user_state": "US-IL",
"biometric_consent": {
"given_at": "2026-10-13T09:12:00Z",
"text_version": "consent-v3"
}
}'
Send vendor_data as well. It binds the session to your user and is what duplicate detection compares across sessions, so a resubmit can be recognised against the earlier record instead of creating a second, unrelated session.
Step 6: read the decision
Call GET https://verification.didit.me/v3/session/{session_id}/decision/ with the read key. Branch on session_kind first, because the same endpoint returns user and business sessions. With pre-collected consent, the record you care about comes back like this:
{
"session_id": "6f1c2a4e-0000-0000-0000-000000000000",
"session_kind": "user",
"status": "Approved",
"biometric_consent": {
"trigger": "customer_collected",
"status": "given",
"given_at": "2026-10-13T09:12:00Z",
"text_version": "consent-v3"
}
}
Step 7: test in the sandbox, then check a native build
Arm a sandbox scenario on a sandbox application with sandbox_scenario, or with POST /v3/session/{session_id}/sandbox/arm/ while the session is still Not Started, and watch the decision come back without spending live credit. If your users verify inside a native app, confirm the SDK build is 4.10.0 or later before you rely on any of this, because older builds cannot show the step.

Field and event mapping
| You send | Decision shows | What the person sees |
|---|---|---|
user_state: US-IL, Auto mode, no pre-collected consent | trigger: declared_state, status pending until the person agrees | The consent step before the first face capture |
user_state: IL or Illinois | Same as US-IL | Same as US-IL |
user_state: ES-M, Auto mode | No declared_state trigger; other Auto-mode triggers such as ip_state or document_issuer can still apply | The standard one-line notice, unless another trigger applies |
biometric_consent with given_at and text_version | status: given, trigger: customer_collected, your timestamp and text version | No consent step; face capture starts |
| Nothing, Auto mode, IP in Texas | trigger: ip_state | The consent step |
| Nothing, Auto mode, US IP with no state | trigger: ip_unknown | The consent step |
| Application set to Always | trigger: forced | The consent step for everyone whose face is captured |
| Covered state, native SDK below 4.10.0 | required: true, status: pending, given_at: null, reason: BIOMETRIC_CONSENT_UNSUPPORTED_SDK | Nothing extra; the verification runs as it did before |
Testing with sandbox data and the errors you will hit
Sandbox testing is free and unlimited on every plan, so run the create call with a sandbox key before you touch live traffic. A correct request returns the session object with a session_id, a session_url and a status of Not Started. Open the URL, finish the flow, then read the decision and confirm the two fields you care about: biometric_consent.trigger and biometric_consent.status.
| Symptom | Cause | Fix |
|---|---|---|
400 with a field error on user_state | The value is not a recognised ISO 3166-2 subdivision or US state code or name | Send US-IL, IL or Illinois; fix the typo and retry |
400 on biometric_consent | given_at is in the future, or not valid ISO 8601 | Send the real collection time in UTC, for example 2026-10-13T09:12:00Z |
400 on callback mentioning allowed domains | The callback is not on an origin listed in allowed_domains | Add the origin, or use a custom URL scheme, which is always accepted |
| 401 | The key is wrong, malformed, revoked or expired | Check DIDIT_API_KEY or create a new key |
| 403 on create | No key was sent, the key has no access, or the request came from outside the key's IP list | Read the body, then fix the key or the IP list |
| 400 with a message about credits | The balance cannot cover the call | Top up at business.didit.me and retry |
Decision shows BIOMETRIC_CONSENT_UNSUPPORTED_SDK | A native SDK below 4.10.0 captured a face for a session that required consent | Upgrade to 4.10.0 or later, or send pre-collected consent |
The status codes and body shapes above are documented on Didit API errors. Rely on the status first and on the stable code when one is present, because message text can change.
What BIOMETRIC_CONSENT_UNSUPPORTED_SDK means and how to clear it
Native SDKs released before 4.10.0 do not know the consent step, so Didit never asks them for it. The verification runs exactly as it did before: the face captures are accepted and processed, and the session reaches its decision as usual. Didit never records consent that was not given, so a session that required consent and had a face captured by an older build carries this in the decision:
"biometric_consent": {
"required": true,
"trigger": "ip_state",
"status": "pending",
"given_at": null,
"reason": "BIOMETRIC_CONSENT_UNSUPPORTED_SDK"
}
The documented fix is to upgrade to native SDK 4.10.0 or later if you verify people in Illinois, Texas or Colorado inside a native app. The hosted flow, the Web SDK and WebView builds can show the step already, and so can React Native and Flutter releases that bundle native 4.10.0 or later. If you cannot move the build yet, the other documented route is to collect consent yourself before the selfie and send it in biometric_consent, which records status: given with trigger: customer_collected instead of leaving it pending.
What this costs on both ends
The Didit side has no line item for either field. The price book bills completed checks, not request properties, so user_state and biometric_consent are free to send and do not change the price of the check they travel with. A full KYC check is $0.33: ID document verification at $0.15, passive liveness at $0.10, face match 1:1 at $0.05 and device and IP analysis at $0.03. You can read every line on the pricing page.
On your side, the work is the request body: user_state when you know the state, and a biometric_consent object carrying the given_at timestamp and text_version you already store. Both are optional members of the Create Session request, so the record is written to the session you were already creating.
Worked example: 10,000 completed KYC checks a month, 2,500 of them for people in Illinois whose consent you collected on your own signup screen.
- Didit at list price: 10,000 x $0.33 = $3,300.00.
- On Growth, 4% off: 10,000 x $0.3168 = $3,168.00, a saving of $132.00. Growth costs $99.00 a month and includes $115.00 of credit.
- On Scale, 10% off: 10,000 x $0.297 = $2,970.00, a saving of $330.00. Scale costs $299.00 a month and includes $350.00 of credit.
- Cost added by
user_stateandbiometric_consent: $0.00 on every plan.
The MCP server is free on every plan, so driving the same call from an AI assistant adds nothing to the bill.
Disconnecting or rolling back
Stop sending both fields and future sessions follow the application’s configured consent mode. In Auto mode, Didit evaluates declared state, IP evidence, and document issuer evidence. Always asks every person whose face is captured, while Never shows no consent step. Existing sessions keep the consent record they were created with, which is what you want for an audit trail. To remove a session, call DELETE /v3/session/{id}/delete/ with a key that can do it. When you leave entirely, revoke the API keys in the console. The decision also carries biometric_retention with the jurisdictions that applied and the date the live biometric data of the session is deleted, so you can reconcile your own retention schedule against ours.
Two ways to run it: the API recipe and the MCP setup
The API recipe is the curl call in step 5. You keep the request, the key and the payload on your side.
If you work with an AI assistant, the Didit MCP server is hosted at mcp.didit.me/mcp with OAuth sign-in, and the setup page for each client is didit.me/developers/mcp. That page covers setup and connection. The documented way to create a session with a declared state and a pre-collected consent record is still the Create Session call above, and the documented way to read the result is the Retrieve Session API.
There is no separate connector for biometric consent itself: the fields ride on the Create Session call, and the MCP server is free on every plan.
Sources
- Didit docs: Create Session API
- Didit docs: Biometric consent for BIPA, CUBI and Colorado
- Didit docs: Sessions API overview
- Didit docs: Retrieve Session API
- Didit docs: Data models
- Didit docs: API errors, status codes and fixes
- Didit docs: API authentication
- Didit docs: API keys
- Didit KYC product page
- Didit pricing page and pricing as JSON, read November 26, 2026
- Didit MCP setup
- Didit site index for AI agents
Next step: open a sandbox account at business.didit.me, create one session with user_state set to US-IL, and read the decision back. Sandbox testing is free and unlimited, and no sales call is involved.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
What does user_state do in Didit's Create Session API?
user_state tells Didit where the person lives when you already know. In Auto consent mode, Illinois, Texas or Colorado makes the flow ask for explicit biometric consent before the first face capture, and the decision records trigger: declared_state. It is optional and takes at most 16 characters.
Which formats does user_state accept?
An ISO 3166-2 subdivision code such as US-IL or ES-M, or a US state code or name such as IL or Illinois. Anything Didit does not recognise returns HTTP 400 at create time.
What happens if I send an invalid user_state?
The create call fails with HTTP 400 on that field and no session is created. Fix the value and retry; nothing else in the payload needs to change.
Does sending biometric_consent stop the consent screen from showing?
Yes. When you send biometric_consent with given_at and text_version, the flow does not ask again and the decision records status: given with trigger: customer_collected, together with the timestamp and text version you sent.
Can given_at be in the future?
No. given_at must be an ISO 8601 timestamp that is not in the future. Send the moment the person actually agreed, in UTC, for example 2026-10-13T09:12:00Z.
What is text_version for?
text_version is your identifier for the exact notice text the person saw, up to 64 characters. It travels with the session, so months later you can show which version of your copy the consent referred to.
Why does my decision say BIOMETRIC_CONSENT_UNSUPPORTED_SDK?
A native SDK below 4.10.0 captured a face for a session that required consent. Those builds cannot display the step, and Didit never records consent that was not given, so the decision shows required: true, status: pending, given_at: null and that reason. Upgrade to 4.10.0 or later, or send pre-collected consent.
Which flows can show the biometric consent step?
The hosted verification flow, the Web SDK and a WebView can show it. Native SDK 4.10.0 or later can show it, including React Native and Flutter releases that bundle native 4.10.0 or later. A native SDK below 4.10.0, or one that does not report its version, cannot.
Does user_state affect the decision or the verification score?
No. user_state selects whether the consent step applies. It does not change the identity checks, the face match, the liveness result or the overall status of the session.
Do these two fields cost extra?
No. Didit bills completed checks, not request properties, so sending user_state and biometric_consent adds nothing to the $0.33 full KYC price or to any other line on the price list.
Does using the API settle my BIPA, CUBI or Colorado obligations?
No. Didit shows the step and records the answer, and you decide whether your user journey meets the biometric laws that apply to your business. Treat the API record as evidence, not as a legal opinion, and review your implementation with your counsel.
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.
Your obligations · 3 regions
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.
- 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.
Didit Academy


