Domains: Routes

Run Commands

The single entry point for sending domains. Send 1 to 10 commands in one request and get one result per command.

POSThttps://g.sendcorex.com/v1/domain
i

Same envelope as Contacts, Logs and Bounces & Complaints. The pages below this one document each command.

i

Errors are reported per command. A command that fails does not stop the others, and the HTTP status stays 200.

i

Domains are identified by their name (acme.com), never by an internal id.

Body parameters

  • commandsobject[]required

    1 to 10 commands, executed in order. The whole body can have up to 1 MB.

  • commands[].commandstringrequired

    list_domains, get_domain, add_domain, delete_domain, update_domain_description, list_free_domains, start_dkim_upgrade, cancel_dkim_upgrade, send_dns_instructions or request_domain_remediation.

  • commands[].argsobjectoptional

    The command arguments. Any value can be a $ref to the result of an earlier command.

  • commands[].idstringoptional

    Your own identifier for the result. Defaults to the index ("0", "1"…). Required if you want to use $ref.

Quick start

import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/domain',
  {
    commands: [
      {
        command: "list_domains",
        id: "mine"
      },
      {
        command: "list_free_domains",
        id: "free"
      }
    ]
  },
  { headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);

for (const result of response.data.results) {
  if (result.type !== 'SUCCESS') console.error(result.id, result.code, result.message);
  else console.log(result.id, result.data);
}

Response

{
  "type": "SUCCESS",
  "results": [
    {
      "command": "list_domains",
      "id": "mine",
      "type": "SUCCESS",
      "took_ms": 6,
      "data": {
        "domains": [
          {
            "domain": "acme.com",
            "validated": true,
            "has_mx": true,
            "has_spf": true,
            "has_dkim": true,
            "has_dmarc": true,
            "has_return_path": true,
            "description": "Transactional (app emails)",
            "dkim_key_size": 2048,
            "dkim_deprecated": false,
            "dkim_upgrade_pending": false,
            "created_at": "2026-09-02T14:21:07.118Z",
            "updated_at": "2026-10-21T02:40:51.902Z"
          }
        ]
      }
    },
    {
      "command": "list_free_domains",
      "id": "free",
      "type": "SUCCESS",
      "took_ms": 0,
      "data": {
        "domains": [
          "corexsend.com",
          "inboxtaken.com",
          "outsending.com",
          "shieldhaus.uk",
          "shieldhaus.info",
          "mailverifypro.info",
          "mailverifypro.online",
          "mailverifypro.store",
          "mailverifypro.org"
        ]
      }
    }
  ]
}

Response fields

  • type

    Always SUCCESS when the request itself was accepted.

  • results[].command

    The command that produced this result.

  • results[].id

    The id you sent, or the index of the command.

  • results[].type

    SUCCESS or ERROR.

  • results[].took_ms

    Time the command took inside the server. Commands that check DNS take longer.

  • results[].data

    The command output. Only present when type is SUCCESS.

  • results[].code / message

    The error. Only present when type is ERROR.

Authentication

Use the API key you create in the dashboard, under Developers → API Keys, with the scopes the commands need.

  • Authorization

    Send Authorization: <api key> or Authorization: Bearer <api key>.

  • domain:read

    list_domains, get_domain, list_free_domains and send_dns_instructions.

  • domain:create

    add_domain, start_dkim_upgrade, cancel_dkim_upgrade, update_domain_description and request_domain_remediation.

  • domain:delete

    delete_domain. Give it only to keys that really need it: deleting a domain also deletes its senders.

  • Mailbox tokens

    The webmail token does not work here. It is rejected with WRONG_CREDENTIAL_TYPE.

  • Allowed IPs

    If the key has an IP allowlist, requests from other IPs get 403 IP_NOT_ALLOWED.

Chaining with $ref

Add a domain and read it back in one request: the second command takes the domain from the first result.

add_domain → get_domain

{
  "commands": [
    {
      "command": "add_domain",
      "id": "new",
      "args": {
        "domain": "acme.com"
      }
    },
    {
      "command": "get_domain",
      "args": {
        "domain": {
          "$ref": "new",
          "path": "domain"
        }
      }
    }
  ]
}

Rate limits

Two limits. The first one is for the whole route, the second one for some commands.

  • 15 requests / second

    Per IP + API key. Over it, HTTP 429 with a Retry-After header.

  • 15 in flight

    At most 15 requests being processed at the same time, per IP + API key.

  • Per command, per account

    add_domain 10/min · get_domain 60/min · delete_domain 30/min · start_dkim_upgrade and cancel_dkim_upgrade 10/min · update_domain_description 20/min · send_dns_instructions and request_domain_remediation 5/min. Over it, that command answers RATE_LIMITED.

  • No cache

    Every call reads the database (and the DNS, for get_domain). What you get is always current.

Errors

HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.

  • 400INVALID_JSON

    The body is not {"commands":[...]} or is larger than 1 MB.

  • 400INVALID_ARGS

    The request has no commands or more than 10.

  • 401MISSING_AUTH_HEADER

    No Authorization header was sent.

  • 401INVALID_API_KEY

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

  • 401API_KEY_EXPIRED

    The API key passed the expiration date set in the dashboard.

  • 401WRONG_CREDENTIAL_TYPE

    A mailbox token was sent. The Domains API needs a dashboard API key.

  • 403IP_NOT_ALLOWED

    The request came from an IP that is not in the allowed IPs of the key.

  • 403ACCOUNT_BLOCKED

    The account is blocked.

  • 403MISSING_SCOPE

    The key has no `domain:*` scope, so no command can run.

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

  • 503AUTH_UNAVAILABLE

    Authentication is temporarily unavailable. Try again.

  • CMDUNKNOWN_COMMAND

    The command name does not exist.

  • CMDINTERNAL

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