# We're on ChatGPT Enterprise and legal wants a record of what employees asked ChatGPT and what it answered, plus what Codex and workspace agents did, for investigations and legal holds. What does the Compliance API actually give us, who can turn it on, and can we rely on OpenAI to keep the logs?

**Short answer:** OpenAI's help article on the Compliance Platform for Enterprise and Edu says it has two parts: the Compliance Logs Platform, which serves immutable, append-only log events as time-windowed JSONL files, and a stateful Compliance API for querying current state. Event types include conversation messages between users and the assistant (Elastic's integration docs say these carry author, client surface, model, tools and skills used, the message content and conversation metadata), Codex logs, workspace agent logs, admin audit logs, authentication logs and app logs. Messages from locked chats are included; an account PIN doesn't stop authorized compliance access. Only a workspace owner can grant the conversation messages permission. The key limit: OpenAI says the Compliance Logs Platform retains data for 30 days, and for longer retention you must continuously download the logs and keep them under your own policy. The old stateful conversation route was removed on June 5, 2026.

## Checklist
1. Ask a workspace owner to create a workspace-scoped Admin key. OpenAI says only a workspace owner can grant broad compliance access or the Conversation messages permission; an admin can grant individual categories such as audit, authentication or app logs.
2. Start continuous collection now, not when a dispute starts: the Compliance Logs Platform keeps data for 30 days, and anything older than that window is gone from the source.
3. Collect each event type you need separately (for example CONVERSATION_MESSAGE, CODEX_LOG, CUSTOM_AGENTS_LOG, AUDIT_LOG, AUTH_LOG, APP_LOG) by listing log files after a timestamp and downloading each file.
4. Apply your own retention and legal holds to the copies you keep. OpenAI's guide says not to assume the source retention window replaces your organization's retention policy.
5. If you still call the old stateful conversations route, move to the conversation logs: OpenAI removed that route on June 5, 2026.
6. For agents running on employees' computers, collect OpenTelemetry events too, and run a test task to compare the exported records with what was actually done.
7. Keep a hash of each log file you download so you can later show the copy you rely on is the one you collected.

## What does the ChatGPT Enterprise Compliance API give you?
- OpenAI launched the Enterprise Compliance API on July 18, 2024, describing it as a record of time-stamped interactions including conversations, uploaded files, workspace GPT configuration and metadata, memories and workspace users. An update dated December 11, 2025 says it is now part of the OpenAI Compliance Logs Platform, which exports data as immutable, time-windowed JSONL log files and added admin audit, user authentication and Codex usage logs.
- The help article says the platform supports two access patterns: the Compliance Logs Platform for immutable, append-only log events for auditing, and the stateful Compliance API for querying state at the time of the request, useful for joining data referenced by events and for older data types. It is available to ChatGPT Enterprise and Edu workspaces, and the logs are meant to feed eDiscovery, DLP and SIEM tools; OpenAI lists partner integrations including Microsoft Purview, Relativity, Smarsh, Global Relay and Elastic.
- Elastic's integration documentation lists the event types it collects: authentication logs (logins, token issuance, logouts with IP, location and user agent), app authentication and app logs (connector requests and responses), Codex logs (tool calls, prompts and responses, plugins, environments), Codex Security logs, admin audit logs (role changes, invitations, policy updates), custom agents logs for workspace agents (runs, memory access, connector calls, triggers) and conversation messages. Each type is listed with GET /v1/compliance/{workspaces|organizations}/{id}/logs?event_type=... and the files are downloaded by log file ID.

## How long does OpenAI keep ChatGPT Enterprise compliance logs, and what does deletion do?
- OpenAI's help article says the Compliance Logs Platform retains data for 30 days. If you want it longer, you need a system that continuously downloads all logs and retains them under your own policy. Deleted data can't be recovered.
- When an item is deleted through the API it is removed from production search and retrieval indexes and kept internally for no more than 30 days after the deletion request. The API can't delete data OpenAI logs internally for audit or security, and every authenticated request to the API is itself logged.
- Messages from locked chats are included in the conversation message logs; OpenAI says an account PIN controls access within ChatGPT but doesn't prevent authorized access through the Compliance Platform. On March 5, 2026 OpenAI released the new conversation logs system and deprecated the old stateful route, which was removed on June 5, 2026.

## What don't ChatGPT Enterprise compliance logs show about agent work?
- OpenAI's ChatGPT Learn guide says work that ChatGPT agents do on a user's computer appears under the conversation_message and codex_log event types, and that local execution also produces OpenTelemetry events you collect separately. It says these sources don't establish a complete record of every local command, file operation, screenshot, approval or external action, and suggests running a representative task and comparing the exported records with the actions performed.
- So the logs are good evidence of what a user asked, what the model returned and which tools it called, from a source your staff can't edit. They don't show whether an action outside ChatGPT happened as described, and after 30 days they only exist in the copy you made. Keep your own copies under hold, hash them when you collect them, and pair them with records from the systems the agent touched.

## Ask Rightshold (free, no key)
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code (one-click setup: https://www.rightshold.com/start?ref=seo), then ask: "We downloaded today's ChatGPT Enterprise CONVERSATION_MESSAGE log files for a legal hold. Record a receipt with the workspace, event type, time window, file count and the SHA-256 of the downloaded JSONL."

```json
{
  "tool": "record_action",
  "arguments": {
    "action_type": "ai_logs.compliance_export",
    "outcome": "success",
    "occurred_at": "2026-11-25T11:00:00Z",
    "client_event_id": "chatgpt-compliance:<workspace id>:CONVERSATION_MESSAGE:2026-11-24",
    "summary": "ChatGPT Enterprise Compliance Logs Platform export, event_type CONVERSATION_MESSAGE, window 2026-11-24T00:00Z to 2026-11-25T00:00Z, 12 log files, held under matter <matter id>",
    "action_sha256": "<sha256 of the concatenated JSONL export>"
  }
}
```
- Needs your API key (or accept_terms:true once to open a free account; the key comes back once). One client_event_id per event type and window keeps retries from creating a second entry.
- Rightshold doesn't read your ChatGPT data or confirm what the logs contain; a receipt shows that export existed in that form at that time. Keep the logs themselves in your own restricted storage.

_Rightshold isn't affiliated with OpenAI or Elastic and doesn't connect to ChatGPT Enterprise. Details are from OpenAI's Help Center article on the Compliance Platform for Enterprise and Edu customers, OpenAI's July 18, 2024 announcement (updated December 11, 2025), the ChatGPT Learn page 'Compliance API and audit events' and Elastic's OpenAI ChatGPT Enterprise integration documentation, all read November 25, 2026. OpenAI says its Admin API reference is the source of truth for current event types, schemas and retention; check it before relying on these details. Not legal advice._

## Sources
- [OpenAI Help Center: OpenAI Compliance Platform for Enterprise and Edu customers](https://help.openai.com/en/articles/9261474-openai-compliance-platform-for-enterprise-and-edu-customers)
- [OpenAI: New compliance and administrative tools for ChatGPT Enterprise (July 18, 2024; updated December 11, 2025)](https://openai.com/index/new-tools-for-chatgpt-enterprise/)
- [ChatGPT Learn: Compliance API and audit events](https://learn.chatgpt.com/docs/enterprise/compliance-api)
- [Elastic: OpenAI ChatGPT Enterprise integration](https://www.elastic.co/docs/reference/integrations/openai_chatgpt_enterprise)

## Related
- [What Claude Compliance API session transcripts show](https://www.rightshold.com/answers/what-do-claude-compliance-api-session-transcripts-show-about-claude-code-and-cowork-sessions)
- [Can a ChatGPT shared link prove what ChatGPT said?](https://www.rightshold.com/answers/can-a-chatgpt-shared-link-prove-what-chatgpt-said-or-can-it-change-after-you-share-it)
- [Can you get an old AI API response back from the provider?](https://www.rightshold.com/answers/can-you-get-an-old-ai-api-response-back-from-the-provider-to-settle-a-dispute)
- [Make an AI agent's audit log append-only](https://www.rightshold.com/answers/how-to-make-an-ai-agents-audit-log-append-only-so-even-an-admin-cant-silently-delete-entries)

_Not legal advice. Updated 2026-11-25. JSON: https://www.rightshold.com/answers/what-does-the-chatgpt-enterprise-compliance-api-record-and-how-long-does-openai-keep-it.json_