Skip to main content
GET
/
api
/
v1
/
keys
/
{keyId}
/
usage
Fetch from logged-in browser
// Session-cookie auth — make sure you're logged in to socdefenders.ai
const r = await fetch('/api/v1/keys/<uuid>/usage?days=30', { credentials: 'include' });
const { data } = await r.json();
console.log(`p95 latency: ${data.latency_p95_ms}ms`);
console.log(`Daily peak: ${data.rate_limit_peak_per_day} requests`);
{
  "data": {
    "key_id": "00000000-0000-4000-8000-000000000123",
    "window_days": 30,
    "total_requests": 142587,
    "successful": 139214,
    "client_errors": 3128,
    "server_errors": 245,
    "success_rate": 0.9763,
    "avg_response_time_ms": 287,
    "latency_p50_ms": 195,
    "latency_p95_ms": 612,
    "latency_p99_ms": 1240,
    "rate_limit_peak_per_minute": 87,
    "rate_limit_peak_per_day": 8430,
    "top_endpoints": [
      {
        "path": "/api/v1/articles",
        "count": 89234
      },
      {
        "path": "/api/v1/iocs",
        "count": 38765
      },
      {
        "path": "/api/v1/lookup",
        "count": 14588
      }
    ],
    "by_status": {
      "200": 139214,
      "400": 1245,
      "401": 12,
      "403": 89,
      "404": 1576,
      "429": 206,
      "500": 245
    },
    "daily": [
      {
        "date": "2026-05-16",
        "requests": 4823,
        "errors": 67
      },
      {
        "date": "2026-05-15",
        "requests": 5102,
        "errors": 89
      }
    ],
    "rate_limit_hits_by_hour": [
      {
        "hour": "2026-05-16T14:00:00Z",
        "count": 12
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.socdefenders.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

sb-access-token
string
cookie
required

Session cookie (for API key management endpoints)

Path Parameters

keyId
string<uuid>
required

API key ID (UUID from the list endpoint)

Example:

"00000000-0000-4000-8000-000000000123"

Query Parameters

days
integer
default:7

Lookback window in days (1–90). The time-series in the response has one bucket per day.

Required range: 1 <= x <= 90
Example:

30

Response

Usage statistics for the requested key

data
object