GET /account/usage - Check API Usage and Limits

Get rate-limits and usage data about your API key

GET https://api.sockodds.com/v2/account/usage

Check your API key's tier, rate limits and current usage by interval. Calling it counts as a request like any other.

Query parameters

No query parameters. Authentication only.

Response

{ "success": true, "data": AccountUsage[], "nextCursor": string | null }

AccountUsage

Your API key's tier, rate limits and current usage

FieldTypeDescription
keyIDstringThe hashed identifier for the API key (the first 16 hex of sha256)
customerIDstring | nullBilling customer id where one exists
emailstring | null
isActiveboolean
tierstringlite, base or internal
rateLimitsobjectper-second / per-minute / per-hour / per-day / per-month → RateLimitInterval

Status codes

StatusBody
200Success
401{"success":false,"error":"Invalid API key"}
403{"success":false,"error":"Inactive API key"}
404{"success":false,"error":"Not found"}
429{"success":false,"error":"Rate limit exceeded"} (Retry-After header)

Example response

{
  "success": true,
  "data": [
    {
      "keyID": "5fb8c85833e6dcf5",
      "customerID": null,
      "email": "you@example.com",
      "isActive": true,
      "tier": "base",
      "rateLimits": {
        "per-second": {
          "max-requests": null,
          "current-requests": null,
          "max-entities": null,
          "current-entities": null
        },
        "per-minute": {
          "max-requests": 60,
          "current-requests": 3,
          "max-entities": null,
          "current-entities": null
        },
        "per-hour": {
          "max-requests": null,
          "current-requests": null,
          "max-entities": null,
          "current-entities": null
        },
        "per-day": {
          "max-requests": null,
          "current-requests": 412,
          "max-entities": null,
          "current-entities": 2210
        },
        "per-month": {
          "max-requests": null,
          "current-requests": null,
          "max-entities": null,
          "current-entities": null
        }
      }
    }
  ]
}

Code samples

curl -X GET "https://api.sockodds.com/v2/account/usage" \
  -H "x-api-key: YOUR_API_KEY"
const r = await fetch("https://api.sockodds.com/v2/account/usage", { headers: { "x-api-key": "YOUR_API_KEY" } });
const { success, data, nextCursor, notice } = await r.json();
import requests
r = requests.get("https://api.sockodds.com/v2/account/usage", params={}, headers={"x-api-key": "YOUR_API_KEY"})
body = r.json()
req, _ := http.NewRequest("GET", "https://api.sockodds.com/v2/account/usage", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, err := http.DefaultClient.Do(req)
HttpRequest req = HttpRequest.newBuilder().uri(URI.create("https://api.sockodds.com/v2/account/usage"))
    .header("x-api-key", "YOUR_API_KEY").GET().build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var body = await http.GetStringAsync("https://api.sockodds.com/v2/account/usage");

Try it

// the response appears here
Need help?FAQ · Email · Contact