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:
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.
- Open claude.ai → Organization settings → API.
- Under Keys, click Create key.
- Grant the
read:compliance_user_datascope — this is required to list users and read their chats and messages. - Copy the secret immediately; it is shown only once. It starts with
sk-ant-api01-.
3
Organization UUID → ORGANIZATION_UUID
Call the List Organizations endpoint to find the The response contains records like:Copy the
uuid of the org you want to sync: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.