API referenceCompliance APISyntic Code sessionsList sessions

List Syntic Code sessions

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

Return Syntic Code sessions run by members: who, which repository and branch, how much was changed. Transcripts are kept only when the organization turned on transcript retention.

For how this fits into a full workflow, see Compliance API.

Headers

HeaderRequiredValue
AuthorizationYesBearer <admin key>: an Admin API key (sk_admin_...) that carries the compliance:read scope (plus compliance:write for deletions and holds). Enterprise plans only. See Compliance API.
syntic-betaYes, while in previewcompliance-2026-12-01. Without it the call fails with 400 beta_required. See Versioning.

Query parameters

ParameterTypeDefaultDescription
user_idstring
repositorystringHost and path, for example git.example.com/acme/billing-service.
starting_atstring
limitinteger201 to 100.
after_idstringNext page: the previous page’s last_id.
before_idstringPrevious page: the previous page’s first_id.

Response

200 OK, Content-Type: application/json

{
  "data": [
    {
      "id": "csess_01JCY0Y2A4C6E8G0J2L4",
      "type": "code_session_record",
      "user_id": "user_01J9Y0A2C4E6G8J0L2N4",
      "client": "syntic-code-cli 1.8.0",
      "repository": "git.example.com/acme/billing-service",
      "branch": "fix/rounding",
      "model": "Syntic Code",
      "turns": 31,
      "tool_calls": 88,
      "files_changed": 7,
      "started_at": "2026-11-04T13:00:00Z",
      "ended_at": "2026-11-04T14:12:00Z",
      "transcript_available": true
    }
  ],
  "has_more": false,
  "first_id": "csess_01JCY0Y2A4C6E8G0J2L4",
  "last_id": "csess_01JCY0Y2A4C6E8G0J2L4"
}
FieldTypeDescription
transcript_availablebooleanfalse when transcripts are not retained or already expired.
has_morebooleantrue when another page exists after this one.
first_idstring or nullPass as before_id to go back a page.
last_idstring or nullPass as after_id to get the next page.

Examples

curl -sS "https://app.syntic.ai/v1/compliance/code_sessions?repository=git.example.com%2Facme%2Fbilling-service" \
  -H "Authorization: Bearer $SYNTIC_ADMIN_KEY" \
  -H "syntic-beta: compliance-2026-12-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.
401authentication_errorinvalid_api_keyThe admin key is missing, unknown, revoked or expired.
403permission_erroradmin_key_requiredAn inference key was used.
403permission_errorscope_missingThe admin key lacks the compliance:read (or, for writes, compliance:write) scope.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?