Skip to main content

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 your client_id and client_secret:
  1. Navigate to auth.zencoder.ai and sign in
  2. Go to Administration → API Keys
  3. Click Add
  4. Give API key a desired name
  5. Copy the API Key, it will only be showed once
Important: After generation, immediately copy and securely store API Key. The API Key will only be displayed once and cannot be retrieved later. Store it in a secure location such as a password manager or secrets management system.
Include the obtained API Key in the zencoder-api-key header of subsequent API requests:
zencoder-api-key: zak_live_pM...
Example Requests
curl -X GET https://api.zencoder.ai/api/v1/data/usage \
  -H "zencoder-api-key: YOUR_API_KEY"

Usage Data Endpoint

Query String Parameters
ParameterTypeRequiredDescription
periodstringNoTime period for usage data. Must be one of: 7d, 30d, 90d. Defaults to 7d if neither period nor day is provided
daystringNoSpecific day for usage data in YYYY-MM-DD format. Cannot be used together with period
Note: You must provide either period OR day, but not both. If neither is provided, defaults to period=7d. Example Requests Get usage data for the last 30 days:
GET /api/v1/data/usage?period=30d HTTP/1.1
Host: api.zencoder.ai
zencoder-api-key: zak_live_pM...
Get usage data for a specific day:
GET /api/v1/data/usage?day=2025-10-15 HTTP/1.1
Host: api.zencoder.ai
zencoder-api-key: zak_live_pM...
Response Success Response (200 OK):
{
  "status": "success",
  "data": {
    "period": {
      "start": "2025-09-24",
      "end": "2025-10-01",
      "days": 7
    },
    "summary": {
      "total_active_users": 48,
      "total_messages": 1372
    },
    "users": [
      {
        "email": "[email protected]",
        "messages": 58,
        "last_active": "2025-10-01",
        "ides": [
          "VS Code"
        ],
        "languages": [
          "JavaScript",
          "TypeScript"
        ]
      }
    ],
    "daily": [
      {
        "day": "2025-09-24",
        "active_users": 21,
        "messages": 188,
        "ides": [
          {
            "ide_name": "VS Code",
            "engaged_users": 6
          },
          {
            "ide_name": "IntelliJ CE",
            "engaged_users": 1
          },
          {
            "ide_name": "WebStorm",
            "engaged_users": 1
          }
        ],
        "languages": [
          {
            "language_name": "JavaScript",
            "engaged_users": 1
          },
          {
            "language_name": "TypeScript",
            "engaged_users": 2
          }
        ]
      }
    ]
  }
}
Error Responses:
{
  "status": "error",
  "message": "Invalid period parameter. Period has to be one of 7d, 30d, 90d"
}
{
  "status": "error",
  "message": "Invalid day parameter. Day must be in YYYY-MM-DD format"
}
{
  "status": "error",
  "message": "Only one parameter is expected. Provide either 'day' or 'period', not both"
}
{
  "status": "error",
  "message": "Failed to fetch data"
}
Response Fields
FieldTypeDescription
periodobjectTime period information for the data
summaryobjectAggregate statistics for the period
usersarrayList of user usage details
dailyarrayDaily breakdown of usage statistics
FieldTypeDescription
startstringStart date of the period (ISO 8601 format)
endstringEnd date of the period (ISO 8601 format)
daysintNumber of days in the period
FieldTypeDescription
total_active_usersintTotal number of active users in the period
total_messagesintTotal number of messages sent in the period
FieldTypeDescription
emailstringUser’s email address
messagesintNumber of messages sent by the user
last_activestringDate of user’s last activity (ISO 8601 format)
idesarrayList of IDEs used by the user
languagesarrayList of programming languages used
FieldTypeDescription
daystringDate for this data point (ISO 8601 format)
active_usersintNumber of active users on this day
messagesintNumber of messages sent on this day
idesarrayIDE usage breakdown for this day
languagesarrayLanguage usage breakdown for this day
FieldTypeDescription
ide_namestringName of the IDE
engaged_usersintNumber of users who used this IDE
FieldTypeDescription
language_namestringName of the programming language
engaged_usersintNumber of users who used this language
Example Requests
curl -X GET "https://api.zencoder.ai/api/v1/data/usage?period=30d" \
  -H "zencoder-api-key: API_KEY"

Troubleshooting

  • Verify your API Key is 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
  • Confirm users in your organization have been active during the requested period
  • Verify the date format for day parameter is YYYY-MM-DD
  • Check that the requested date range contains activity
  • Ensure users are part of your organization and have authenticated at least once
  • For period parameter, use only: 7d, 30d, or 90d
  • For day parameter, use format: YYYY-MM-DD
  • Do not provide both period and day parameters in the same request
  • Verify you can reach https://fe.zencoder.ai and https://api.zencoder.ai
  • Check your firewall or proxy settings
  • Ensure your network allows HTTPS requests to Zencoder endpoints