Compliance API FAQ
Answers to common questions about Compliance API access, scopes, retention, and integration.
Access and scopes
For a Claude Enterprise organization, the primary owner enables the Compliance API at claude.ai > Organization settings > API, and enablement cascades from the parent organization to every linked organization. For an eligible standalone Claude Console organization (one with no parent organization), an organization admin enables it on the Compliance page (platform.claude.com/data-controls/compliance) in the Claude Console. A Claude Console organization that is linked to a parent organization does not enable the Compliance API itself; it is enabled from the parent organization. See Set up the Compliance API for the steps.
For a standalone Claude Console organization, an organization admin turns the Compliance API toggle off on the Compliance page (platform.claude.com/data-controls/compliance) in the Claude Console, the same place it is turned on. If you can’t turn it off, ask your Anthropic account team or Anthropic support. While the Compliance API is off, no activity events are recorded for your organization, so the Activity Feed receives no new events. Activity that is not recorded while the Compliance API is off cannot be recovered later. Turning the Compliance API back on resumes recording from that point forward; activity that was already recorded is not deleted. Access Transparency events are an exception. If your organization is enrolled in Access Transparency, turning the Compliance API off stops your access to these events, not their recording. They are still recorded while the Compliance API is off, and the Activity Feed returns them after the Compliance API is turned back on.
No. Turning the Compliance API off stops new activity events from being recorded, but it does not delete events that were already captured while it was on. Recording resumes from the point the Compliance API is turned back on. Access Transparency events are an exception: they are still recorded while the Compliance API is off.
Yes. When the Compliance API is turned off (or back on) in Claude Console, the change is recorded as an org_compliance_api_settings_updated activity in the Activity Feed, so your audit trail shows who changed the setting and when. This activity is an exception: the disable is recorded even though other activity is not recorded while the Compliance API is off. Access Transparency events are also an exception.
This is expected. A Claude Enterprise parent organization centralizes identity across all linked organizations; it does not carry workloads, and it does not appear in Claude Console at all. Claude Console only ever shows the Claude Console organizations linked beneath the parent.
To call the Compliance API, you create one of two key types instead:
- For full Compliance API access (Activity Feed plus chats, files, projects, sessions, users, organization metadata, and organization settings), the primary owner of the parent organization (or an organization owner, for a key restricted to their own organization only) creates a Compliance Access Key in claude.ai.
- For Activity Feed and Safety Cases API access, an organization admin in your Claude Console organization creates an Admin API key in Claude Console. The Compliance API must already be enabled for the organization, and the admin must create the Admin API key while the Compliance API is enabled for it to carry the
read:compliance_activitiesscope. A key that the admin creates while the Safety Cases API is available to your organization also reaches that API. Through that API, the key can read flagged messages and respond to Safety Cases. You can’t leave this access out, so limit who can create and hold a key.
No. A Claude API key (sk-ant-api03-...) authenticates calls to Claude models on the Claude API, not calls to /v1/compliance/*. Instead, use a Compliance Access Key (sk-ant-api01-...) or an Admin API key (sk-ant-admin01-...). See Which key do you need? for the full mapping.
On Claude Models on Google Cloud (Anthropic managed) and Claude Platform on AWS, use the platform’s credentials instead of a key. See How the Compliance API works.
An Admin API key’s only Compliance API scope is read:compliance_activities, which authorizes the Activity Feed only. Every other Compliance API endpoint requires a scope that only a Compliance Access Key created in claude.ai can carry. The exception is the Safety Cases API: an Admin API key that you create while it’s available also carries that API’s scopes. Calling a content or directory endpoint with an Admin API key returns a 403 naming the scope that endpoint family requires: read:compliance_user_data for chats, files, projects, project attachments, sessions, users, and group members, and read:compliance_org_data for organizations, roles, groups, and effective organization settings. For example, listing chats returns the following response.
{
"error": {
"type": "permission_error",
"message": "Missing required scopes. Got: ['api:admin', 'read:compliance_activities'] Needed one of: ['read:compliance_user_data', 'read:org_audit']"
}
}To access content endpoints, the primary owner of your parent organization (or an organization owner, for their own organization only) must create a Compliance Access Key with read:compliance_user_data (and delete:compliance_user_data for deletes), or read:compliance_org_data for organization, role, group, and effective-settings endpoints. A standalone Claude Console organization (one with no parent organization) cannot create a Compliance Access Key, so the content endpoints are not available to it. See Handle Compliance API errors for the full per-endpoint catalog.
Data coverage and retention
The Activity Feed retains 6 years of organization activity, and new events are queryable within 1 minute of occurring. The feed reaches back at most to the point the Compliance API was first enabled for your organization: recording is not retroactive, and activity from before enablement is not backfilled. Access Transparency events are an exception. If your organization is enrolled in Access Transparency, these events are recorded even while the Compliance API is off. The feed can therefore include some from before the Compliance API was first enabled. Activity Feed retention is independent of your organization’s content retention policy: chat, file, and project content follows the retention rules configured for your organization (indefinite by default), unless a user deletes it sooner.
No. The Activity Feed records who did what and when (authentication, chat creation, file uploads, project changes, administrative actions, and similar resource events), but it does not capture the prompt text or model responses inside chats or messages.
To retrieve message bodies and file contents, use the chat, message, and file endpoints with a Compliance Access Key carrying read:compliance_user_data. The same key and scope retrieve transcripts of sessions on users’ machines (such as Cowork and Claude Code sessions) through the local session endpoints, and transcripts of Cowork and Claude Tag sessions in the cloud, and of sessions in the new projects experience, through the remote session endpoints. These endpoints serve Claude Enterprise content only; Claude Console workloads, and Claude API workloads authenticated with an API key, expose administrative and resource events through the Activity Feed but do not expose prompt text or model responses through the Compliance API. The exception is a flagged message that the Safety Cases API returns.
Yes, with some exceptions. Two endpoint families return them:
- Local sessions: The local session endpoints return Cowork, Claude Code, and other sessions that users run on their machines or in Claude add-ins while signed in with their Claude Enterprise account.
- Remote sessions: The remote session endpoints return Cowork sessions that run in the cloud and Claude Tag sessions started in Slack. They also return sessions in the new projects experience.
Both families use your existing Compliance Access Key with read:compliance_user_data.
Neither family returns Claude Code cloud sessions, unless they belong to a project in the new projects experience. For the products that each family covers and the other sessions that neither returns, see Endpoint families and coverage.
The local and remote session endpoints are stable for Cowork, Claude Code, and Claude for Microsoft 365 sessions. Coverage of sessions in Claude Science, the Claude add-ins for Google Docs, Google Sheets, and Google Slides, Claude in Chrome, Claude Tag, and the new projects experience is in beta.
It depends on the product:
- Cowork: Runs appear as remote sessions with the same owner as the task. A session’s
scheduled_task_idfield identifies the task whose run started the session. - Claude Code: Each run of a cloud scheduled task is a Claude Code cloud session, so the session endpoints do not return it, unless it takes place in the conversation or a thread of a project in the new projects experience.
Local and remote session transcripts both carry user prompts, assistant responses, and tool calls and results. For local sessions (on users’ machines), that is what Claude was asked to do and what it returned, not what occurred on the device.
| Data | Local sessions (on users’ machines) | Remote sessions (in the cloud) |
|---|---|---|
| User prompts | Yes; returned as text blocks. | Yes; returned as text blocks. |
| Assistant responses | Yes; text output only. | Yes; text output only. |
| Tool calls and results | Yes; each tool_use input and each text entry in a tool_result is truncated to 10,000 bytes by default (up to about 1 MiB each on request). | Yes; each tool_use input and each text entry in a tool_result is truncated to 10,000 bytes by default (up to about 1 MiB each on request). |
| File contents and file names | Yes; text that Claude reads through tools appears in the transcript, subject to the same truncation. Images, PDFs, and other binary or structured content appear only as placeholder text blocks. File names appear in tool-call inputs and outputs. | Yes; file contents and file names appear in the transcript through tool-call inputs and outputs (text only; other content is omitted). |
| Artifacts | Yes; generated content appears inside tool-call inputs in the transcript. | Yes; generated content appears inside tool-call inputs in the transcript. |
| Skills | Yes; skill content appears when the client sends it as message content, and it is not distinguished from other user text. | Yes; skill content appears in the transcript. |
| Session metadata | Yes; owner (user.id and email address), organization, workspace, product_surface, created_at, and updated_at, from the list and retrieve endpoints. Local sessions carry no status. | Yes; owner, organization, status, timestamps, product_surface, and scheduled_task_id, from the list endpoint. |
| Thinking blocks | No. | No. |
| Images and other non-text content | No; each image, PDF, or other binary or structured block appears as a placeholder text block (for example, [image content not shown]) with truncated set to true. Raw file bytes are never returned. | No; non-text blocks are omitted, and raw file bytes are never returned. |
| Token usage, cost, and latency | No; token usage and cost are available through the Claude Enterprise Analytics API. | No; token usage and cost are available through the Claude Enterprise Analytics API. |
Remote session transcripts do not include every message that Claude received, and not every user message is from a person. See What remote session transcripts leave out.
See Sessions on users’ machines and Sessions in the cloud for the endpoints and parameters.
Cowork’s OpenTelemetry logging and Claude Code monitoring overlap with the session endpoints but answer different needs: OTEL streams per-event telemetry to infrastructure you run as activity occurs, whereas the Compliance API lets you retrieve retained per-session transcripts from Anthropic after the fact. OTEL can also capture prompts and responses, but Anthropic recommends the Compliance API for retrieving the content of Cowork and Claude Code sessions. For a table comparing local sessions, remote sessions, and OTEL, see the introduction to Retrieve session transcripts.
OTEL events and Compliance API records share organization and user identifiers, so you can join them.
No. Deletes performed through the Compliance API are immediate, permanent, and not recoverable. The content of a chat that a user deletes in claude.ai is not recoverable either: the Compliance API still returns the chat and its messages, with deleted_at populated, but not their content. A remote session that has been deleted, including a Claude Tag session deleted with its channel or Slack workspace, is likewise not recoverable, and the remote session endpoints no longer return it. Pull any content you need to retain (for legal hold or archival) while it is still available. See Plan content retention for when to export content to your own archive.
The Compliance API has known coverage boundaries: the Activity Feed records resource events but not prompt or response text, Claude Console and Claude API workloads authenticated with an API key expose no message content apart from flagged messages that the Safety Cases API returns, and content removed by your retention policy, deleted by a user in claude.ai, or hard-deleted through the Compliance API is not recoverable. For the full coverage boundaries and delivery contract, see Delivery guarantees and completeness.
Session transcripts have boundaries of their own. Local sessions are captured only as their requests reach the Claude API, so on-device activity that never reaches the API is not captured. Claude Code sessions authenticated with a Claude Console Developer API key, Claude Code sessions run through a third-party cloud platform (Amazon Bedrock, Google Cloud, or Microsoft Foundry), and Claude Code cloud sessions (including Claude Code cloud scheduled tasks, formerly routines), which run on cloud infrastructure instead of the user’s machine, are not captured either, unless the cloud session belongs to a project in the new projects experience; organizations with HIPAA readiness enabled get local session data for Cowork and Claude Code only, stored for 30 days; and sessions for which zero data retention is in effect are excluded. No session transcript, local or remote, includes thinking blocks or tool definitions. Organizations that use customer-managed encryption keys receive local session transcripts as usual. While the key cannot be used, the messages endpoint returns 503 Service Unavailable instead of transcript content, and session metadata is still listed.
No Compliance API endpoint lists an organization’s Cowork scheduled tasks or Claude Code cloud scheduled tasks. The Activity Feed does not record when a user creates, edits, or deletes one. Deleting a task also deletes the sessions that its runs started. See Limits for scheduled tasks.
Integration and pagination
Join Activity records to your SIEM on actor.user_id, actor.email_address, actor.ip_address, actor.user_agent, and created_at. See Design your compliance integration for the join-key table and consumption patterns.
Yes. A Claude Enterprise parent organization can have many linked organizations, including a mix of claude.ai organizations and Claude Console organizations (for example, separate production and staging Claude Console organizations). Identity, SSO, and SCIM are shared across the parent; billing, members, projects, and API keys remain separate for each organization. Compliance API enablement occurs at the parent organization level and cascades to all linked organizations, and a Compliance Access Key that covers the parent organization and carries read:compliance_org_data can enumerate every organization beneath the parent through GET /v1/compliance/organizations.
Activities are returned newest first, with ties in created_at broken by activity ID. To catch up, walk pages forward by before_id until has_more is false; that final response’s first_id is your new cursor and you have reached the present. The full loop, including initial backfill and the safety conditions on cursor persistence, is in Cursor-driven incremental reads.
To test only the Activity Feed, you do not need a Claude Enterprise organization: an organization admin can enable the Compliance API on an eligible standalone Claude Console test organization and query the feed with a new Admin API key. If that organization’s Compliance page (platform.claude.com/data-controls/compliance) in the Claude Console shows a page-not-found error, or doesn’t show the Compliance API section, the organization is not eligible for self-service enablement.
To test every endpoint, set up a Claude Enterprise sandbox organization linked to a Claude Console organization under the same parent. This lets the sandbox exercise both the Activity Feed (through an Admin API key) and the chat, file, project, and session endpoints (through a Compliance Access Key).
- Provision the Claude Enterprise organization. Contact your Anthropic representative to set up a Claude Enterprise sandbox organization. On an existing Claude Enterprise organization, the primary owner can enable the Compliance API directly in claude.ai.
- Create the Claude Console organization. Create a Claude Console organization yourself at
platform.claude.comusing the same email address. - Link the two organizations. Sign in as the primary owner of the Claude Enterprise organization, go to claude.ai > Organization settings > Identity and access, and use Merge Organizations to link the two under a shared parent.
Once linked, follow Set up the Compliance API to create keys and start querying. Test organizations use the same enablement process as production organizations.
Was this page helpful?