Overview
The Zencoder Analytics API enables programmatic access to your organization’s usage data, allowing you to integrate Zencoder metrics into your existing business intelligence tools, custom dashboards, and reporting systems. This REST API provides the same data available in the Analytics Dashboard in a machine-readable format.API access is available for users on Pro Plus plans and above. Requires Owner or Manager role permissions within your organization.
Getting Your API Credentials
Before making API requests, you’ll need to generate a personal access token to obtain yourclient_id and client_secret:
- Navigate to auth.zencoder.ai and sign in
- Go to Administration → API Keys
- Click Add
- Give API key a desired name
- Copy the API Key, it will only be showed once
zencoder-api-key header of subsequent API requests:
- cURL
- Node.js
- Python
Usage Data Endpoint
Query String Parameters| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Time period for usage data. Must be one of: 7d, 30d, 90d. Defaults to 7d if neither period nor day is provided |
day | string | No | Specific day for usage data in YYYY-MM-DD format. Cannot be used together with period |
period OR day, but not both. If neither is provided, defaults to period=7d.
Example Requests
Get usage data for the last 30 days:
400 Bad Request - Invalid period parameter
400 Bad Request - Invalid period parameter
400 Bad Request - Invalid day parameter format
400 Bad Request - Invalid day parameter format
400 Bad Request - Both period and day parameters provided
400 Bad Request - Both period and day parameters provided
500 Internal Server Error
500 Internal Server Error
Data Object
Data Object
| Field | Type | Description |
|---|---|---|
period | object | Time period information for the data |
summary | object | Aggregate statistics for the period |
users | array | List of user usage details |
daily | array | Daily breakdown of usage statistics |
Period Object
Period Object
| Field | Type | Description |
|---|---|---|
start | string | Start date of the period (ISO 8601 format) |
end | string | End date of the period (ISO 8601 format) |
days | int | Number of days in the period |
Summary Object
Summary Object
| Field | Type | Description |
|---|---|---|
total_active_users | int | Total number of active users in the period |
total_messages | int | Total number of messages sent in the period |
User Object
User Object
| Field | Type | Description |
|---|---|---|
email | string | User’s email address |
messages | int | Number of messages sent by the user |
last_active | string | Date of user’s last activity (ISO 8601 format) |
ides | array | List of IDEs used by the user |
languages | array | List of programming languages used |
Daily Data Object
Daily Data Object
| Field | Type | Description |
|---|---|---|
day | string | Date for this data point (ISO 8601 format) |
active_users | int | Number of active users on this day |
messages | int | Number of messages sent on this day |
ides | array | IDE usage breakdown for this day |
languages | array | Language usage breakdown for this day |
IDE Usage Object
IDE Usage Object
| Field | Type | Description |
|---|---|---|
ide_name | string | Name of the IDE |
engaged_users | int | Number of users who used this IDE |
Language Usage Object
Language Usage Object
| Field | Type | Description |
|---|---|---|
language_name | string | Name of the programming language |
engaged_users | int | Number of users who used this language |
- Last 30 Days
- Specific Day
- Last 7 Days (Default)
- cURL
- Node.js
- Python
Troubleshooting
Authentication Failures
Authentication Failures
- Verify your
API Keyis correct - Ensure your subscription is Core or higher
- Check that your account has Owner or Manager permissions
- Confirm you generated an API Key in Settings
Empty or Missing Data
Empty or Missing Data
- Confirm users in your organization have been active during the requested period
- Verify the date format for
dayparameter isYYYY-MM-DD - Check that the requested date range contains activity
- Ensure users are part of your organization and have authenticated at least once
Invalid Parameter Errors
Invalid Parameter Errors
- For
periodparameter, use only:7d,30d, or90d - For
dayparameter, use format:YYYY-MM-DD - Do not provide both
periodanddayparameters in the same request
Connection or Network Issues
Connection or Network Issues
- Verify you can reach
https://fe.zencoder.aiandhttps://api.zencoder.ai - Check your firewall or proxy settings
- Ensure your network allows HTTPS requests to Zencoder endpoints