Anthropic Compliance API
Claude Enterprise organisations can read transcripts of their users’ Claude sessions through Anthropic’s Compliance API. The connector pulls those sessions on a schedule and writes one decision record per session snapshot, so every Claude session in the company sits in the same signed, subject-indexed stream as every other AI system.
Requirements
Section titled “Requirements”- A Claude Enterprise organisation. Standalone Console organisations cannot use the session endpoints.
- A Compliance Access Key with the
read:compliance_user_datascope, created in claude.ai by an organisation owner. A regular Claude API key (sk-ant-api03-…) does not work: the Compliance API answers it with a bare 404.
Set-up
Section titled “Set-up”- Put the key where the Stratl API can read it, for example
ANTHROPIC_COMPLIANCE_ACCESS_KEY. - Sources → Add connector → Anthropic Compliance API, secret reference
env:ANTHROPIC_COMPLIANCE_ACCESS_KEY. Choose the session families: local (sessions on users’ machines: Claude Code, Cowork, Claude Science, Microsoft 365, Chrome) and remote (Cowork sessions started on claude.ai that run in Anthropic’s cloud). - Test, then Save. The first run looks back seven days; afterwards local sessions are polled by last activity with a ten-minute overlap, as Anthropic recommends, and remote sessions by creation time.
Some organisations receive Local sessions are not available while remote sessions work; the test reports that as a working key with local sessions unavailable.
What a session becomes
Section titled “What a session becomes”| In the transcript | In the record |
|---|---|
| A user message | input, fingerprinted; content: not_captured with the reason when Anthropic withholds it |
| An assistant message | model_call with the serving model and a fingerprint of the text; the provenance marker (client_asserted, synthetic_marker) is kept |
A tool_use block |
tool_call with a fingerprint of the input, matched to its tool_result (fingerprint, error flag); truncation flags are kept |
| The session | One outcome (assistant_session); the session id is the subject; the product surface (Claude Code, Cowork, …) is the agent; the user is a human actor with identity_provider: anthropic |
The decision id is derived from the session id and its last update, so a session that gains messages produces a new snapshot record and an unchanged session produces none. Prompts, responses and tool payloads are fingerprinted at the edge; nothing readable enters the record. Tool inputs and results are capped at 10 000 bytes per block by default (tool_bytes; -1 asks the server for its maximum).
Prove it against your account
Section titled “Prove it against your account”ANTHROPIC_COMPLIANCE_ACCESS_KEY=sk-ant-api01-… make prove-compliancePulls, pulls again from the cursor, checks every record, writes nothing. Exit status zero is the proof. As with Langfuse, the connector is replay-tested against recorded responses matching Anthropic’s current API reference and has not yet been run by us against a production organisation.