> ## Documentation Index
> Fetch the complete documentation index at: https://support.configview.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI ChatGPT setup

ConfigView inventories your **ChatGPT Enterprise** workspace — seats, custom GPTs, projects, stored memories, and the compliance event logs — through the **Compliance API**.

You will end up with **2 secrets** in ConfigView (`OPENAI_CHATGPT_COMPLIANCE_KEY`, `OPENAI_CHATGPT_WORKSPACE_ID`) when setup is complete.

> **This is not the same as the OpenAI developer API.** OpenAI splits into two products with two separate consoles and two key types. This page covers **ChatGPT Enterprise** seats and workspace activity. If you want API spend and token usage, that is the [OpenAI Platform](/openai-platform) integration and a different credential entirely. Most organizations that use both will want both apps enabled.

> **Requires ChatGPT Enterprise.** The Compliance API is an Enterprise feature. It is not available on Team, Plus or Free, and there is no partial version of this integration on those plans.

***

## Step 1: Create the Compliance API key

1. Sign in to your ChatGPT Enterprise workspace as a **workspace Owner**
2. Open **Settings** → **Compliance** (or **Compliance API**, depending on your workspace version)
3. Generate a Compliance API key and name it `ConfigView`
4. Copy the key — it is shown once
5. Note your **Workspace ID** from the same screen

> If you do not see a Compliance section, the feature has not been enabled for your workspace. Your OpenAI account contact can turn it on — it is not something a workspace admin can self-serve on every plan.

***

## Step 2: Add the secrets to ConfigView

1. Go to your ConfigView dashboard: `https://{companyname}.configview.com/admin/secret/`
2. Add both secrets:

| Secret name                     | Value                              |
| ------------------------------- | ---------------------------------- |
| `OPENAI_CHATGPT_COMPLIANCE_KEY` | The Compliance API key from Step 1 |
| `OPENAI_CHATGPT_WORKSPACE_ID`   | The workspace ID from Step 1       |

3. Click **Save** for each

***

## Step 3: Enable the ChatGPT scripts in ConfigView

1. Go to: `https://{companyname}.configview.com/admin/cron/`
2. You should see **OpenAI ChatGPT** in the list of available apps
3. Select the scripts you want to run:

**Inventory**

| Script              | Notes                                                                                           |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| **Workspace**       | The workspace itself — plan, verified domains, seat count, active user count. Cheap; enable it. |
| **Users**           | Every member — role, status, licence type, last active and last login.                          |
| **Custom GPTs**     | GPTs built in the workspace, with owner and visibility.                                         |
| **Projects**        | Workspace projects, with owner and archive state.                                               |
| **Stored Memories** | Per-user stored memories. See the privacy note below before enabling.                           |

**Compliance logs**

All four read the same `/logs` endpoint and differ only by event type.

| Script                      | Event type         | Notes                                                                      |
| --------------------------- | ------------------ | -------------------------------------------------------------------------- |
| **Conversations Log**       | `CONVERSATION_LOG` | Conversation metadata — title, message count, model, which GPT or project. |
| **Admin Audit Log**         | `ADMIN_AUDIT_LOG`  | Administrative changes — who did what to whom.                             |
| **User Authentication Log** | `AUTH_LOG`         | Sign-in events, outcome, SSO provider, IP and user agent.                  |
| **Codex Usage Log**         | `CODEX_USAGE_LOG`  | Codex sessions with model and token counts.                                |

4. Click **Save**

***

## Step 4: Verify

1. Go to: `https://{companyname}.configview.com/admin/cron/`
2. Run the **OpenAI ChatGPT** health check

If a check fails:

* **`401` / `403`** — The key is wrong or the Compliance API is not enabled for the workspace. See the note in Step 1.
* **`404`** — `OPENAI_CHATGPT_WORKSPACE_ID` is wrong. Every request is scoped to that ID, so a typo fails everything uniformly rather than just one script.
* **Logs return nothing but inventory works** — Compliance logs are time-windowed and only cover the retention period your plan provides. A quiet workspace, or a first run outside the window, legitimately returns zero rows.

***

## Data Tables

Once the scripts run, the corresponding tables are created in your database. All tables include a `run_at` column for historical tracking. Every request is scoped to `/v1/compliance/workspaces/{workspace_id}/...`.

| Table                   | Source                      | Key Columns                                                                                                           |
| ----------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `chatgpt_workspace`     | \`\` (workspace root)       | workspace\_id, name, plan, domains, seat\_count, active\_user\_count                                                  |
| `chatgpt_users`         | `users`                     | user\_id, email, name, role, status, license\_type, created\_at, last\_active\_at, last\_login\_at, sso\_external\_id |
| `chatgpt_gpts`          | `gpts`                      | gpt\_id, name, description, owner\_user\_id, owner\_email, visibility, created\_at, updated\_at                       |
| `chatgpt_projects`      | `projects`                  | project\_id, name, owner\_user\_id, owner\_email, created\_at, updated\_at, archived\_at                              |
| `chatgpt_memories`      | `memories`                  | memory\_id, user\_id, user\_email, content\_length, content\_preview, created\_at, updated\_at                        |
| `chatgpt_conversations` | `logs` (`CONVERSATION_LOG`) | conversation\_id, user\_id, user\_email, title, message\_count, model, gpt\_id, project\_id, created\_at, updated\_at |
| `chatgpt_admin_audit`   | `logs` (`ADMIN_AUDIT_LOG`)  | event\_id, event\_type, event\_time, actor\_id, actor\_email, target\_type, target\_id, ip\_address                   |
| `chatgpt_user_auth`     | `logs` (`AUTH_LOG`)         | event\_id, event\_time, user\_id, user\_email, ip\_address, user\_agent, outcome, sso\_provider                       |
| `chatgpt_codex_usage`   | `logs` (`CODEX_USAGE_LOG`)  | event\_id, event\_time, user\_id, user\_email, session\_id, model, input\_tokens, output\_tokens, tool\_calls         |

***

## Things worth knowing

**Conversations are metadata, not content.** `chatgpt_conversations` records the title, message count, model and owner — not the messages. That is deliberate: it answers adoption and attribution questions without putting conversation bodies in your database.

**Stored Memories is the one to think about before enabling.** `chatgpt_memories` stores `content_preview` and `content_length` — a preview is still user-entered content, and it will sit in your database and appear in query results. Decide whether that is acceptable under your own data-handling policy before turning the script on. Everything else in this integration is metadata.

**`last_active_at` and `last_login_at` are different, and the gap matters.** Login is an authentication event; active is actual use. A seat with recent logins but no activity is the clearest candidate for reclamation, and you need both columns to spot it.

**The four log scripts share one endpoint and one rate budget.** They all read `/logs` with a different `event_type`. Enabling all four multiplies the calls against the same limit, so if you are only after seat reclamation, Conversations and Auth are usually enough.

**Seat counts have two sources.** `chatgpt_workspace.seat_count` is what OpenAI reports for the workspace; counting rows in `chatgpt_users` is what the API enumerates. If they disagree, trust the workspace figure for billing questions and investigate the difference — pending invites and recently removed members are the usual explanation.
