You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1ebadcd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .speakeasy/openapi.json
+151Lines changed: 151 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10002,6 +10002,124 @@
10002
10002
}
10003
10003
}
10004
10004
},
10005
+
"/projects/{id}/api-keys": {
10006
+
"post": {
10007
+
"operationId": "createProjectApiKey",
10008
+
"summary": "Create a project API key",
10009
+
"description": "Create a new secret API key for a project and return it. Give each app or computer its own key, so you can revoke one without breaking the others. The project's existing keys keep working. Needs the `projects:write` permission.",
10010
+
"tags": [
10011
+
"Projects"
10012
+
],
10013
+
"security": [
10014
+
{
10015
+
"Authorization": []
10016
+
}
10017
+
],
10018
+
"parameters": [
10019
+
{
10020
+
"in": "path",
10021
+
"name": "id",
10022
+
"schema": {
10023
+
"type": "string",
10024
+
"description": "The ID of the project."
10025
+
},
10026
+
"required": true,
10027
+
"description": "The ID of the project."
10028
+
}
10029
+
],
10030
+
"requestBody": {
10031
+
"required": true,
10032
+
"content": {
10033
+
"application/json": {
10034
+
"schema": {
10035
+
"type": "object",
10036
+
"properties": {
10037
+
"name": {
10038
+
"default": "API key",
10039
+
"description": "A name for the key, shown on the API keys page of the dashboard. Name it after where the key is used, for example the app or the computer.",
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ modapi content submit --content '{"type":"text","text":"Hey, check out my profil
128
128
<!-- Start Custom [guide] -->
129
129
## Set up Moderation API in your project
130
130
131
-
Run `init` in your project's directory. It signs you in if needed, creates a Moderation API project, and writes the project's keys to your env file:
131
+
Run `init` in your project's directory. It links one of your Moderation API projects or creates a new one, and writes the project's keys to your env file:
132
132
133
133
```bash
134
134
modapi login # once per machine; opens the browser
--brief "Stop contact details shared outside the platform, scams and harassment"
145
145
```
146
146
147
-
`init` does not change your code. To add the moderation calls, let your coding agent do it with the [setup skill](https://github.com/moderation-api/skills):
147
+
To connect a directory to a project you already have, run `modapi link` (or `modapi link "<project name>"`). It makes a new key for the project, so you can revoke it on its own. Agents and scripts pass `init --project <id or name>` or `init --new` instead of answering the question.
148
+
149
+
`init` does not change your code. To add the moderation calls, let your coding agent do it with the setup skill:
148
150
149
151
```bash
150
-
npx skills add moderation-api/skills
152
+
npx skills add moderation-api/cli
151
153
```
152
154
153
155
Then ask your agent to "set up Moderation API". The skill finds where users create content, adds the moderation call, handles the result and sets up webhooks, asking you before each change.
@@ -409,6 +411,8 @@ modapi projects list --secret-key "$MODAPI_ORGANIZATION_KEY"
409
411
*[`update`](docs/modapi_projects_update.md) - Update a project
410
412
*[`delete`](docs/modapi_projects_delete.md) - Delete a project
411
413
*[`duplicate`](docs/modapi_projects_duplicate.md) - Duplicate a project
414
+
*[`api-keys`](docs/modapi_projects_api-keys.md) - Operations for api-keys
415
+
*[`create`](docs/modapi_projects_api-keys_create.md) - Create a project API key
412
416
*[`channels`](docs/modapi_channels.md) - Operations for channels
413
417
*[`list`](docs/modapi_channels_list.md) - List channels
414
418
*[`create`](docs/modapi_channels_create.md) - Create a channel
0 commit comments