Skip to main content

API keys

Didit API keys for the verification API

One header authenticates every call. Give each service its own key, with only the access it needs.

x-api-key: $DIDIT_API_KEY

Use

One header on every call

An API key is the secret that identifies your application. Send it from your server.

Headerx-api-key, with the whole key, prefix included.
Server side onlyNever put a key in a browser, a mobile app or a public repository.
StorageRead it from an environment variable or a secrets manager, not from source code.

A 401 or 403 means fix the key. Sending the same request again will fail the same way.

curl -X POST https://verification.didit.me/v3/session/ \  -H "x-api-key: $DIDIT_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "workflow_id": "'"$DIDIT_WORKFLOW_ID"'",    "vendor_data": "internal-user-id",    "callback": "https://myapp.com/done"  }'
ReplyWhat it means
401
The key is wrong, malformed, revoked or expired.
403
No key was sent, the key has no access to this action, or the call came from outside its IP list.
404
On a session route, the session is outside the workflows or statuses of the key.

Format

Live and sandbox keys

The prefix tells you which kind of application a key belongs to.

Live

sk_live_

The key of a live application. It runs real verifications, and they are billed.

Sandbox

sk_test_

The key of a sandbox application. Every check is mocked and never billed.

Per applicationA key belongs to one application and works only for it. An application is one project or environment in your account.
Primary keyEvery application starts with a primary key that has full access. You can add named keys next to it.
ShapeThe prefix, then 43 URL-safe characters.
Older keysKeys created before this format have no prefix and still work.

Scoped keys

Give each key only what it needs

A scoped key is a named key with limited access. Use one for each service or partner.

Start from a preset

PresetAccess
Full access
Every resource, read and write. For your own backend.
Read only
Sessions and decisions, with media optional. For a partner that needs results.
Custom
You choose None, Read or Write for each resource.

Then add limits

WorkflowsThe key sees and creates sessions of the workflows you pick.
Approved sessions onlyDeclined, in-review and unfinished sessions stay hidden.
IP addressesUp to 20 addresses or ranges, IPv4 or IPv6.
ExpiryNever, 30 days, 90 days, a year or a date you pick.

Access for each resource

ResourceReadWrite
Sessions
Decisions
Media
People
Companies
Transactions
Workflows
Webhooks
Application settings
Analytics

Each resource can also be set to None. Read covers GET requests. Write also covers POST, PUT, PATCH and DELETE. Standalone checks need Sessions write.

Read the docsScoped API keys

Manage

Rotate, revoke, audit

You manage keys in the console. There is no API for it.

  • Shown once. Copy the secret when you create the key. If you lose it, rotate the key.
  • Rotate with no downtime. The old secret keeps working for 24 hours after you rotate.
  • Revoke at once. Every call with a revoked key gets a 401. It cannot be undone.
  • Edit access. Change resources, limits or expiry. The secret stays the same and the change applies within a minute.
  • Usage for each key. Requests over 30 days, error rate, latency and the latest calls.
  • Audit trail. Every call appears in the audit logs with the name of the key that made it.
ConsoleDevelopersAPI keys
API keys in the docs

No browser

Get a key from the terminal

Two calls create an account and return its keys. This is how an AI agent starts.

1

Register

Send an email and a password. Didit emails a code of 6 characters that lasts 10 minutes.

POST/auth/v2/programmatic/register/
2

Verify the code

Send the code back. The response carries a live key and a sandbox key.

POST/auth/v2/programmatic/verify-email/
curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \  -H "Content-Type: application/json" \  -d '{"email": "you@yourdomain.com", "password": "MyStr0ng!Pass"}'
What you getAn organization, a live application and a sandbox application, each with its api_key.
Use a real inboxAddresses on test domains such as @example.com are refused.
Start in the sandboxThe sandbox key is free to use. Live checks need credit on the organization.

Other credentials

Tokens that are not API keys

Didit uses a few other secrets. Each has one job.

CredentialWhere it goesWhat it is for
session_token
Native SDKs, and the Session-Token header
Opens one session for one user. Create session returns it. It is not your API key.
sdk_token
The X-Transaction-Token header
Lets a client SDK send transactions. Short-lived and tied to one vendor_data value.
monitoring_token
The X-Monitoring-Token header
Lets a device send monitoring events. Short-lived and tied to one vendor_data value.
Access token
An Authorization: Bearer header
Proves an end user signed in with the Authentication product.
Publishable key
The Authentication SDKs
Identifies your application. It never grants server access.
secret_shared_key
Your webhook endpoint
Signs webhooks. Each destination has its own.

Only the API key goes in x-api-key, and only from your server.

Questions

Questions about API keys

How do I authenticate with the Didit API?
Send your API key in the x-api-key header on every request, from your server.
Where do I find my API key?
In the Business Console, select your application and open Developers, API keys. Every application has a primary key.
What is the difference between sk_live_ and sk_test_?
A key that starts with sk_live_ belongs to a live application and runs real, billed verifications. A key that starts with sk_test_ belongs to a sandbox application, where every check is mocked and free.
What is a scoped API key?
A named key with limited access. You choose None, Read or Write for each resource, and you can limit it to some workflows, to approved sessions, to a list of IP addresses and to an expiry date.
How do I rotate a key?
Rotate it in the console. The new secret is shown once and the old one keeps working for 24 hours, so you can deploy without downtime.
Can I use my API key in a browser or a mobile app?
No. Keep it on your server. Client apps use the session token that create session returns.
What does a 401 or a 403 from the Didit API mean?
A 401 means the key you sent is wrong, malformed, revoked or expired. A 403 means no key was sent, the scoped key has no access to that resource or action, or the request came from an address outside the key's IP list. A 404 on a session route can mean the session is outside the key's workflow or status limits.
Should my code check that a key starts with sk_live_ or sk_test_?
No. New Didit keys start with sk_live_ or sk_test_ followed by 43 URL-safe characters, but keys created before this format have no prefix and keep working unchanged. Send the whole key, prefix included, in the x-api-key header, and never reject a key because it has no prefix.
Can I get API keys without opening the console?
Yes. Register with POST /auth/v2/programmatic/register/ on apx.didit.me, then send the emailed code to /auth/v2/programmatic/verify-email/. The response returns an organization with a live application and a sandbox application, each with its own api_key. Build and test with the sandbox key, which is mocked and never billed, and switch to the live key to go live.
Do the verification API and the account API use the same credentials?
No. Every /v3/ route on verification.didit.me, such as sessions, workflows, standalone APIs and webhooks, takes your long-lived API key in the x-api-key header. The account and application management routes on apx.didit.me take a JWT (JSON Web Token) access token in an Authorization: Bearer header instead. Never send the JWT to the verification API.
What happens to my keys when I delete an application?
They stop working. For a few minutes after the deletion, the API answers a call with that key with a 403 and the code application_deleted. After that, it refuses the key like any invalid key. Do not retry: the application and its keys no longer exist, so use a key that belongs to an application that still exists.
Should several services share one API key?
No. Give each service or partner its own scoped key instead of sharing the primary one, so each gets only the access it needs and can be revoked on its own. Rate limits are also counted per key, so a shared key lets one noisy service use up the budget of the others. Use a separate application per environment, brand or customer.
Where do I find my organization ID?
In the Didit Business Console, open Organization Settings. The Organization ID field shows your organization's UUID next to its name, with a copy button, so no API call is needed. You use it in organization-scoped paths such as /auth/v2/organizations/me/{org_id}/applications/.

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.

  • Trusted by EU regulators

    After a year of supervised testing, EU financial regulators confirmed that verifying with Didit is safer than checking an ID in person.

  • 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.

Start

Create a key

Create an account, open Developers and copy your sandbox key.

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