Get active users analytics
curl --request GET \
--url https://server.codeium.com/api/v2beta/analytics/active-users \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.codeium.com/api/v2beta/analytics/active-users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.codeium.com/api/v2beta/analytics/active-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.codeium.com/api/v2beta/analytics/active-users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://server.codeium.com/api/v2beta/analytics/active-users"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://server.codeium.com/api/v2beta/analytics/active-users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v2beta/analytics/active-users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"active_users": 142
}
],
"pagination": {
"next_page_cursor": null
},
"metadata": {
"data_freshness": "2026-06-16T03:00:00Z",
"query_time_ms": 612,
"team_id": "team_abc123"
}
}Analytics API
Get Active Users
Query the number of distinct active users for your team, with optional time granularity and per-user grouping.
GET
/
api
/
v2beta
/
analytics
/
active-users
Get active users analytics
curl --request GET \
--url https://server.codeium.com/api/v2beta/analytics/active-users \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.codeium.com/api/v2beta/analytics/active-users"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.codeium.com/api/v2beta/analytics/active-users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.codeium.com/api/v2beta/analytics/active-users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://server.codeium.com/api/v2beta/analytics/active-users"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://server.codeium.com/api/v2beta/analytics/active-users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v2beta/analytics/active-users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"active_users": 142
}
],
"pagination": {
"next_page_cursor": null
},
"metadata": {
"data_freshness": "2026-06-16T03:00:00Z",
"query_time_ms": 612,
"team_id": "team_abc123"
}
}This is a v2 endpoint that uses Bearer token authentication and query parameters, unlike the v1 Analytics API which uses service keys in the request body. See Authentication below.
This endpoint is not intended for real-time usage monitoring. Data is hourly-aggregated and the
rate limit is low (10 requests per hour per team). Use it for periodic reporting and bulk export.
Authentication
This endpoint uses Bearer token authentication. Include your token in theAuthorization header:
Authorization: Bearer <your_token>
What counts as an active user
A user is counted as active for a given time bucket if they have any billing event in it. Theactive_users field reports the count of distinct users.
Active user counts include usage from both the Devin CLI and Devin Desktop. A user who is
active in either (or both) is counted, and they are only counted once per time bucket.
Grouping and Granularity
Usegranularity and group_by to control the shape of returned data:
- No granularity or grouping — returns a single row with the total active user count for the entire date range
granularity=daily— each row includes atimestampinYYYY-MM-DDformat (daily active users)granularity=monthly— each row includes atimestampinYYYY-MMformat (monthly active users)group_by=user— returns one row per active user with auser_id; each row’sactive_usersis1
Unlike Get Consumption, the active users endpoint
only supports
user for group_by. Other dimensions (model_uid, ide, os) are not valid here.Pagination
Results are paginated with a default page size of 1,000 rows (max 10,000). When more results are available, the response includes anext_page_cursor in the pagination object. Pass it as the page_cursor query
parameter to fetch the next page.
Page cursors expire after 24 hours. A follow-up page request does not count as a new query against your rate limit.
Rate Limits
This endpoint is rate-limited to 10 requests per hour per team. If you exceed this limit, the server returns429 Too Many Requests with a Retry-After header.
Paginating an earlier query (following a next_page_cursor) does not count against this limit —
only the initial query for each report does. The low limit reflects that this endpoint is for
periodic reporting, not real-time usage monitoring.Authorizations
A service key with Analytics Read permission, passed as a Bearer token in the Authorization header.
Create a service key in your team settings under the "Service Keys" section.

