Get a Syntic Code session
⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/compliance/code_sessions/{code_session_id}Return one session with its transcript: prompts, model replies, the commands it ran and whether each edit was accepted. Command output longer than 20,000 characters is cut.
For how this fits into a full workflow, see Compliance API.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <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-beta | Yes, while in preview | compliance-2026-12-01. Without it the call fails with 400 beta_required. See Versioning. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
code_session_id | string | Starts with csess_. |
Response
200 OK, Content-Type: application/json
{
"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,
"transcript": [
{
"role": "user",
"at": "2026-11-04T13:00:05Z",
"text": "Invoices round half-down; fix it to round half-even and add tests."
},
{
"role": "tool",
"at": "2026-11-04T13:01:10Z",
"tool": "shell",
"input": "cargo test -p billing",
"exit_code": 101
},
{
"role": "tool",
"at": "2026-11-04T13:04:02Z",
"tool": "edit",
"path": "src/money.rs",
"accepted": true
}
]
}Examples
curl -sS "https://app.syntic.ai/v1/compliance/code_sessions/csess_01JCY0Y2A4C6E8G0J2L4" \
-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:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | beta_required | The syntic-beta header is missing. |
| 404 | not_found_error | code_session_not_found | No Syntic Code session with this id. |
| 401 | authentication_error | invalid_api_key | The admin key is missing, unknown, revoked or expired. |
| 403 | permission_error | admin_key_required | An inference key was used. |
| 403 | permission_error | scope_missing | The admin key lacks the compliance:read (or, for writes, compliance:write) scope. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Was this page helpful?