Create a mail API key
create_mail_api_keyGive a project's app what it needs to send email: a Mail API key written straight into the project's variables (CMO_MAIL_API_KEY, plus CMO_MAIL_URL), never shown to anyone. The app then POSTs to $CMO_MAIL_URL with Authorization: Bearer $CMO_MAIL_API_KEY ({from, to, subject, html|text}; Resend-compatible). Optionally limit the key to one verified Mail domain. Build the app by the deliverability rules in studio_guide topic mail: confirm addresses at sign-up, handle bounces and 422 invalid_recipient, unsubscribe for newsletters.
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": {
"slug": "<slug>"
},
"name": "create_mail_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Project slug | |
| domain | No | Only this Mail domain (optional) | |
| envName | No | Variable name (default CMO_MAIL_API_KEY) |