Prerequisites
- The Admin or Owner role in your organization. Only these roles can create organization keys.
Project limit
Your plan sets how many projects your organization can have: self-serve plans include 2, Enterprise plans 25. Your limit shows in Settings → Usage. Creating or duplicating a project beyond it returns403 with the code plan_limit_exceeded. Delete a project you no longer need, or contact support@moderationapi.com for more.
Create an organization key
1
Open API keys
In the dashboard, go to Settings → API keys and click Create key.
2
Choose its access
- Name: a label so you can recognize the key, for example the tool that uses it.
- Permissions: pick None, Read, or Write for projects and for channels. Write includes read.
- Projects: leave empty to reach every project, or pick the projects the key can reach.
- Expires: Never, 30 days, 90 days, or 365 days.
3
Copy the key
Copy the key and store it in a secret manager. You can’t see it again after you close the dialog.
sk_org_, so you and secret scanners can tell them apart from project keys.
Permissions
Each endpoint needs one permission on the key:
An organization key can also call Get account details, so you can check that the key works.
Call project endpoints
An organization key can call the endpoints of any project it reaches: submit content, list authors, work a review queue, and so on. Name the project in theProject-Id header, by its ID or by its name. In the SDKs and the CLI this is the projectId parameter. If your organization has one project, you can leave it out.
projects:read on the key, and changing anything (submitting content included) needs projects:write. A project key always acts on its own project: naming another project with it returns 403.
A name matches regardless of case. When more than one project the key reaches has that name, the request returns 400 with project_name_ambiguous and lists the matching projects: name the project by its ID instead.
Keys limited to some projects
A key limited to some projects only sees those projects and their channels. Other projects return404 Not Found. A limited key can’t create or duplicate projects, because the new project would fall outside its limit. Use a key that reaches every project for that.
Example: set up a new project
Create a project. The response includes the new project’ssecretKey, which you use to moderate content in that project. The other project endpoints don’t return it. You can also find it in the dashboard under Project → Configure → API keys.
domain or context, the project suggests policies for the platform.
Add a channel for another surface of your product:
key as channel:
Copy a setup
To reuse a configuration you already tuned, duplicate it instead of building it again:- Duplicate a project copies its settings, every channel with its policies, rules and wordlists, its moderation actions, and its review queues. The copy gets its own secret key. Webhooks, integrations, API keys, and content aren’t copied.
- Duplicate a channel copies a channel inside its project with every setting, policy, rule, and wordlist. Use it to try a change next to the original. Integrations aren’t copied.
Roll a key
To replace a key without downtime, open the key’s menu in Settings → API keys and click Roll key. The new key has the same access and lifetime as the old one. Choose when the old key stops working: Now, 1 hour, 24 hours, or 7 days. The old key never outlives its own expiry date. To revoke a key at once, click Delete.Activity and audit
Each key shows when it was last used. Every change made with an organization key shows in Settings → Activity, with the key that made it.Rate limits
The management API allows 60 requests per minute per organization, separate from your moderation rate limit. When you create many projects in a script, handle429 responses and retry after the time in the Retry-After header.
Errors
See Errors for the response format and all codes.