create_app_api_key
Generate an API key for an app to enable authenticated server-side access. Store the key only on the server and include the X-App-User header for per-user endpoints.
Instructions
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.
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 recorded on the key: ["read"] or ["read","write"]. Omit to match the app: write when any endpoint accepts POST, PATCH or DELETE. | |
| organizationId | No | Organization id; defaults to the credential organization when omitted |