Domains: Setup help
Send DNS Instructions
Emails the DNS records of a domain to whoever manages your DNS: your IT team, an agency, a freelancer.
https://g.sendcorex.com/v1/domaincommand: send_dns_instructionsNeeds the domain:read scope on your API key.
Up to 5 calls per minute per account. Over that, the command answers RATE_LIMITED.
During a DKIM upgrade, the email has the new record (the one still missing), not the current one.
Arguments
domainstringrequiredThe domain name.
e.g.
"acme.com"emailstringrequiredWho gets the instructions. Up to 255 characters.
e.g.
"it@acme.com"
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/domain',
{
commands: [
{
command: "send_dns_instructions",
args: {
domain: "acme.com",
email: "it@acme.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": "send_dns_instructions",
"id": "0",
"type": "SUCCESS",
"took_ms": 910,
"data": {
"domain": "acme.com",
"sent_to": "it@acme.com"
}
}
]
}Response fields
domainThe domain.
sent_toThe address the email was sent to.
What the email has
RecordsSPF, DKIM, Return-Path and DMARC, with name and value ready to copy.
SenderYour account name, so the person knows who asked.
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
SEND_FAILEDThe instructions email could not be sent. Try again.
- CMD
USER_NOT_FOUNDThe account of the API key no longer exists.
- 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.