enterprise/governance.md +44 −33
1# Governance1# Governance
2 2
3Governance guidance for managing Codex in your organization
4
5# Governance and Observability3# Governance and Observability
6 4
7Codex gives enterprise teams visibility into adoption and impact, plus the auditability needed for security and compliance programs. Use the self-serve dashboard for day-to-day tracking, the Analytics API for programmatic reporting, and the Compliance API to export detailed logs into your governance stack.5Codex gives enterprise teams visibility into adoption and impact, plus the auditability needed for security and compliance programs. Use the self-serve dashboard for day-to-day tracking, the Analytics API for programmatic reporting, and the Compliance API to export detailed logs into your governance stack.
16 14
17## Analytics Dashboard15## Analytics Dashboard
18 16
1917<div class="max-w-1xl mx-auto">
18 <img src="https://developers.openai.com/images/codex/enterprise/analytics-dashboard.png"
19 alt="Codex analytics dashboard"
20 class="block w-full mx-auto rounded-lg !border-0"
21 />
22</div>
20 23
2124### Dashboards### Dashboard views
22 25
2326The [analytics dashboard](https://chatgpt.com/codex/settings/analytics) allows ChatGPT workspace administrators to track feature adoption.The [analytics dashboard](https://chatgpt.com/codex/cloud/settings/analytics#usage) allows ChatGPT workspace administrators and analytics viewers to track Codex adoption, usage, and Code Review feedback. Usage data can lag by up to 12 hours.
24 27
2528Codex provides the following dashboards:Codex provides date-range controls for daily and weekly views. Key charts include:
26 29
2730- Daily users by product (CLI, IDE, cloud, Code Review)- Active users by product surface, including CLI, IDE extension, cloud, desktop, and Code Review
2831- Daily code review users- Workspace and personal usage breakdowns, including credit and token usage by product surface
2932- Daily code reviews- Product activity for threads and turns by client
3033- Code reviews by priority level- User ranking table, with filters for client and sort options such as credits, threads, turns, text tokens, and current streak
3134- Daily code reviews by feedback sentiment- Code Review activity, including PRs reviewed, issues by priority, comments, replies, reactions, and feedback sentiment
3235- Daily cloud tasks- Skill invocations and agent identity usage when your workspace has those features
33- Daily cloud users
34- Daily VS Code extension users
35- Daily CLI users
36 36
37### Data export37### Data export
38 38
39Administrators can also export Codex analytics data in CSV or JSON format. Codex provides the following export options:39Administrators can also export Codex analytics data in CSV or JSON format. Codex provides the following export options:
40 40
4141- Code review users and reviews (Daily unique users and total reviews completed in Code Review)- Workspace usage, including daily active users, threads, turns, and credits by surface
4242- Code review findings and feedback (Daily counts of comments, reactions, replies, and priority-level findings)- Usage per user, including daily threads, turns, and credits across surfaces, with optional email addresses when allowed
4343- cloud users and tasks (daily unique cloud users and tasks completed)- Code Review details, including daily comments, reactions, replies, and priority-level findings
44- CLI and VS Code users (Daily unique users for the Codex CLI and VS Code extension)
45- Sessions and messages per user (Daily session starts and user message counts for each Codex user across surfaces)
46 44
47## Analytics API45## Analytics API
48 46
4947Use the [Analytics API](https://chatgpt.com/codex/settings/apireference) when you want to automate reporting, build internal dashboards, or join Codex metrics with your existing engineering data.Use the [Analytics API](https://chatgpt.com/codex/cloud/settings/apireference) when you want to automate reporting, build internal dashboards, or join Codex metrics with your existing engineering data.
50 48
51### What it measures49### What it measures
52 50
5351The Analytics API provides daily, time-series metrics for a workspace, with optional per-user breakdowns and per-client usage.The enterprise Analytics API returns daily or weekly UTC buckets for a workspace. It supports workspace-level and per-user usage, per-client breakdowns, Code Review throughput, Code Review comment priority, and user engagement with Code Review comments.
54 52
55### Endpoints53### Endpoints
56 54
5755#### Daily usage and adoptionThe base URL is `https://api.chatgpt.com/v1/analytics/codex`. All endpoints return paginated `page` objects with `has_more` and `next_page`.
56
57Use `start_time` for the inclusive Unix timestamp at the beginning of the reporting window, `end_time` for the exclusive Unix timestamp at the end of the reporting window, `group_by` for `day` or `week` buckets, `limit` for page size, and `page` to continue from a previous response. Requests can look back up to 90 days.
58
59#### Usage
60
61`GET /workspaces/{workspace_id}/usage`
58 62
5963- Daily totals for threads, turns, and credits- Returns totals for threads, turns, credits, and per-client usage in daily or weekly buckets.
6064- Breakdown by client surface- Omit `group` to return per-user rows.
6165- Optional per-user reporting for adoption and power-user analysis- Set `group=workspace` to return workspace-wide rows.
66- Includes text input, cached input, and output token fields.
62 67
63#### Code review activity68#### Code review activity
64 69
6570- Pull request reviews completed by Codex`GET /workspaces/{workspace_id}/code_reviews`
6671- Total comments generated by Codex
6772- Severity breakdown of comments- Returns pull request reviews completed by Codex.
73- Returns total comments generated by Codex.
74- Breaks comments down by P0, P1, and P2 priority.
68 75
69#### User engagement with code review76#### User engagement with code review
70 77
7178- Replies to Codex comments`GET /workspaces/{workspace_id}/code_review_responses`
7279- Reactions, including upvotes and downvotes
7380- Engagement breakdowns for how teams respond to Codex feedback- Returns replies and reactions to Codex comments.
81- Breaks reactions down into positive, negative, and other reactions.
82- Counts comments that received reactions, replies, or either form of engagement.
74 83
75### How it works84### How it works
76 85
7786Analytics is daily and time-windowed. Results are time-ordered and returned in pages with cursor-based pagination. You can query by workspace and optionally group by user or aggregate at the workspace level.Analytics uses time windows and supports day or week grouping. Results are time-ordered and returned in pages with cursor-based pagination. Use an API key scoped to `codex.enterprise.analytics.read`.
78 87
79### Common use cases88### Common use cases
80 89
90 99
91The Compliance API gives enterprises a way to export logs and metadata for Codex activity so you can connect that data to your existing audit, monitoring, and security workflows. It is designed for use with tools like eDiscovery, DLP, SIEM, or other compliance systems.100The Compliance API gives enterprises a way to export logs and metadata for Codex activity so you can connect that data to your existing audit, monitoring, and security workflows. It is designed for use with tools like eDiscovery, DLP, SIEM, or other compliance systems.
92 101
102For Codex usage authenticated through ChatGPT, Compliance API exports provide audit records for Codex activity and can be used in investigations and compliance workflows. These audit logs are retained for up to 30 days. API-key-authenticated Codex usage follows your API organization settings and is not included in Compliance API exports.
103
93### What you can export104### What you can export
94 105
95#### Activity logs106#### Activity logs