create_api_key
Create an API key with a role, prefix, expiry, and rate limit for integrations such as webhooks or n8n. Role-based access prevents permission escalation.
Instructions
Create API Key with role (anti-escalation enforced)
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": {
"name": "<name>"
},
"name": "create_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | API key name, for example ERP Webhook or Production n8n | |
| role | No | RBAC role: admin has full access; editor has consumer and builder-read access; member has consumer access. Cannot exceed the caller's role. | admin |
| prefix | No | Key prefix: zhn_live_ for production, zhn_test_ for testing, zhn_dev_ for development | zhn_live_ |
| description | No | Description of the key purpose | |
| expires_in_days | No | Days until expiry; omit for no expiry | |
| rate_limit_per_minute | No | Requests per minute, an integer of at least 1, validated against the tenant plan |