Domains: DKIM
Cancel DKIM Upgrade
Drops the pending 2048-bit key. The domain keeps signing with its current key, as before.
https://g.sendcorex.com/v1/domaincommand: cancel_dkim_upgradeNeeds the domain:create scope on your API key.
Up to 10 calls per minute per account. Over that, the command answers RATE_LIMITED.
Only works before the new key was published and switched. After the switch there is nothing to cancel.
Arguments
domainstringrequiredThe domain name.
e.g.
"acme-mail.com"
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/domain',
{
commands: [
{
command: "cancel_dkim_upgrade",
args: {
domain: "acme-mail.com"
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "cancel_dkim_upgrade",
"id": "0",
"type": "SUCCESS",
"took_ms": 402,
"data": {
"domain": "acme-mail.com",
"validated": true,
"has_mx": true,
"has_spf": true,
"has_dkim": true,
"has_dmarc": true,
"has_return_path": true,
"description": null,
"dkim_key_size": 1024,
"dkim_deprecated": true,
"dkim_upgrade_pending": false,
"created_at": "2026-09-02T14:21:07.118Z",
"updated_at": "2026-10-21T02:40:51.902Z",
"registrar": "cloudflare",
"dns_records": {
"spf": {
"type": "TXT",
"host": "acme.com",
"value": "v=spf1 include:_spf.google.com include:smtp.emailsbit.com ~all"
},
"dkim": {
"type": "TXT",
"host": "sendcorex._domainkey",
"value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyehkd3qqGElvW/VDL5AaWTg0nLVkjRo9z+40RQzuVaE8AkAFmxZzow3x+VJYKdjykkJ0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdgcKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbcmwIDAQAB",
"split_value": "\"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyehkd3qqGElvW/VDL5AaWTg0nLVkjRo9z+40RQzuVaE8AkAF\" \"mxZzow3x+VJYKdjykkJ0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdgcKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbcmwIDAQAB\""
},
"mx": {
"type": "MX",
"host": "acme.com",
"value": "bounce.emailsbit.com",
"priority": 0
},
"return_path": {
"type": "CNAME",
"host": "bounces",
"value": "bounce.emailsbit.com"
},
"dmarc": {
"type": "TXT",
"host": "_dmarc",
"value": "v=DMARC1; p=quarantine; rua=mailto:dmarc@bounces.acme.com"
}
},
"spf_duplicate": false,
"spf_duplicate_records": [],
"dkim": {
"version": 1,
"key_size": 1024,
"selector": "sendcorex",
"deprecated": true,
"upgrade_pending": false,
"pending": null,
"previous_selector": null,
"keep_old_record_until": null,
"just_upgraded": false
}
}
}
]
}Response fields
domainThe domain name, in lowercase. It is the id you use in every other command.
validatedtrueonce the Return-Path CNAME and the DKIM record were found. Only validated domains can have senders.has_mxThe MX record points to
bounce.emailsbit.com. Optional: needed only to receive replies and bounces on the domain itself.has_spfYour SPF includes
include:smtp.emailsbit.com.has_dkimThe DKIM TXT record with your public key is published.
has_dmarcA DMARC record exists on
_dmarc.<domain>.has_return_pathThe Return-Path CNAME (
bounces.<domain>→bounce.emailsbit.com) is published. Bounces and SPF alignment depend on it.descriptionYour own note about the domain, or
null.dkim_key_size2048or1024.nullif the domain has no key yet.dkim_deprecatedtruefor 1024-bit keys. Some providers already treat them as weak: upgrade with Start DKIM Upgrade.dkim_upgrade_pendingtruewhile a new 2048-bit key waits for its DNS record.created_at / updated_atISO 8601, UTC.
registrarWhere the DNS is hosted, from its nameservers:
cloudflare,namecheap,godaddy,route53,google,vercel,hostinger,ionos,hetzner,dreamhost,squarespace,registrobrorother.dns_records.spf / dkim / mx / return_path / dmarcThe records to publish. Each has
type,hostandvalue. See DNS records below.dns_records.dkim_pendingOnly during a DKIM upgrade: the new 2048-bit record. Publish it next to the current one.
dns_records.*.split_valueOnly for TXT values over 255 characters: the same value already split into quoted strings, for DNS panels that need it.
dns_records.mx.priorityAlways
0.spf_duplicatetruewhen the domain has more than one SPF record. That is invalid: SPF fails for every receiver until you merge them into one.spf_duplicate_recordsThe SPF records found, to help you merge them.
dkimThe DKIM key in use and any upgrade in progress. See DKIM below.
dkim.version2for 2048-bit keys,1for 1024.dkim.key_sizeThe size of the key that signs your emails now.
dkim.selectorThe selector of the key in use: the
s=in the DKIM-Signature header.dkim.deprecatedtruefor 1024-bit keys.dkim.upgrade_pendingtruewhile a new key waits for its DNS record.dkim.pendingThe new key:
selector,key_size,host,full_host,value,split_value,created_at.nullwhen there is no upgrade.dkim.previous_selectorFor 48 hours after an upgrade: the old selector. Keep its record until
keep_old_record_until, then you can remove it.dkim.keep_old_record_untilWhen the old record can be removed.
nullwhen there is nothing to remove.dkim.just_upgradedtrueonly on the call that switched to the new key.
After cancelling
The pending recordIf you already published the
sendcorex2record, you can remove it.Starting againStart DKIM Upgrade creates a brand-new key: publish the new value it returns, not the old one.
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key does not exist, was revoked or was disabled in the dashboard.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD
MISSING_SCOPEThe API key does not have the scope this command needs.
- CMD
INVALID_ARGSAn argument is invalid: missing or malformed `domain`, `key_size` other than 1024/2048, invalid `email`, a description over 255 characters…
- CMD
DOMAIN_NOT_FOUNDThe domain is not on your account.
- CMD
DKIM_NOT_FOUNDThe domain has no DKIM key.
- CMD
NO_PENDING_UPGRADEThere is no upgrade to cancel.
- CMD
RATE_LIMITEDThis command was called too many times in the last minute by your account. Wait a minute.
- CMD
INTERNALServer error. The detail is only written to the server log.