Request
Method:GET
Endpoint:
/api/usage
Headers:
X-Authorization
: Your API key (required)
uid
(string, required): Your user IDstartDate
(string, required): Start date in YYYY-MM-DD formatendDate
(string, required): End date in YYYY-MM-DD formatagentId
(string, optional): Specific agent ID to get usage for (if not provided, returns usage for all accessible agents)
Response
Success Response (200):400 Bad Request
: Missing required parameters, invalid date format, or invalid date range401 Unauthorized
: Invalid or missing API key404 Not Found
: User not found or agent not found/access denied500 Internal Server Error
: Server error
Example
Notes
- Date range cannot exceed reasonable limits
- If no agents are found for the user, returns empty arrays with zero counts
- The
requestedAgentId
field is only included when filtering for a specific agent
Authorizations
Query Parameters
User ID
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Optional agent ID to filter data for specific agent
Response
Successful response