POST
/v1/workspace/analytics/query/usage-by-product-over-time
ElevenLabs APIGet Workspace Usage
- Base URL
- https://api.elevenlabs.io
- Auth
- xi-api-key: <ELEVENLABS_API_KEY>
- Last verified
- 2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 221 tokens · Vary: Accept
→ 221 tokens · Vary: Accept
Critical gotchas
Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.
Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.
cURL
curl -X POST 'https://api.elevenlabs.io/v1/workspace/analytics/query/usage-by-product-over-time' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "start_time": 0, "end_time": 0, "interval_seconds": 60, "group_by": [ "product_type" ], "filters": [ { "column": "string", "operation": "in", "values": [ "string" ] } ], "time_zone": "UTC"}'Get a free ElevenLabs API key → sponsored
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| start_time | body | integer | Yes | Start of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01. |
| end_time | body | integer | Yes | End of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01. |
| interval_seconds | body | integer | No | Bucket size in seconds. Each row in the response covers this many seconds of the selected time range. For example, pass 3600 for hourly buckets or 86400 for daily buckets. Whether `time_zone` shifts bucket boundaries depends on this value: whole-day multiples (e.g. 86400) align to local midnight; whole-hour multiples up to 24 hours (e.g. 3600, 14400) align to local hour boundaries from midnight; sub-hour values and other sizes remain UTC-anchored regardless of `time_zone`. |
| group_by | body | string[] | No | Request body field group_by. |
| filters | body | object[] | No | Request body field filters. |
| time_zone | body | string | No | IANA time zone identifier (e.g. 'America/New_York', 'Europe/London', 'UTC') used to align bucket boundaries for eligible `interval_seconds` values. Whole-day multiples start at local midnight; whole-hour multiples up to 24 hours align to local hour boundaries from midnight. Sub-hour intervals and other bucket sizes remain UTC-anchored regardless of this setting. Defaults to UTC. |
Response 200 OK
{
"columns": [
"string"
],
"column_types": [
"String"
],
"rows": [
[
"string"
]
],
"column_units": [
"ms"
]
}