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
| Parameter | Type | Description |
|---|---|---|
requester_entity | string | Your organization identifier |
claim_type_id | string | The type of credential to verify |
customer_email | string | Email of the person being verified |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
customer_name | string | Display name for the holder |
tenant_id | string | Override tenant (multi-tenant setups) |
expires_in_minutes | number | Expiration time (1-10080, default varies) |
idempotencyKey | string | Prevent 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 });