Skip to main content

Lookup API

Query verifications by document number, metadata, ID, or date.

Authentication

Use your webhook_secret as a Bearer token:

Authorization: Bearer TR_WHS_xxx

All queries are scoped to your account — you cannot see other clients' verifications.

GET /api/v1/public/kyc/verifications

Parameters

ParameterTypeDescription
qstringSearches three places: the verification_id, the metadata you sent in the widget, and the document data extracted by OCR (name, document number, etc)
statusstringFilter by status: pending, processing, approved, rejected
fromdateFrom date (YYYY-MM-DD)
todateTo date (YYYY-MM-DD)
limitintPage size (default 20, max 100)
offsetintPagination offset (default 0)

How search works (q)

The q parameter searches simultaneously across:

  1. Verification ID — the UUID Trusty generates on init (e.g. 601e510f-b0c4-...)
  2. Metadata — the JSON you sent in the widget (e.g. {"userId":"123"}). Searching userId will find that verification
  3. Document data (OCR) — data the AI extracted from the document: full name, document number, date of birth, etc

It's a partial match (LIKE). q=60518799A finds any verification where the extracted document number contains that text.

Example: search by document number

curl "https://trusty-api.trusty.sh/api/v1/public/kyc/verifications?q=60518799A" \
-H "Authorization: Bearer TR_WHS_xxx"

Example: search by userId (metadata)

curl "https://trusty-api.trusty.sh/api/v1/public/kyc/verifications?q=user123" \
-H "Authorization: Bearer TR_WHS_xxx"

Example: filter by status and date

curl "https://trusty-api.trusty.sh/api/v1/public/kyc/verifications?status=approved&from=2026-07-01&to=2026-07-31&limit=10" \
-H "Authorization: Bearer TR_WHS_xxx"

Response 200

{
"items": [
{
"id": "601e510f-b0c4-4f6d-a8a2-132fb9b40cf3",
"status": "approved",
"country_code": "ES",
"city": "Madrid",
"failure_reason": null,
"full_name": "GUILLERMO DANIEL CANELON LOVERA",
"document_number": "60518799A",
"metadata": { "userId": "123" },
"created_at": "2026-07-24 02:56:48",
"updated_at": "2026-07-24 03:17:05"
}
],
"total": 57,
"limit": 20,
"offset": 0
}

Response fields

FieldDescription
idVerification UUID
statusCurrent status: pending, processing, approved, rejected
country_codeCountry where the verification was performed (ISO 2-letter code)
cityCity where the verification was performed
failure_reasonIf rejected, comma-separated reasons. If approved, null
full_nameFull name extracted from the document via OCR
document_numberDocument number extracted via OCR
metadataThe JSON you sent in the widget, unmodified
created_atCreation date
updated_atLast update date

Use cases

  • Search by userId: ?q=user123 — searches the metadata you sent
  • Search by ID: ?q=60518799A — searches the extracted document data
  • Check for duplicates: search by document number to see if already verified
  • Audit by date: ?from=2026-07-01&to=2026-07-31

Errors

StatusErrorDescription
401unauthorizedToken invalid or missing