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.

POSThttps://g.sendcorex.com/v1/domaincommand: send_dns_instructions
i

Needs the domain:read scope on your API key.

i

Up to 5 calls per minute per account. Over that, the command answers RATE_LIMITED.

i

During a DKIM upgrade, the email has the new record (the one still missing), not the current one.

Arguments

  • domainstringrequired

    The domain name.

    e.g. "acme.com"

  • emailstringrequired

    Who 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

  • domain

    The domain.

  • sent_to

    The address the email was sent to.

What the email has

  • Records

    SPF, DKIM, Return-Path and DMARC, with name and value ready to copy.

  • Sender

    Your 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.

  • 401INVALID_API_KEY

    The API key does not exist, was revoked or was disabled in the dashboard.

  • 429RATE_LIMITED

    More than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.

  • CMDMISSING_SCOPE

    The API key does not have the scope this command needs.

  • CMDINVALID_ARGS

    An argument is invalid: missing or malformed `domain`, `key_size` other than 1024/2048, invalid `email`, a description over 255 characters…

  • CMDDOMAIN_NOT_FOUND

    The domain is not on your account.

  • CMDSEND_FAILED

    The instructions email could not be sent. Try again.

  • CMDUSER_NOT_FOUND

    The account of the API key no longer exists.

  • CMDRATE_LIMITED

    This command was called too many times in the last minute by your account. Wait a minute.

  • CMDINTERNAL

    Server error. The detail is only written to the server log.