Skip to main content

Creating Verification Requests

Basic Creation

const result = await client.proofRequests.create({
requester_entity: 'my-org',
claim_type_id: 'passport',
customer_email: 'holder@example.com',
});

Required Parameters

ParameterTypeDescription
requester_entitystringYour organization identifier
claim_type_idstringThe type of credential to verify
customer_emailstringEmail of the person being verified

Optional Parameters

ParameterTypeDescription
customer_namestringDisplay name for the holder
tenant_idstringOverride tenant (multi-tenant setups)
expires_in_minutesnumberExpiration time (1-10080, default varies)
idempotencyKeystringPrevent duplicate requests

Idempotent Requests

Pass an idempotencyKey to safely retry without creating duplicates:

const result = await client.proofRequests.create({
requester_entity: 'my-org',
claim_type_id: 'passport',
customer_email: 'holder@example.com',
idempotencyKey: `verify-${orderId}`,
});

The same idempotency key within a time window returns the original response.

Listing Requests

// All requests
const { data, pagination } = await client.proofRequests.list();

// Filter by status
const pending = await client.proofRequests.list({ status: 'pending' });

// Filter by holder
const holderRequests = await client.proofRequests.list({
holder_did: 'did:key:z6Mk...',
});

// Paginate
const page2 = await client.proofRequests.list({ page: 2, limit: 25 });

Getting a Single Request

const request = await client.proofRequests.get('request-uuid');

console.log(request.status);
console.log(request.verified_credentials);

Cancelling a Request

await client.proofRequests.cancel('request-uuid');

This is a permanent action. Cancelled requests cannot be reopened.

Available Providers

Check which claim types are available:

const { data } = await client.providers.list();
// [{ id: '...', name: 'Passport', code: 'passport', active: true }, ...]

// Only active providers
const active = await client.providers.list({ active: true });