Api keys: create
api_keys_createCreate a project API key with named permissions and a 1-365 day expiry. The raw key is shown once, so store it immediately or save it to a CLI profile.
Instructions
Create an API key. The raw key is shown once and never retrievable. Creates a project API key with the named permissions (names from fetch on /permissions) that expires after 1 to 365 days, 90 by default. Permissions you don't hold yourself are dropped with a warning. The raw key appears only in this output, or goes straight into a CLI profile with save_as, so store it at once. Returns JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the API key (e.g. "github-actions", "backup-script") | |
| save_as | No | Save the new key directly into a CLI profile instead of printing it | |
| expires_in | No | Days until the key expires (default: 90, max: 365 unless --no-expiry-cap) | |
| permissions | No | Comma-separated permission names, e.g. "data:read,data:create" | |
| no_expiry_cap | No | Allow --expires-in greater than 365 days (use sparingly) |