Skip to content

TrustCaptcha API

The public TrustCaptcha API consists of one server-side call: fetching a verification result with the verification token your frontend widget produced. Everything else (creating verifications, solving challenges) is done by the widget itself — your backend never calls those endpoints.

Request
curl "https://api.trustcomponent.com/captcha/v2/verifications/{verificationId}/results" \
-H "Authorization: Bearer ak_your_key_here"
ParameterDescription
verificationIdUUID, extracted from the verification token the widget adds to your form
AuthorizationA Project API key (ak_…) as bearer token
Response (200)
{
"captchaId": "",
"verificationId": "",
"verificationPassed": true,
"score": 0.3,
"decisionType": "STANDARD",
"decisionAction": "ALLOW",
"gatewayFailoverActive": false,
"riskScoringEnabled": true,
"minimalDataModeEnabled": false,
"origin": "https://www.example.com",
"ipAddress": "203.0.113.7",
"countryCode": "DE",
"deviceFamily": "Mac",
"operatingSystem": "Mac OS X",
"browser": "Firefox",
"verificationStartedAt": "2026-07-01T10:29:55.000Z",
"verificationFinishedAt": "2026-07-01T10:30:00.000Z",
"resultExpiresAt": "2026-07-01T10:45:00.000Z",
"resultFirstFetchedAt": "2026-07-01T10:30:02.000Z",
"resultLastFetchedAt": "2026-07-01T10:30:02.000Z"
}
FieldMeaning
verificationPassedThe overall pass/fail verdict — the field most integrations act on
scoreBot risk score from 0 (human) to 1 (bot)
decisionTypeHow the verdict was reached: STANDARD, BYPASS_KEY, CUSTOM_ACCESS_RULE, GLOBAL_IP_ACCESS_RULE, FAILOVER, FAILOVER_TOLERANCE
decisionActionRecommended action: NO_ACTION, ALLOW, BLOCK, CUSTOM
gatewayFailoverActivetrue when the result was synthesized by the failover gateway — see Failover Behavior
riskScoringEnabled, minimalDataModeEnabledThe captcha configuration that applied
origin, ipAddress, countryCode, deviceFamily, operatingSystem, browserRequest metadata (empty in minimal-data mode)
verificationStartedAt / verificationFinishedAtWhen the widget verification ran
resultExpiresAt, resultFirstFetchedAt, resultLastFetchedAtRetrieval bookkeeping (see below)

How to evaluate verificationPassed vs. score and the decision fields — including recommended thresholds — is covered in Result Validation.

  • A result is retrievable for 15 minutes after the verification — fetch it right when the form is submitted.
  • By default a result can be fetched exactly once; a second fetch returns 429. Both the validity period and the allowed fetch count are configurable per captcha environment.
CodeMeaning
200Result returned
403Authorization header missing or API key invalid
404Unknown verificationId
410Result expired (older than its validity period)
423Result not yet released — the verification hasn’t finished
429Allowed fetch count exceeded (result already retrieved)

Fixed test verification IDs return canned responses without a real verification — the last digit selects the outcome:

verificationIdResponse
00000000-0000-0000-0000-000000000000200 with a sample passed result (requires the test key ak_ + 49 × x)
…-000000000001404
…-000000000002423
…-000000000003410
…-000000000004429