Create an API key
- In the dashboard, open Role Permissions in the sidebar. Only workspace administrators see it.
- Under Public API Keys, enter a Key name that says where the key will be used, for example
ZapierorCI pipeline. - Click + Create key.
- Copy the key and store it somewhere safe, then click I’ve saved the key. The key is shown only once.
cgpt_. The table under Public API Keys shows each key’s name, the start of the key, when it was created, and when it was last used.
You can also create keys with the CLI as the workspace owner: customergpt tokens create.
Send the key
Put the key in theX-Api-Key header:
Authorization: Bearer cgpt_... works too.
Keep keys secret
- Use keys only on your server, in CI, or in tools you control. Never put a key in a web page, a mobile app, or a public repository.
- Give each integration its own key, so you can revoke one without breaking the others.
- If a key leaks, click Revoke next to it under Public API Keys. Anything using it stops working immediately.
OAuth for AI assistants
The MCP server andcustomergpt login in the CLI sign you in with OAuth instead of a key. You approve access in the browser, and the client receives a token limited to the scopes you approved: agents:read to read workspace data, and agents:write to change it.