API operation · mail group
POST
/domains/{name}/mail/dkim/rotate
First published 3 Oct 2026
0.1.0Unchanged since publicationRotate the domain's DKIM key
Who may call it
AdministratorResellerCustomer
Token scope, any of
mailallAnswers200 OK
UrbeStack creates a DKIM key under a dated selector and starts signing with it immediately. For example, the first rotation on that date uses s20260915, the second uses s20260915a, and further rotations that day continue with suffixes.
The previous selector's DNS record stays in the zone until the next rotation so mail in transit can still be verified. UrbeStack removes older selector records. The 200 response includes name, selector, previous, retired and record in dkim. Use record to publish the new DNS record at your DNS provider if DNS is hosted elsewhere.
Administrators, the customer who owns the domain and that customer's reseller can call this operation with a token that has the mail scope.
As a command
Run as root on the serverParameters
namepath ·DomainNameRequiredExample
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X POST "$API/domains/example.com/mail/dkim/rotate" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"dkim": {
"name": "alice",
"previous": "text",
"record": {},
"retired": [
"text"
],
"selector": "text"
}
}Errors
14 errors, each a status and a sentence400--name is required400<name> routes its mail elsewhere; there is nothing to sign400<what> must be text without control characters, 1 to <max> characters400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid domain name400Invalid port400Invalid setting key400The mail stack is not installed on this server401Authentication required404Setting '<key>' not found409Too many rotations todayNo error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-domains-name-mail-dkim-rotate/