API documentation

Everything you need to integrate trusqo into your application.

Authentication

All API requests require an API key passed in the X-API-Key header. You can create and manage API keys from the dashboard.

curl https://app.trusqo.com/api/verify \
  -H "X-API-Key: YOUR_API_KEY"

Requests without a valid API key will receive a 401 Unauthorized response.

Submit a verification

POST /api/verify

Submit a document for proof of address verification. The request must be sent as multipart/form-data.

Required fields

FieldTypeDescription
namestringFull name of the person to verify
addressstringAddress to verify against
filesfile(s)One or more document files (PDF, JPG, PNG, WEBP)

Optional fields

FieldTypeDefaultDescription
postcodestringPostcode to verify separately
acceptedDocTypesJSON arrayFrom settingsRestrict accepted document types
acceptedDateFromYYYY-MM-DDFrom settingsEarliest acceptable issue date
acceptedDateToYYYY-MM-DDFrom settingsLatest acceptable issue date
nameMatchEnabledbooleantrueEnable name matching
nameMatchThresholdfloat (0–1)0.8Minimum name match score to pass
addressMatchEnabledbooleantrueEnable address matching
addressMatchThresholdfloat (0–1)0.8Minimum address match score to pass
postcodeMatchEnabledbooleanfalseEnable postcode matching
postcodeMatchThresholdfloat (0–1)0.7Minimum postcode match score to pass

Example request

curl -X POST https://app.trusqo.com/api/verify \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "name=John Doe" \
  -F "address=123 Main Street, London SW1A 1AA" \
  -F "postcode=SW1A 1AA" \
  -F 'acceptedDocTypes=["utility-bill","bank-statement"]' \
  -F "acceptedDateFrom=2025-08-01" \
  -F "acceptedDateTo=2026-02-21" \
  -F "nameMatchEnabled=true" \
  -F "nameMatchThreshold=0.8" \
  -F "addressMatchEnabled=true" \
  -F "addressMatchThreshold=0.8" \
  -F "postcodeMatchEnabled=true" \
  -F "postcodeMatchThreshold=0.7" \
  -F "files=@utility-bill.pdf"

Response

Returns 202 Accepted with a request ID. The verification is processed asynchronously.

{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Get verification result

GET /api/verify/{id}

Retrieve the result of a verification request by its ID. Poll this endpoint until status changes from pending/processing.

Response fields

FieldTypeDescription
idstringRequest ID
statusstringpending, processing, approved, declined, needs_review, or errored
createdAtISO 8601Timestamp of submission
providedNamestringName submitted for verification
extractedNamestring | nullBest-match extracted name
extractedNamesarrayAll names found in the document
nameMatchScorefloat | nullName similarity score (0–1)
nameMatchThresholdfloatThreshold used for name matching
nameMatchResultstring | nullpass or fail
nameMatchNotesstring | nullAdditional notes on the name match
providedAddressstringAddress submitted for verification
extractedAddressstring | nullBest-match extracted address
extractedAddressesarrayAll addresses found in the document
addressMatchScorefloat | nullAddress similarity score (0–1)
addressMatchThresholdfloatThreshold used for address matching
addressMatchResultstring | nullpass or fail
addressMatchNotesstring | nullAdditional notes on the address match
providedPostcodestring | nullPostcode submitted for verification
extractedPostcodestring | nullPostcode from the best-match address
postcodeMatchScorefloat | nullPostcode match score (0–1)
postcodeMatchResultstring | nullpass or fail
postcodeMatchNotesstring | nullAdditional notes on the postcode match
extractedDocTypestring | nullDetected document type
acceptedDocTypesarrayDocument types that were accepted
docTypeResultstring | nullpass or fail
extractedDateOfIssuestring | nullBest-match detected issue date
extractedDatesarrayAll dates found in the document
acceptedDateFromstring | nullEarliest accepted date used
acceptedDateTostring | nullLatest accepted date used
dateResultstring | nullpass or fail
errorMessagestring | nullError details if processing failed

Example response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "approved",
  "createdAt": "2026-02-21T14:30:00.000Z",

  "providedName": "John Doe",
  "extractedName": "John A. Doe",
  "extractedNames": ["John A. Doe", "J. Doe"],
  "nameMatchScore": 0.92,
  "nameMatchThreshold": 0.8,
  "nameMatchResult": "pass",
  "nameMatchNotes": null,

  "providedAddress": "123 Main Street, London SW1A 1AA",
  "extractedAddress": "123 Main St, London SW1A 1AA",
  "extractedAddresses": [
    { "address": "123 Main St, London SW1A 1AA", "postcode": "SW1A 1AA" }
  ],
  "addressMatchScore": 0.95,
  "addressMatchThreshold": 0.8,
  "addressMatchResult": "pass",
  "addressMatchNotes": null,

  "providedPostcode": "SW1A 1AA",
  "extractedPostcode": "SW1A 1AA",
  "postcodeMatchScore": 1.0,
  "postcodeMatchResult": "pass",
  "postcodeMatchNotes": null,

  "extractedDocType": "utility-bill",
  "acceptedDocTypes": ["utility-bill", "bank-statement"],
  "docTypeResult": "pass",

  "extractedDateOfIssue": "2026-01-15",
  "extractedDates": ["2026-01-15"],
  "acceptedDateFrom": "2025-08-01",
  "acceptedDateTo": "2026-02-21",
  "dateResult": "pass",

  "errorMessage": null
}

Accepted document types

Use these values in the acceptedDocTypes field to restrict which documents are accepted:

ValueDescription
utility-billGas, electricity, water, or internet bills
bank-statementBank or building society statements
government-letterLetters from government agencies (tax, benefits, etc.)
medical-or-pharmacy-billHealthcare providers, pharmacies
post-office-letterPostal services, courier companies
life-insuranceInsurance companies (life insurance only)

Webhooks

Configure webhook URLs in the dashboard to receive real-time notifications when verification status changes. Webhooks are sent as POST requests with a JSON payload.

Event types

EventDescription
verification.processingVerification has started processing
verification.completedVerification finished (approved, declined, or needs review)
verification.failedVerification encountered an error

Headers

Each webhook request includes these headers:

HeaderDescription
X-Signature-256HMAC-SHA256 signature of the payload, formatted as sha256=<hex>
X-Webhook-EventThe event type (e.g. verification.completed)

Verify authenticity by computing HMAC-SHA256(payload, your_webhook_secret) and comparing it to the X-Signature-256 header value.

Payload

{
  "event": "verification.completed",
  "timestamp": "2026-02-21T14:30:05.000Z",
  "data": {
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "approved",
    "providedName": "John Doe",
    "providedAddress": "123 Main Street, London SW1A 1AA",
    "extractedName": "John A. Doe",
    "extractedAddress": "123 Main St, London SW1A 1AA",
    "nameMatchScore": 0.92,
    "nameMatchResult": "pass",
    "addressMatchScore": 0.95,
    "addressMatchResult": "pass",
    "extractedDocType": "utility-bill",
    "errorMessage": null
  }
}

Error responses

All errors follow this format:

{
  "error": "Description of the error"
}
StatusMeaning
400Missing or invalid required fields
401Missing or invalid API key
402Usage limit exceeded or no active subscription
404Verification request not found
500Internal server error