create_app_api_key
Create an API key for an app. SECURITY: the key must live server-side only (env var, Next.js API routes), never in browser code. If the app has its own users, the server also sends X-App-User: <user id> with the key so per-user endpoints know who is acting.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"appId": "<appId>"
},
"name": "create_app_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Human-readable name | |
| appId | Yes | App id or slug (from list_apps / create_app) | |
| scopes | No | Permissions on the key: "read", "write", "email", "ai". Omit to match the app: write when any endpoint accepts POST, PATCH or DELETE. Sending email from the app server (POST /apps/<slug>/api/_email/send) needs the key to include "email" or "write"; a read-only key is refused with 403 APP_KEY_SCOPE_REQUIRED. Running the app's AI actions from its server (POST /apps/<slug>/api/_ai/v1/run, see configure_app_settings ai) needs "ai"; "write" does not include it. | |
| organizationId | No | Organization id; defaults to the credential organization when omitted |