TrustVerify logoTrustVerify
Docs menu

Create a hosted verification link

POST /api/v1/kyc/links

POST https://api.trustverify.co.uk/api/v1/kyc/links

Creates a one-time link to a hosted identity check page (ID document, selfie and liveness check). The person opens the URL, completes the check, and the result is available on GET /api/v1/kyc/links/{id} and, when configured, on the verification.completed webhook. The url is returned only on this create response. A test key (tv_test_sk_…) creates a sandbox link and never runs a paid check. A live key is refused when the account cannot run live identity checks (plan, included feature, owner verification, or monthly allowance). There is no list endpoint.

Request body#

Request body fields
FieldTypeDescription
externalReferencestringYour own id for this person (also accepted as `reference`). Echoed unchanged on the link and on verification.completed.
fullNamestringOptional. Shown to the person on the check page. Not returned on later reads.
returnUrlstringOptional. An https URL the person is sent back to when they finish.
expiresInMinutesintegerFrom 15 to 10080 (7 days). Default is 4320 (72 hours).
sandboxOutcomestring: "approve" | "review" | "block"With a test key, the result the link will return once it is opened. Ignored for live keys. Aliases accepted: approved or passed → approve; blocked, failed or rejected → block. Also accepted as metadata.forceStatus.
sharetribeUserIdstringSharetribe user id (UUID). If set, Sharetribe must already be connected on this account, or the call is 400 sharetribe_not_connected.
ifPendingstring: "reject" | "replace"Optional, needs externalReference. What to do if a link for the same externalReference is already open (unused and unexpired). "reject" answers 409 verification_already_open and creates nothing; "replace" cancels the open link and issues a new one. If the person has already submitted and the check is running, both answer 409 verification_in_progress. Left out, a new link is always created.

Example request#

curl -sS -X POST 'https://api.trustverify.co.uk/api/v1/kyc/links' \
  -H "Authorization: Bearer $TRUSTVERIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "externalReference": "order_12345",
  "fullName": "Jane Example",
  "returnUrl": "https://example.com/verification/done"
}'

Responses#

201 Link created — includes the one-time url

201 response fields
FieldTypeDescription
idrequiredstring
objectrequiredstring: "verification_link"
urlstringThe one-time hosted page URL. Returned only when the link is created. GET and cancel do not include it, so a later read cannot recover the token.
statusrequiredstring: "pending" | "submitted" | "completed" | "cancelled" | "expired"expired is computed on read for a pending link whose expiresAt has passed; it is not stored
environmentrequiredstring: "test" | "live"
externalReferencerequiredstring,null
sharetribeUserIdrequiredstring,null
expiresAtrequiredstring,null
createdAtrequiredstring,null
submittedAtrequiredstring,null
completedAtrequiredstring,null
resultrequired

400 validation_failed (returnUrl must be https, expiresInMinutes out of range, sharetribeUserId not a UUID, or a field too l

validation_failed (returnUrl must be https, expiresInMinutes out of range, sharetribeUserId not a UUID, or a field too long or not a string) or sharetribe_not_connected

401 Missing, invalid or revoked API key

403 A live key was used on an account that cannot run live identity checks (plan, included feature, or owner verification).

409 Only with ifPending: verification_already_open (a link for this externalReference is already open; nothing was created)

Only with ifPending: verification_already_open (a link for this externalReference is already open; nothing was created) or verification_in_progress (the person has submitted and the check is running). The body has the existing linkId.

429 QUOTA_EXCEEDED — all identity checks included in the plan this month are used. Nothing was charged. Or the per-minute ke

QUOTA_EXCEEDED — all identity checks included in the plan this month are used. Nothing was charged. Or the per-minute key limit was reached.

503 hosted_links_unavailable — hosted verification links cannot be served right now. Try again later.

Last updated 14 November 2026. Something unclear or wrong? Tell us.