Create your first key
Create your first key in the dashboard, in your organization’s API keys settings. Choose a name, an access scope, and an optional expiry. Export the key in your shell so the examples across these docs work as written:Choose an access scope
A key carries one of two access shapes. Pick the narrowest one that can do the job — especially for agents.
Roles map to capabilities:
content_editor— edit CMS content and assets; no source code edits, publishing, or settings.full_editor— everything content editors can do, plus source code, publishing, and domains.admin— organization-scoped keys only; adds member, website, and key management.
owner role cannot be granted to an API key, and every billing operation requires it — so billing stays with human owners in the dashboard.
Create keys programmatically
Once you have one key (or a dashboard session), you can create more over the API — useful for issuing per-agent or per-client keys:Create a website-scoped key
plaintextKey — the only time it is returned:
Response (abridged)
Use the key
Send the key as a bearer token on every request:POST https://api.cactal.ai/v1/mcp.
Key safety
- Store keys in a secret manager or environment variable. Never commit them.
- Scope agent keys to specific websites with the lowest workable role — see Agent-safe publishing.
- Rotate on any suspicion of exposure:
POST /v1/apiKeys/{apiKeyId}/rotatereturns a new secret and invalidates the old one immediately. - Revoke keys you no longer need:
POST /v1/apiKeys/{apiKeyId}/revoke. Revocation is permanent. - Set
expiresAtfor keys that should not outlive a project.
Next steps
Quickstart
Use your key to create and publish your first website.
Connect your agent
Give an MCP client scoped access to Cactal.