Get Syntic Code analytics

⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/organizations/code_analytics

Return per-person, per-day activity in Syntic Code: sessions, prompts, tokens, cost, tool use, accepted and rejected edits, and commits. Counts and costs only; the report never contains prompts, code, file or repository names. A day is complete 6 hours after it ends in UTC.

For how this fits into a full workflow, see Syntic Code usage.

Headers

HeaderRequiredValue
AuthorizationYesBearer <admin key>: an Admin API key (sk_admin_...). Inference keys are refused with 403 admin_key_required. See Admin API keys.
syntic-betaYes, while in previewadmin-2026-11-01. Without it the call fails with 400 beta_required. See Versioning.

Query parameters

ParameterTypeDefaultDescription
starting_atRFC 3339 timeRequiredFirst day, at midnight UTC.
ending_atRFC 3339 timenowExclusive end, at most 31 days later.
user_ids[]stringOnly these members.
group_bystringuseruser or day_only.
limitinteger1001 to 1,000 rows.
after_idstringNext page.
before_idstringPrevious page.

Response

200 OK, Content-Type: application/json

{
  "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"
}
FieldTypeDescription
authstringsign_in or api_key.
editsobjectEdits proposed, accepted and rejected, and resulting line counts.
billing_sourceobjectTokens covered by the plan and dollars paid from credits.

Examples

curl -sS "https://app.syntic.ai/v1/organizations/code_analytics?starting_at=2026-11-01T00%3A00%3A00Z&ending_at=2026-11-08T00%3A00%3A00Z" \
  -H "Authorization: Bearer $SYNTIC_ADMIN_KEY" \
  -H "syntic-beta: admin-2026-11-01"

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
400invalid_request_errorinvalid_time_rangeMissing starting_at, not midnight UTC, or more than 31 days.
403permission_errorrole_requiredThe admin key’s creator does not have the role this needs.
401authentication_errorinvalid_api_keyThe admin key is missing, unknown, revoked or expired.
403permission_erroradmin_key_requiredAn inference key was used.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?