Domains: Domains

Get Domain

Checks the DNS of one domain right now and returns the records to publish, the ones already found and the DKIM key. The domain is validated by this call as soon as its records are in place.

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

Needs the domain:read scope on your API key.

i

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

i

The domain becomes validated when the Return-Path CNAME and the DKIM record are found. You get an email when it happens.

i

During a DKIM upgrade, this call also switches to the new key once its record is published (dkim.just_upgraded).

Arguments

  • domainstringrequired

    The domain name.

    e.g. "acme.com"

Quick start

import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/domain',
  {
    commands: [
      {
        command: "get_domain",
        args: {
          domain: "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": "get_domain",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 412,
      "data": {
        "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",
        "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": 2,
          "key_size": 2048,
          "selector": "sendcorex",
          "deprecated": false,
          "upgrade_pending": false,
          "pending": null,
          "previous_selector": null,
          "keep_old_record_until": null,
          "just_upgraded": false
        }
      }
    }
  ]
}

Response fields

  • domain

    The domain name, in lowercase. It is the id you use in every other command.

  • validated

    true once the Return-Path CNAME and the DKIM record were found. Only validated domains can have senders.

  • has_mx

    The MX record points to bounce.emailsbit.com. Optional: needed only to receive replies and bounces on the domain itself.

  • has_spf

    Your SPF includes include:smtp.emailsbit.com.

  • has_dkim

    The DKIM TXT record with your public key is published.

  • has_dmarc

    A DMARC record exists on _dmarc.<domain>.

  • has_return_path

    The Return-Path CNAME (bounces.<domain> → bounce.emailsbit.com) is published. Bounces and SPF alignment depend on it.

  • description

    Your own note about the domain, or null.

  • dkim_key_size

    2048 or 1024. null if the domain has no key yet.

  • dkim_deprecated

    true for 1024-bit keys. Some providers already treat them as weak: upgrade with Start DKIM Upgrade.

  • dkim_upgrade_pending

    true while a new 2048-bit key waits for its DNS record.

  • created_at / updated_at

    ISO 8601, UTC.

  • registrar

    Where the DNS is hosted, from its nameservers: cloudflare, namecheap, godaddy, route53, google, vercel, hostinger, ionos, hetzner, dreamhost, squarespace, registrobr or other.

  • dns_records.spf / dkim / mx / return_path / dmarc

    The records to publish. Each has type, host and value. See DNS records below.

  • dns_records.dkim_pending

    Only during a DKIM upgrade: the new 2048-bit record. Publish it next to the current one.

  • dns_records.*.split_value

    Only for TXT values over 255 characters: the same value already split into quoted strings, for DNS panels that need it.

  • dns_records.mx.priority

    Always 0.

  • spf_duplicate

    true when the domain has more than one SPF record. That is invalid: SPF fails for every receiver until you merge them into one.

  • spf_duplicate_records

    The SPF records found, to help you merge them.

  • dkim

    The DKIM key in use and any upgrade in progress. See DKIM below.

  • dkim.version

    2 for 2048-bit keys, 1 for 1024.

  • dkim.key_size

    The size of the key that signs your emails now.

  • dkim.selector

    The selector of the key in use: the s= in the DKIM-Signature header.

  • dkim.deprecated

    true for 1024-bit keys.

  • dkim.upgrade_pending

    true while a new key waits for its DNS record.

  • dkim.pending

    The new key: selector, key_size, host, full_host, value, split_value, created_at. null when there is no upgrade.

  • dkim.previous_selector

    For 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_until

    When the old record can be removed. null when there is nothing to remove.

  • dkim.just_upgraded

    true only on the call that switched to the new key.

DNS records

Publish them in your DNS panel exactly as returned, then call this command again.

  • Return-Path (CNAME)

    Required. bounces.<domain> → bounce.emailsbit.com. Aligns SPF with your domain and brings bounces back to us.

  • DKIM (TXT)

    Required. sendcorex._domainkey.<domain> with your public key. Every email is signed with the private key, which never leaves Sendcorex.

  • SPF (TXT)

    Recommended. Your current SPF plus include:smtp.emailsbit.com, keeping your all qualifier. Never create a second SPF record: edit the one you have.

  • DMARC (TXT)

    Recommended. Starts with p=none. Once your mail is authenticated, the suggestion moves to p=quarantine.

  • MX

    Optional. Only if the domain itself should receive mail through Sendcorex.

  • host

    Already written the way your DNS panel expects: relative (sendcorex._domainkey) for Cloudflare, Namecheap, Route 53 and others that add the domain for you, or the full name for GoDaddy, IONOS and the rest.

Waiting for the DNS

  • How often

    Every 1 to 5 minutes is plenty. Most panels publish in a few minutes; some take up to a few hours.

  • When to stop

    When validated is true (and, during an upgrade, when dkim.upgrade_pending is false).

  • Flags only move forward

    Once a record was found, its flag stays true, even if a later lookup fails for a moment.

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.

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