Account
Returns account-level API key and organization quota details for the authenticated API key.
Endpoint
http
GET /api/v1/accountRequest
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes* | Bearer <api-key> |
X-API-Key | Yes* | Alternative to Authorization header |
INFO
One of Authorization or X-API-Key is required.
Response
Success (200)
Returns quota usage details for the API key and its organization.
json
{
"counts_toward_quota": false,
"request_cost": 0,
"organization_id": "c0a19bd8-3e9a-49c1-863c-faa32d430720",
"api_key": {
"uid": "ba8fbcae-8b77-4666-9ac6-ded794f57755",
"name": "Cloud Firewall",
"current_usage": 1,
"max_api_requests": null,
"created_at": "2026-03-30T18:19:56.072Z"
},
"organization_quota": {
"total_usage": 1,
"total_quota": 5000000,
"current_usage": 1,
"max_api_requests": 5000000,
"allocated_api_key_quota": 0,
"available_api_key_quota": 5000000,
"source": "partner_status",
"unlimited": false
}
}Response Fields
| Field | Type | Description |
|---|---|---|
counts_toward_quota | boolean | Whether this request increments usage counters |
request_cost | number | Cost of the request against the quota |
organization_id | string | Unique identifier of the organization tied to the API key |
api_key | object | Details about the authenticated API key |
organization_quota | object | Aggregated quota and usage information for the organization |
API Key Object
| Field | Type | Description |
|---|---|---|
uid | string | Unique identifier for the API key |
name | string | User-defined name of the API key |
current_usage | number | Current usage recorded for this API key |
max_api_requests | number | null | Optional per-key quota limit, if one is configured |
created_at | string | ISO timestamp when the API key was created |
Organization Quota Object
| Field | Type | Description |
|---|---|---|
total_usage | number | Total usage recorded for the organization |
total_quota | number | Total quota available to the organization |
current_usage | number | Current billable usage considered for rate limiting |
max_api_requests | number | Maximum number of API requests allowed |
allocated_api_key_quota | number | Portion of the quota explicitly allocated to API keys |
available_api_key_quota | number | Remaining unallocated quota available to API keys |
source | string | Quota source, such as partner_status or subscription settings |
unlimited | boolean | Whether the organization has unlimited API access |
Error Responses
| Status | Response | Description |
|---|---|---|
401 | { "statusCode": 401, "statusMessage": "Valid API key required" } | No API key provided |
403 | { "error": true, "statusCode": 403, "message": "Invalid API key" } | Invalid or expired API key |
Examples
Using Bearer Token
bash
curl -X GET "https://ipswamp.com/api/v1/account" \
-H "Authorization: Bearer your-api-key-here"Using X-API-Key Header
bash
curl -X GET "https://ipswamp.com/api/v1/account" \
-H "X-API-Key: your-api-key-here"JavaScript/TypeScript
typescript
const response = await fetch("https://ipswamp.com/api/v1/account", {
headers: {
Authorization: "Bearer your-api-key-here",
},
});
const data = await response.json();
console.log(data.organization_quota.available_api_key_quota);Python
python
import requests
url = "https://ipswamp.com/api/v1/account"
headers = {
"Authorization": "Bearer your-api-key-here"
}
response = requests.get(url, headers=headers)
data = response.json()
print(data["organization_quota"]["available_api_key_quota"])TIP
Use this endpoint to inspect current quota and API key usage. It does not count toward quota in the example response because counts_toward_quota is false and request_cost is 0.