Preview FeatureThe Analytics API is currently in preview and is available exclusively to Enterprise customers.
Base URL
| Environment | URL |
|---|---|
| Production | https://api.augmentcode.com |
Getting started
To use the Analytics API, you need to create a service account and generate an API token.1
Create a Service Account
- Navigate to your organization’s Service Accounts page in the Augment web app: app.augmentcode.com/settings/service-accounts
- Click Add Service Account
- Enter a Service Name (1-100 characters, alphanumeric, hyphens, and underscores only)
- Optionally add a Description for the service account
- Click Create
Service account names must be unique within your organization.
2
Generate an API Token
- In the Service Accounts list, find your newly created service account
- Click Create Token
- Enter a Token Description (e.g., “Analytics API integration”)
- Click Create
- Copy and securely store the token — it will only be shown once
3
Use the Token
Include the token in the For more details on service accounts, see the Service Accounts documentation.
Authorization header of your API requests:Available Endpoints
The Analytics API provides several endpoints to access different types of usage data:Daily Active Users Count
Get daily active user counts over a date range
Daily Active Users List
Get the list of active users for a specific date with pagination
Daily Usage Metrics
Get aggregated usage metrics by day over a date range
User Activity
Get per-user usage metrics over a date range with pagination
Activity by Editor & Language
Get user activity broken down by programming language and editor
Important Considerations
Timezone and Data AvailabilityAll dates in requests and responses are interpreted and returned in UTC timezone. The most recent queryable date is “yesterday” (UTC), and data for the previous day becomes available at approximately 02:00 UTC each day. Make sure to account for this when querying data or processing results.
Data FreshnessAnalytics data is updated once daily. Data for a given day becomes available the following day at approximately 02:00 UTC.
Common Constraints
Most endpoints share these constraints:| Constraint | Value |
|---|---|
| Maximum date range | 90 days |
| Maximum historical lookback | 2 years |
| Today and future dates | Not allowed (data available at ~02:00 UTC next day) |
| Timezone | All dates interpreted as UTC |