/botmail/keys/{id}
0.2.10Unchanged since publicationUpdate a bot key's rules or pause or resume the key
mailallSupply at least one field to update. Set paused to true to pause the key or false to resume it. Only an administrator can resume a key paused by an administrator. The 200 response includes the updated key.
The may field sets the operations the key can perform. The send_mode field accepts self, drafts, or known. Use recipients and blocked to set allowed and blocked recipients. The from_addresses field accepts up to 32 IP addresses or CIDR networks that the bot can call from. The name field accepts up to 64 characters. The sends_per_hour field accepts 1 to 1000, and recipients_per_message accepts 1 to 50. The sends_per_day and calls_per_minute fields each accept values from 1 up to the corresponding server ceiling.
Set from_name to an empty string to send using only the sender's email address. Set copy_to to an empty string to stop sending copies. The expires_days field sets the key's validity period in days. Use 0 to remove expiration.
The API returns 400 if you supply no changes or if a rule value contains ASCII control characters or exceeds 4096 characters, including commas between list entries. It returns 404 if the key is missing or the caller lacks access to it.
As a command
Run as root on the serverParameters
idpath ·integer, 1 or moreRequiredblockedarray of string, up to 254 characterscalls_per_minuteinteger, 1 to 6000copy_tostring, up to 320 characters or nullexpires_daysinteger, 0 to 3650folders_outarray of string, one of drafts, sent, junk, trashfrom_addressesarray of string, up to 64 charactersfrom_namestring, up to 64 charactersmayarray of string, one of read, search, flag, draft, send, replynamestring, up to 64 characterspausedbooleanplatformstring, up to 32 charactersrecipientsarray of string, up to 254 charactersrecipients_per_messageinteger, 1 to 50send_modestring, one of self, drafts, knownsends_per_dayinteger, 1 to 100000sends_per_hourinteger, 1 to 1000Example
See the API overview for how to set $API and $TOKEN.curl -sS -X PATCH "$API/botmail/keys/1" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"blocked": [
"text"
],
"calls_per_minute": 1,
"copy_to": "text",
"expires_days": 1,
"folders_out": [
"drafts"
],
"from_addresses": [
"text"
],
"from_name": "text",
"may": [
"read"
],
"name": "alice",
"paused": true,
"platform": "text",
"recipients": [
"text"
],
"recipients_per_message": 1,
"send_mode": "self",
"sends_per_day": 1,
"sends_per_hour": 1
}'200 OK{
"key": {
"address": "info@example.com",
"address_made_at": "text",
"blocked": [
"text"
],
"calls_per_minute": 1,
"ceilings": {},
"copy_to": "text",
"created_at": "2026-09-09T10:15:00Z",
"dead_why": "text",
"expires_at": "2026-09-16T10:15:00Z",
"folders_out": [
"drafts"
],
"from_addresses": [
"text"
],
"from_name": "text",
"host": "text",
"id": 1,
"key_hint": "text",
"keyword": "text",
"live": true,
"login": "text",
"mailbox": {},
"may": [
"read"
],
"mcp_address": "text",
"name": "alice",
"old_key_hint": "text",
"package_botmail": true,
"paused": true,
"paused_at": "text",
"paused_by": "owner",
"paused_by_name": "text",
"platform": "text",
"recipients": [
"text"
],
"recipients_per_message": 1,
"send_mode": "self",
"sends_per_day": 1,
"sends_per_hour": 1,
"updated_at": "text",
"usage": {},
"used_by_person": true,
"user": "alice"
}
}Errors
20 errors, each a status and a sentence400--id is required400<k> holds a character a rule may not400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid boolean400Invalid domain name400Invalid id400Invalid port400Invalid setting key400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Nothing to change400Username '<value>' is reserved401Authentication required403This bot connector was paused by an administrator; an administrator resumes it404No such bot connector: <c.params>{id}404No such bot connector: <id>404No such domain: <domain>404Setting '<key>' not foundurbestack.com/docs/api/patch-botmail-keys-id/