Syntic Code usage analytics
⚠️
Preview — this feature is being built; the design below is the spec.
If your team uses Syntic Code, the coding agent for the terminal, this endpoint reports how each person uses it, day by day: sessions, tokens, cost, and how much of the code it proposed was accepted. Engineering leads use it to see adoption across the team, finance uses it to attribute cost, and platform teams use it to find who could benefit from help getting started.
Endpoint
GET /v1/organizations/code_analytics
Authenticate with an admin key and send syntic-beta: admin-2026-11-01.
Query parameters
| Parameter | Required | Description |
|---|---|---|
starting_at | Yes | First day, RFC 3339 at midnight UTC. |
ending_at | No | Exclusive end. Default: now. At most 31 days after starting_at. |
user_ids[] | No | Only these members. |
group_by | No | user (default) or day_only (one organization-wide row per day). |
limit | No | Rows per page, 1 to 1,000, default 100. |
after_id | No | The last_id from the previous response (next page). |
before_id | No | The first_id from the previous response (previous page). |
Response
{
"data": [
{
"date": "2026-11-04",
"user": { "id": "user_01J9Y0A2C4E6G8J0L2N4", "email": "dana@example.com" },
"auth": "sign_in",
"sessions": 6,
"active_minutes": 212,
"prompts": 48,
"tokens": { "input": 3120400, "cached_input": 2804100, "output": 98100 },
"cost_usd": "1.4410",
"billing_source": { "subscription_tokens": 3218500, "api_credit_usd": "0.0000" },
"tool_uses": { "edit": 31, "write": 4, "bash": 22, "read": 140 },
"edits": { "proposed": 35, "accepted": 30, "rejected": 5, "lines_added": 612, "lines_removed": 208 },
"commits_created": 3,
"models": [{ "model": "Amara S1.2", "output_tokens": 98100 }],
"client_versions": ["1.8.2"]
}
],
"has_more": false,
"first_id": "bkt_01JC7A0B2C4D6E8F",
"last_id": "bkt_01JC7A0B2C4D6E8F"
}| Field | Meaning |
|---|---|
auth | sign_in (browser sign-in) or api_key (a sk_syntic_ or sk_live_ key on a server or in CI). |
sessions, active_minutes | Interactive and non-interactive sessions started; minutes with activity. |
prompts | Messages the person sent to the agent. |
tokens, cost_usd | Model usage from Syntic Code, at the same rates as API traffic. |
billing_source | How much was covered by the plan and how much was paid from credits. |
tool_uses | Tool calls by kind. |
edits | File edits the agent proposed, how many the person accepted or rejected, and the resulting line counts. |
commits_created | Git commits made through Syntic Code. |
Data for a day is complete 6 hours after the day ends in UTC.
Examples
curl -sS -G https://app.syntic.ai/v1/organizations/code_analytics \
-H "Authorization: Bearer $SYNTIC_ADMIN_KEY" \
-H "syntic-beta: admin-2026-11-01" \
--data-urlencode "starting_at=2026-11-01T00:00:00Z" \
| jq -r '.data[] | [.date, .user.email, .sessions, .edits.accepted, .cost_usd] | @tsv'Privacy
The report contains counts and costs only. It never includes prompts, code, file names, repository names or command text.
Errors
Errors use the error envelope.
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | invalid_time_range | Missing starting_at, not midnight UTC, or longer than 31 days. |
| 403 | permission_error | role_required | The key’s creator may not read analytics. |
Build notes for the platform team
- Token and cost fields come from the usage rows Syntic Code requests already write. Session, tool, edit and commit counts need a small event report from the CLI; the Syntic Code team adds it.
- Aggregate nightly into a per-user per-day table; the endpoint reads only that table.
Related
Was this page helpful?