create_api_key
Create a new PricklyMails API key under the caller's account and return its raw value once (field raw_key); store it right away, it is never shown again. Use it to give an integration or script its own credential; the tools in this server do not need one. environment picks live (default, real billing and real SMTP) or test (a deterministic sandbox: no SMTP, no wallet debit). scopes default to the project defaults and enabled_checks to every check the plan allows when omitted, and the new key may hold only scopes the caller's session holds itself, the defaults included. Use list_api_keys to see existing keys and revoke_api_key to disable one. Requires the api_keys:create scope.
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 | Display name for the new key, shown in the PricklyMails dashboard. | |
| scopes | No | Optional scope wire strings (e.g. email:verify:single, results:read), each one the caller's session holds; when absent the project default scopes are applied. | |
| expires_at | No | Optional RFC 3339 time at which the key stops working, in the future and at most 364 days ahead; when absent the key never expires. | |
| environment | No | Optional environment, live or test (defaults to live). A test key (pm_test_*) runs a deterministic sandbox: the worker never dials SMTP or resolves DNS, and nothing is reserved or billed from the wallet, so it is safe for integration testing. | |
| enabled_checks | No | Optional check wire strings (syntax, mx, smtp, disposable, role, free, catchall); when absent the key runs every check the caller's plan allows, each billed per verification (see get_pricing). |