Basics

Guides

Getting started

The Connect API from your server — base URL, keys and modes, projects, headers, idempotency, errors and the SDK.

Access to the Connect API is on request at didconnect.xyz/access. A test key reaches every product; nothing a test session does is visible in live mode.

These guides are for a platform that integrates Connect from its server. There is one guide per product: Connect ID signs people in, Connect Verify runs KYC and KYB, LENS scores transactions and raises alerts, Deeplytics measures the funnel and Cortex answers questions about the data. The full contract of each route is in the API reference.

Base URL

https://api.didconnect.xyz

Each product sits under its own prefix: /id, /verify/v1, /lens, /deeplytics/v1, /cortex/v1, /webhooks. Any other path answers 404.

Keys and modes

A request carries its key in the X-API-Key header. The mode of a request is the mode of its key.

KeyModeWhat it does
dc_test_…testSessions, events and decisions are kept apart from live. No attestation is issued
dc_live_…liveReal people, real transactions

Keys stay on your server: never in a browser, a mobile application or a repository. The browser gets a short-lived client_token per verification session instead (see Hosted page).

Projects

A project separates flows, sessions, customers, events, rules and webhooks. Every account starts with a default project, main. Send DidConnect-Project: <slug or id> to work in another one. A resource of another project answers 404.

Errors

Every error has the same envelope:

{
  "error": {
    "type": "invalid_request_error",
    "code": "VALIDATION_ERROR",
    "message": "flow_id is required",
    "param": "flow_id",
    "doc_url": "https://docs.didconnect.xyz/api-reference/errors#validation_error",
    "request_id": "req_8f2c1e"
  }
}

Parse code, not message. Quote request_id to support. Every code is listed in Errors.

The SDK

npm install @didconnect/sdk
import { DidConnect } from '@didconnect/sdk';

const dc = new DidConnect({ apiKey: process.env.DIDCONNECT_API_KEY! });
const levels = await dc.verify.levels();

Next: Quickstart, a first verification end to end.

On this page