Skip to main content

API Reference (Quick Index)

Base URL: https://api.attestid.brimsage.co.ls (production). All routes below are prefixed /v1 unless shown otherwise.

Auth column:

  • API key: X-API-Key + X-Access-Key-Id headers, plus your client certificate (mutual TLS). See Authentication.
  • SDK token: Authorization: Bearer <sdk_token>.
  • Dashboard: a logged-in dashboard user (these are the dashboard's own endpoints; most integrations use the dashboard UI instead).

Account & company management (/v1/account)​

MethodPathAuthPurpose
POST/account/registernoneRegister your company. Sends a verification email. No API key is issued yet.
POST/account/verify-emailnoneConfirm the email with the token from the link. Activates the account and returns your first test API key (shown once).
POST/account/resend-verificationnoneSend a new verification link. Always returns the same message.
GET/account/meAPI keyGet your company's details.
POST/account/me/keysAPI keyIssue another API key (test or live). Shown once.
GET/account/me/keysAPI keyList key prefixes and metadata (no secrets).
DELETE/account/me/keys/{key_id}API keyRevoke a key. Irreversible.
DELETE/account/me/data?user_id=...API keySchedule erasure of a user's personal data and photos within 72 hours (Lesotho Data Protection Act).

See Creating a Company & Getting Your Keys for full request and response bodies.


KYC verification (/v1/kyc)​

MethodPathAuthPurpose
POST/kyc/sessionAPI keyExchange your API key for a 10-minute sdk_token bound to one user_id. Call only from your backend.
POST/kyc/device/challengeSDK tokenSingle-use nonce for device-key registration or for signing one capture.
POST/kyc/device/registerSDK tokenRegister the device's capture-signing public key.
POST/kyc/startSDK tokenUpload the ID photo (multipart/form-data: user_id, id_type, id_photo, consent_given_at, processing_purpose, plus optional capture-signing fields). Returns verification_id and the face-check session.
POST/kyc/{verification_id}/liveness-retrySDK tokenRetry a failed face check without re-uploading the ID. Same response shape as /kyc/start.
POST/kyc/completeSDK tokenComplete the verification after the face check (verification_id form field). Returns verified, status, message, failure_reason, document, checks and a signed attestation.
GET/kyc/{verification_id}SDK tokenRetrieve a verification result, including attestation.
GET/kyc/{verification_id}/documents?purpose=...SDK tokenLinks to the captured ID photo and selfie, valid for 5 minutes. Every call is audit-logged with its purpose.

POST /kyc/* requests accept an Idempotency-Key header for safe retries. The SDKs send it for you, and run the face check itself through AttestID endpoints that aren't part of the public API.

The JavaScript/React SDK and Flutter SDK wrap all of these calls.


Webhooks (/v1/webhooks)​

MethodPathAuthPurpose
POST/webhooks/configureAPI keySet or update your webhook URL. Returns a new signing secret, shown once. Starts a 24-hour rotation overlap if a secret already existed.
POST/webhooks/rotation/confirmAPI keyStop signing with the previous secret immediately.
GET/webhooks/configureAPI keyGet your webhook URL, whether a secret is set, and when the previous secret stops signing.
DELETE/webhooks/configureAPI keyRemove your webhook URL and secrets; stops delivery.
GET/company/webhook/deliveriesDashboardList recent delivery attempts and their status.

See Webhooks for event types, payloads, retries, and how to verify the AttestID-Signature and AttestID-JWS headers.


Dashboard: keys and certificates (/v1/company)​

MethodPathAuthPurpose
POST/company/keys/{key_id}/rotateDashboardIssue a replacement key. The old key keeps working for 24 hours.
POST/company/keys/{new_key_id}/confirm-rotationDashboardRevoke the replaced key immediately.
GET/company/client-certificatesDashboardList your client certificates, including revoked and expired ones.
POST/company/client-certificatesDashboardIssue a client certificate from your CSR (certificate_request, optional label).
DELETE/company/client-certificates/{cert_id}DashboardRevoke a certificate. Takes effect on the next request.

Public keys​

MethodPathAuthPurpose
GET/.well-known/jwks.json (no /v1 prefix)noneAttestID's public signing keys, for verifying result attestations and the AttestID-JWS webhook header.

Key, token and certificate cheat sheet​

ValueFormatWhere it's used
access_key_idak_live_... / ak_test_...X-Access-Key-Id header, paired with api_key
api_keysk_live_... / sk_test_...X-API-Key header. Shown only once, at creation
Client certificateX.509, issued from your CSR, valid 365 daysPresented on the TLS connection for every API-key request
sdk_tokenSigned token, 10-minute expiryAuthorization: Bearer on all /kyc/* SDK calls
Webhook secretwhsec_...Verifying AttestID-Signature. Shown only once
attestationES256 JWSProof of a verification decision. Verify on your backend
Dashboard sessionSigned session token, 8-hour expiryDashboard login. Not used by the SDK

Common errors​

StatusWhen
401Bad or missing API key, missing or invalid client certificate, or an expired SDK token
402Plan limit reached (plan_limit_exceeded) or spend limit reached
403The identity is under fraud review or has been flagged (fraud_review_required, identity_flagged_fraudulent)
409A request with this Idempotency-Key is still processing (see Retry-After), or a liveness retry was refused
410A liveness session, retry window or verification link has expired
413 / 415Upload too large, or not a JPEG/PNG photo (or MP4/WebM/QuickTime video)
422Invalid input, for example a consent timestamp older than 24 hours, an unknown processing_purpose, or a reused Idempotency-Key with a different body
429Rate limited

Support​

For API keys, onboarding, or technical support: support@brimsage.co.ls