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)

Optional fields

FieldTypeDefaultDescription
postcodestringPostcode to verify separately
acceptedDocTypesJSON arrayAll typesRestrict accepted document types
acceptedDateFromYYYY-MM-DDFrom settingsEarliest acceptable issue date
acceptedDateToYYYY-MM-DDFrom settingsLatest acceptable issue date
nameMatchThresholdfloat (0–1)0.8Minimum name match score to pass
addressMatchThresholdfloat (0–1)0.8Minimum address 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 "nameMatchThreshold=0.8" \
  -F "addressMatchThreshold=0.8" \
  -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, or needs_review
createdAtISO 8601Timestamp of submission
nameMatchScorefloat | nullName similarity score (0–1)
nameMatchResultstring | nullpass or fail
addressMatchScorefloat | nullAddress similarity score (0–1)
addressMatchResultstring | nullpass or fail
postcodeMatchScorefloat | nullPostcode match score
postcodeMatchResultstring | nullpass or fail
extractedDocTypestring | nullDetected document type
docTypeResultstring | nullpass or fail
extractedDateOfIssuestring | nullDetected issue date
dateResultstring | nullpass or fail
extractedNamestring | nullBest-match extracted name
extractedAddressstring | nullBest-match extracted address
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",
  "nameMatchScore": 0.92,
  "nameMatchThreshold": 0.8,
  "nameMatchResult": "pass",

  "providedAddress": "123 Main Street, London SW1A 1AA",
  "extractedAddress": "123 Main St, London SW1A 1AA",
  "addressMatchScore": 0.95,
  "addressMatchThreshold": 0.8,
  "addressMatchResult": "pass",

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

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

  "extractedDateOfIssue": "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.)

Webhooks

Configure webhook URLs in the dashboard to receive real-time notifications when verification results are ready. Webhooks are sent as POST requests with a JSON payload containing the full verification result.

Each webhook includes an X-Webhook-Secret header with the secret you configured, so you can verify authenticity.

Error responses

All errors follow this format:

{
  "error": "Description of the error"
}
StatusMeaning
400Missing or invalid required fields
401Missing or invalid API key
404Verification request not found
500Internal server error