project.message_sent audit events. Use it to enrich exported or streamed audit logs when an authorized security or compliance workflow needs a prompt’s full text.
Who can access the Compliance API
The Compliance API is available only to account admins on Enterprise accounts. Workspace admins and other account members cannot create API keys with Compliance API access or retrieve prompt content. To learn more about Enterprise admin roles, see Account and Workspace Admins.Create an API key
The Compliance API requires the dedicatedaudit-logs:read scope. General read access, including read:*, does not grant access to customer prompt content.
1
Open Developer settings
Open Settings. Under Account, select Developer.
2
Create an API key
Select Create API key, give the key a descriptive name, and choose an
expiration appropriate for your security policy.
3
Grant audit log access
Under Audit logs, select Read. Confirm that the key includes the
audit-logs:read scope.4
Store the key securely
Copy the key, which begins with
rpl_, and store it in a secure secret
manager. The key is displayed only once. Treat it like a password and never
share it, paste it into chat, or commit it to source control.5
Authenticate your integration
Send the key as a Bearer token with requests to the Compliance API.
Example use cases
- Security investigations: Enrich
project.message_sentaudit events with full customer prompt text so authorized responders can reconstruct incidents, identify prompt-injection or data-exfiltration attempts, and determine affected projects and users. - Compliance monitoring: Inspect prompt content for regulated data, secrets, or policy violations, then route findings into DLP, SIEM, retention, and eDiscovery workflows with the original audit metadata intact.
API reference
For the endpoint path, query parameters, response schema, pagination behavior, and examples, see the Compliance API developer documentation.Related documentation
- Audit Logs: View, export, and stream security-relevant events from your Enterprise account.
- Admin API: Access account usage, workspaces, members, and projects programmatically.