Short link: opensrs.help/dkim-api
1. Generate DKIM public key, private key, and key selector
First, you need to generate a public key, private key, and domain key selector to add the DKIM record on a hostedemail domain. You may use online tools like SparkPost DKIM wizard. Enter the domain name, domain key selector, and the key size.
Note: If you are using the default systemDNS nameservers, please generate the key in 1024 bits, not 2048 bits.
2. Add public key as a TXT record on the domain
Once the DKIM key is created, the next step is to add the public key as a TXT record on the DNS zone of the domain name. The TXT record needs to be added on a subdomain based on the selector that you choose. For the above example, add the TXT record on key1._domainkey.dkimtesting.com. If the domain is registered with OpenSRS, you can use set_dns_zone to add the TXT record to the domain.
3. Add the private key and selector information for the domain using API
The change_domain method can be used to add the DKIM record to an existing email domain.
|dkim_selector||A selector generated with your private DKIM record.
This is required if attribute dkim_key is specified.
Your private DKIM key generated with your selector.
Note: Every line break in the DKIM key must be denoted with newline control character '\n'
"dkim_key":"BEGIN RSA PRIVATE KEY/END RSA PRIVATE KEY"