# Domain Keys An authentication standard used to prevent email spoofing. ## List keys for all domains - [GET /v1/dkim/keys](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/get-v1-dkim-keys.md): List domain keys, and optionally filter by signing domain or selector. The page & limit data is only required when paging through the data. ## Create a domain key - [POST /v1/dkim/keys](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/post-v1-dkim-keys.md): Create a domain key. Note that once private keys are created or imported they are never exported. Alternatively, you can import an existing PEM file containing a RSA private key in PKCS #1, ASn.1 DER format. Note, the pem can be passed as a file attachment or as a form-string parameter. ## Delete a domain key - [DELETE /v1/dkim/keys](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/delete-v1-dkim-keys.md): Domain keys are not recoverable after deletion so use with care ## Activate a domain key - [PUT /v4/domains/{authority_name}/keys/{selector}/activate](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/put-v4-domains--authority-name--keys--selector--activate.md): Activate a key to be used to DKIM sign emails with. Note: dns records must be valid for a domain key to be activated ## List domain keys - [GET /v4/domains/{authority_name}/keys](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/get-v4-domains--authority-name--keys.md): List all domain keys for your domain, including active/inactive and valid/invalid ones. ## Deactivate a domain key - [PUT /v4/domains/{authority_name}/keys/{selector}/deactivate](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/put-v4-domains--authority-name--keys--selector--deactivate.md): Deactivating for a specified authority and/or selector means a key won't be used for signing email anymore, even if they are valid. ## Update DKIM authority - [PUT /v3/domains/{name}/dkim_authority](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/put-v3-domains--name--dkim-authority.md): You can delegate the domain authority to an other domain. Domain's authority is set to itself by default. ## Update a DKIM selector - [PUT /v3/domains/{name}/dkim_selector](https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/mailgun/domain-keys/put-v3-domains--name--dkim-selector.md): Selector is the unique identifier of your key. It has to be different from other keys selector.