Create an export
⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/compliance/exportsStart a bulk export of compliance records for a time range and, optionally, a set of members. Exports run in the background; poll the export or register the compliance.export.completed webhook.
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. |
Content-Type | Yes | application/json |
Idempotency-Key | No | Up to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency. |
Body parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
kind | string | Yes | |
starting_at | string | Yes | |
ending_at | string | Yes | At most 366 days after starting_at. |
user_ids | array of strings | No | Up to 500 members. Default: everyone. |
format | string | No | jsonl (default) or zip. |
Response
202 Accepted, Content-Type: application/json
{
"id": "cexp_01JCS5T7V9X1Z3B5D7F9",
"type": "compliance_export",
"kind": "chats",
"filters": {
"starting_at": "2026-10-01T00:00:00Z",
"ending_at": "2026-11-01T00:00:00Z",
"user_ids": [
"user_01J9Y0A2C4E6G8J0L2N4"
]
},
"format": "jsonl",
"status": "queued",
"record_count": null,
"bytes": null,
"parts": null,
"expires_at": null,
"created_at": "2026-11-05T10:00:00Z",
"finished_at": null,
"requested_by": "adminkey_01JC0Z2B4D6F8H0K2M4P"
}| Field | Type | Description |
|---|---|---|
kind | string | activities, chats, projects, code_sessions or files. |
format | string | jsonl (one record per line) or zip (JSONL plus original attachments). |
status | string | queued, running, succeeded, failed or canceled. |
parts | integer | Exports over 2 GB are split; download each part with ?part=. |
expires_at | string | Downloads stop working 7 days after the export finished. |
Examples
curl -sS "https://app.syntic.ai/v1/compliance/exports" \
-H "Authorization: Bearer $SYNTIC_ADMIN_KEY" \
-H "syntic-beta: compliance-2026-12-01" \
-H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69" \
-H "Content-Type: application/json" \
-d '{
"kind": "chats",
"starting_at": "2026-10-01T00:00:00Z",
"ending_at": "2026-11-01T00:00:00Z",
"user_ids": [
"user_01J9Y0A2C4E6G8J0L2N4"
],
"format": "jsonl"
}'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. |
| 409 | conflict_error | export_limit_reached | Three exports are already running for the organization. |
| 400 | invalid_request_error | range_too_long | The range is longer than 366 days. |
| 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?