Skip to content

Update Automatic Sender Security DKIM key rotation for a domain

Request

The minimum allowed interval for rotation is 5 days.

Security
basicAuth
Path
namestringrequired

The Domain name

Bodymultipart/form-datarequired
rotation_enabledbooleanrequired

If true, enables DKIM Auto-Rotation. If false, disables it

rotation_intervalstring

The interval at which to rotate keys. Example, '5d' for five days

curl -i -X PUT \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v1/dkim_management/domains/{name}/rotation' \
  -H 'Content-Type: multipart/form-data' \
  -F rotation_enabled=true \
  -F rotation_interval=string

Responses

A 200 response

Bodyapplication/json
domainobject(github.com-mailgun-pendulum-api-Domain)required
Response
{ "domain": { "id": "000000000000000000000002", "account_id": "000000000000000000000001", "sid": "789", "name": "example.com", "state": "enabled", "active_selector": "pdk1", "rotation_enabled": "true", "rotation_interval": "24h", "records": [] } }