API Reference Updated May 18, 2026

Authorization

RequestGuard API key formats, optional authentication, and invalid-key behavior.

Most RequestGuard API endpoints require an API key. Send the key as a bearer token:

curl "https://api.requestguard.com/v1/assess" \
  -H "Authorization: Bearer rg_sk_live_..." \
  -H "Content-Type: application/json" \
  --data '{"ip":"8.8.8.8","email":"user@example.com","event":"signup"}'

You can also send the same key with X-API-Key:

curl "https://api.requestguard.com/v1/events" \
  -H "X-API-Key: rg_sk_live_..."

Optional Authentication

POST /go/links supports anonymous creation. A valid RequestGuard API key is optional and only needed when users want account-scoped tracking, link reuse, or quota attribution.

If an API key is supplied to POST /go/links, it must be valid. Invalid keys are rejected instead of falling back to anonymous behavior.

GET /vulnerabilities/npm/{package}/ is public and does not require an API key.

Required Authentication

These API areas require a valid key:

AreaEndpoints
Fraud decisioningPOST /assess
RulesPOST /rules, GET /rules, PATCH /rules/{id}, DELETE /rules/{id}
Events and analyticsGET /events, GET /events.csv, GET /analytics/summary
WebhooksPOST /webhooks, GET /webhooks, PATCH /webhooks/{id}, DELETE /webhooks/{id}
Account-scoped intelligenceIP, domain, DNS, WHOIS, email, abuse, and blocklist endpoints unless documented otherwise

Error Response

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing or invalid RequestGuard API key."
  }
}

Use separate live and test keys if your account provides both. Do not expose secret keys in browser code.