Validate the presented API key and return plan/usage info
GET /api/v1/validate-key
GET https://api.trustverify.co.uk/api/v1/validate-key
Example request#
curl -sS -X GET 'https://api.trustverify.co.uk/api/v1/validate-key' \
-H "Authorization: Bearer $TRUSTVERIFY_API_KEY"Responses#
200 Key is valid
| Field | Type | Description |
|---|---|---|
| validrequired | boolean: true | |
| planrequired | string | |
| tenantIdrequired | string | |
| keyNamerequired | string | |
| limitsrequired | object | |
| limits.requestsPerMinuterequired | number | The plan's advisory per-minute guidance; not enforced |
| limits.requestsPerMonthrequired | number | The plan's monthly request allowance; -1 = no monthly allowance |
| usagerequired | object | |
| usage.currentrequired | number | |
| usage.quotarequired | number | Same as limits.requestsPerMonth; -1 = no monthly allowance |
| subscriptionStatusrequired | string,null | The payment processor's status for the account's paid subscription when it is waiting on a payment (past_due, unpaid, incomplete or paused), which is why `plan` is the starter allowance; null otherwise |
| lapsedPlanrequired | string,null | The plan that subscription is for, set with subscriptionStatus; null otherwise |
401 Missing, invalid, or revoked API key
429 The monthly request allowance of the key's plan is spent (the same 429 every /api/v1 request gets). When the account's p
The monthly request allowance of the key's plan is spent (the same 429 every /api/v1 request gets). When the account's paid subscription is waiting on a payment, the starter allowance applies and the body also carries code SUBSCRIPTION_NOT_ACTIVE, subscriptionStatus, a message and upgradeUrl.
| Field | Type | Description |
|---|---|---|
| errorrequired | string: "Monthly quota exceeded" | |
| quotarequired | number | |
| usagerequired | number | |
| code | string: "SUBSCRIPTION_NOT_ACTIVE" | |
| subscriptionStatus | string | |
| message | string | |
| upgradeUrl | string |
503 The key is valid, but the plan of the account that owns it could not be read, so no plan or limits are reported. The mon
The key is valid, but the plan of the account that owns it could not be read, so no plan or limits are reported. The monthly allowance is not enforced on a request whose plan is unknown. Safe to retry.
| Field | Type | Description |
|---|---|---|
| validrequired | boolean: true | |
| errorrequired | string: "plan_unavailable" | |
| messagerequired | string |