4 min de lectura
GET /usage
Retrieve your API key usage statistics including monthly request counts, limits, and rate limit configuration.
GET
/api/external/v1/usageGet API key usage statistics and limits
Authentication
All requests require an API key passed via the X-API-Key header. Alternatively, you can use the Authorization: Bearer YOUR_API_KEY header.
AuthenticationBash
curl -X GET 'https://api.zenovay.com/api/external/v1/usage' \
-H 'X-API-Key: YOUR_API_KEY'Parameters
This endpoint has no query parameters.
Response
Response (200 OK)JSON
{
"success": true,
"data": {
"api_key": {
"id": "ak_8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "Production API Key",
"permission": "full_access",
"website_id": null
},
"usage": {
"monthly_requests": 4521,
"monthly_limit": 100000,
"monthly_remaining": 95479,
"monthly_reset_at": "2026-03-01T00:00:00.000Z",
"total_requests": 128340
},
"rate_limits": {
"requests_per_minute": 60
},
"subscription": {
"tier": "professional"
}
},
"timestamp": "2026-02-07T12:00:00.000Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
api_key.id | string | Unique identifier for the API key |
api_key.name | string | Human-readable name of the API key |
api_key.permission | string | Permission scope: full_access or site_access |
api_key.website_id | string|null | Website ID if scoped to a specific site, null for full access |
usage.monthly_requests | number | Requests made this billing period |
usage.monthly_limit | number | Maximum requests allowed per month |
usage.monthly_remaining | number | Remaining requests this month |
usage.monthly_reset_at | string | ISO 8601 date when the monthly counter resets |
usage.total_requests | number | Total requests made with this key since creation |
rate_limits.requests_per_minute | number | Maximum requests per minute |
subscription.tier | string | Current subscription tier |
Monthly Limits by Tier
| Tier | Monthly API Limit | Requests/Minute |
|---|---|---|
| Free | 1,000 | 10 |
| Pro | 10,000 | 30 |
| Scale | 100,000 | 60 |
| Enterprise | 1,000,000 | 120 |
Legacy tier names (Starter, Professional) are automatically mapped to their current equivalents: Starter maps to Pro, Professional maps to Scale. The API response may still return legacy tier names for backwards compatibility.
TypeScript Interface
UsageResponseTypeScript
interface UsageResponse {
success: true;
data: {
api_key: {
id: string;
name: string;
permission: 'full_access' | 'site_access';
website_id: string | null;
};
usage: {
monthly_requests: number;
monthly_limit: number;
monthly_remaining: number;
monthly_reset_at: string;
total_requests: number;
};
rate_limits: {
requests_per_minute: number;
};
subscription: {
tier: string;
};
};
timestamp: string;
}HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Code Examples
cURLBash
curl -X GET 'https://api.zenovay.com/api/external/v1/usage' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json'Error Handling
Error Response (401 Unauthorized)JSON
{
"success": false,
"error": {
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED",
"timestamp": "2026-02-07T12:00:00.000Z"
}
}¿Fue útil esta página?