veil

Check an API key’s allowance

Read your current owner and key quotas without spending the primary allowance.

GET/v1/rate-limit
Access
Bearer API key required
Client
Local or server client

Request examples#

cURL
curl -fsS -H "Authorization: Bearer $VEIL_API_KEY" \
  "https://veil.rip/v1/rate-limit"

Response#

HTTP 200application/json

owner, key metadata, quota, rate, resource and retryAfter. quota separates shared requests, verification, optional daily allowance and optional key cap. Times use Unix seconds.

FieldTypeMeaning
ownerintegerPermanent owner card number.
keyApiKeyAuthenticated key metadata, never the secret.
quotaQuotaShared request and verification buckets, plus optional daily and per-key caps. This status call does not spend the primary allowance.
rateBucketBucket described by the response rate-limit headers.
resourcestringResource described by rate.
retryAfterintegerSeconds until admission is possible; may be positive even though this status request returns 200.

Example response

Illustrative values. Read the current response from your request.

json
{
  "owner": 1,
  "key": {
    "id": "0123456789abcdef0123456789abcdef",
    "owner": 1,
    "label": "Website backend",
    "prefix": "veil_live_01234567…",
    "scopes": [
      "read",
      "verify"
    ],
    "state": "active",
    "createdAt": "2026-10-27T00:00:00Z",
    "expiresAt": "2027-01-25T00:00:00Z",
    "revokedAt": null,
    "suspended": false,
    "requestsPerMinute": null,
    "lastUsedAt": null,
    "requests": 0
  },
  "quota": {
    "requests": {
      "limit": 600,
      "remaining": 600,
      "resetAt": 1793059200
    },
    "verification": {
      "limit": 120,
      "remaining": 120,
      "resetAt": 1793059200
    },
    "daily": null,
    "key": null
  },
  "rate": {
    "limit": 600,
    "remaining": 600,
    "resetAt": 1793059200
  },
  "resource": "requests",
  "retryAfter": 0
}

Expand a nested object for its fields. Types ending in null allow a null value; optional fields may be absent. Other fields are present in that object.

API key metadata ApiKey
FieldTypeMeaning
idstringPublic key-management ID, not the bearer secret.
ownerintegerPermanent owner card number.
labelstringIntegration label supplied by its owner.
prefixstringNon-secret display prefix.
scopesarray<string>read and/or verify.
statestringactive, expired, suspended or revoked. Account suspension is reported separately.
createdAtstringCreation time in ISO 8601 UTC.
expiresAtstringExpiry time in ISO 8601 UTC.
revokedAtstring | nullPermanent revocation time.
suspendedbooleanWhether this key is suspended.
requestsPerMinuteinteger | nullAdditional per-key cap, or null.
lastUsedAtstring | nullLast admitted use, or null if never used.
requestsintegerLifetime admitted requests for this key.
Shared and additional quotas Quota
FieldTypeMeaning
requestsBucketOwner’s shared request bucket.
verificationBucketAdditional shared verification bucket. Verification consumes both buckets.
dailyBucket | nullAdditional daily cap, if set.
keyBucket | nullAdditional per-key cap, if set.
Quota bucket Bucket
FieldTypeMeaning
limitintegerBucket capacity, or the UTC-day cap for a daily bucket.
remainingintegerWhole requests currently available.
resetAtintegerUnix seconds when the bucket will be full, or the next UTC midnight for a daily cap.

Response headers#

HeaderValueMeaning
Content-Typeapplication/jsonUse the declared media type before choosing a parser.
DateHTTP dateServer time. Compare it with your clock when signing requests.
Cache-Controlno-storeDo not persist private or temporary responses in a shared cache.
Retry-Afterinteger seconds, on rate_limited or busyWait at least this long before retrying. Other 429/503 codes do not necessarily include it.
X-RateLimit-LimitintegerCapacity of the reported bucket.
X-RateLimit-RemainingintegerWhole requests remaining in that bucket.
X-RateLimit-ResetUnix secondsTime the bucket will be full, not a fixed minute-window boundary.
X-RateLimit-Resourcerequests | verification | key | dailyBucket represented by the headers. Other balances remain in quota.

Usage notes#

  • The response is private and uses Cache-Control no-store.
  • Successful bearer-authenticated public requests also return X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Resource. These headers are for server/local clients; public browser CORS exposes Date, ETag and Retry-After.

Errors#

API errors return an error object. Use error.code for program logic; error.message is English text for people and can change. Response and error guide

HTTPCodeMeaning and next step
401invalid_api_key

The bearer credential is malformed, unknown, expired or revoked.

Use an active key. To use anonymous public access, remove Authorization entirely. Invalid credentials never fall back automatically.

403api_key_scope

The API key lacks read or verify scope, or the endpoint does not accept bearer keys.

Use the correct scope. Identity writes and key management still require a device signature.

403api_key_suspended

This API key is suspended.

Ask staff to restore it; another key cannot lift an account suspension.

403developer_suspended

The owner’s API account is suspended or the owner card is unavailable.

Check the owner account and any staff restriction. Creating another key does not bypass suspension.

Shared request errors
HTTPCodeMeaning and next step
429rate_limited

An anonymous, signed-request or API-key allowance was exceeded.

Wait at least Retry-After seconds. Share a queue and retry budget across your workers.

500internal_error

An unexpected server error occurred. Internal details are not returned.

Retry reads with bounded backoff. Check write results before sending a new signed operation.

503busy

The application has reached a temporary concurrency or database limit.

Wait Retry-After seconds and retry with bounded backoff.