Skip to main content
The Claude Compliance integration is a self-hosted utility script that pulls conversation data from Anthropic’s Claude Compliance API and ingests each user/assistant turn into Nebuly as an Interaction. The data flow is: Compliance API (users → chats → messages) → pair conversion → Nebuly ingestion The script is incremental and resumable: it tracks a local cache of already-synced data, so you can re-run it safely at any time without creating duplicates. The source repository is available here.

Prerequisites

  • A Claude Enterprise organization with the Compliance API enabled. Enterprise primary owners can self-enable the Compliance API from the Console; if you are on a Console plan, contact your Anthropic account team.
  • Python ≥ 3.12 and Poetry installed on the machine that runs the script.

Install & run

Clone the integration examples repository, install dependencies, configure your .env file, and run the sync:
Follow the guide below to retrieve the necessary credentials. For the complete environment variable reference, available CLI flags, payload customization and resumable-cache details, check the project README.

Get your credentials

The script requires three environment variables. Follow the steps below to obtain each one.
1

Nebuly secret key → NEBULY_API_KEY

In Nebuly, go to Settings → Projects → View Nebuly keys → Secret keys and copy the secret key for the project you want to sync.
2

Compliance Access Key → COMPLIANCE_API_KEY

This key is created by the primary owner of your Claude Enterprise organization.
  1. Open claude.ai → Organization settings → API.
  2. Under Keys, click Create key.
  3. Grant the read:compliance_user_data scope — this is required to list users and read their chats and messages.
  4. Copy the secret immediately; it is shown only once. It starts with sk-ant-api01-.
This key can read all chats, files, and projects across every organization linked to your Claude account. Treat it like a root credential and store it in a secrets manager. See Anthropic’s Get access to the Compliance API for full details.
3

Organization UUID → ORGANIZATION_UUID

Call the List Organizations endpoint to find the uuid of the org you want to sync:
The response contains records like:
Copy the uuid value (not the name). See Anthropic’s List organizations, users, roles, groups for the full response schema.

Claude Compliance Nebuly integration

Full install guide, env-var table, CLI flags, and customization docs

Claude Compliance API

Anthropic’s official Compliance API reference

FAQ

Where does the synced data appear?
Conversations imported by the script show up on the Interactions page in your Nebuly project.
When will my data appear?
There can be a delay of up to 30 minutes between the moment data is available in sent and when it becomes visible in Nebuly. Subsequent updates follow the same polling interval.
Is it safe to re-run the script?
Yes. The script maintains a local cache directory (default: .cache/) that records which conversations have already been synced. Re-running it will pick up only new data and will not create duplicates.
How can I see what would be sent without triggering ingestion?
Pass the --dry-run flag. The script will fetch and convert data but will skip the POST to Nebuly’s ingestion endpoint, printing a summary instead.