Create a domain API key
create_domain_api_keyCreates a new API key on a domain so callers can authenticate to non-anonymous endpoints via Bearer token or query code. Returns the plaintext key once, so copy it immediately.
Instructions
Mints a new API key on a domain — the credential callers pass as Authorization: Bearer (or ?code=) to call a non-anonymous endpoint deployed in that domain. The response's plaintext apiKey is shown EXACTLY ONCE and can never be retrieved again — surface it to the user immediately and tell them to copy it now. Powerful: requires confirm=true — first call WITHOUT confirm to preview, then again with confirm:true.
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": {
"domainId": "<domainId>"
},
"name": "create_domain_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Human-readable label for the key. | |
| confirm | No | Must be true to create. Omit/false returns a preview only. | |
| domainId | Yes | The domain's id — from list_domains. | |
| expiresAt | No | ISO 8601 expiry, e.g. "2026-12-31T00:00:00Z". Omit for no expiry. |