Add a domain

Add a sending domain.

POSThttps://app.usenotix.dev/api/v1/domains

Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.

Add a sending domain. The response carries the SPF, DKIM and DMARC records to publish at your DNS provider.

Body parameters

namestringrequired

The domain to send from, such as mail.example.com. Stored in lower case without a trailing dot.

At most 254 characters.

regionstring

Usually left out: new domains go to Notix's current default region, and the response's region says which one was used. Choosing another region is open only to some accounts for now; for the rest, any region other than the default answers 400 naming the region that is open. An unknown region answers 400.

At most 32 characters.

Headers

Authorizationstringrequired

Bearer followed by your API key.

Errors

400

The name is not a valid domain name, the region is unknown, the region is not open to this account (the message names the region that is), or the domain does not exist in public DNS (its registered domain answers NXDOMAIN: check the spelling and that it is registered). A DNS lookup that times out or fails on our side does not refuse the domain.

409

The domain can't be added: it is already on Notix. The answer is the same whichever team holds it.

503

No sending region is available right now, so the domain was not added. Try again in a few minutes.

Every error has the same shape. See all error codes.

curl -X POST "https://app.usenotix.dev/api/v1/domains" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "mail.example.com"
}'
Response200
{
  "id": 1,
  "name": "example.com",
  "teamId": 1,
  "status": "NOT_STARTED",
  "publicKey": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "dnsRecords": [
    {
      "type": "TXT",
      "name": "mail",
      "value": "v=spf1 include:_spf.usenotix.dev ~all",
      "ttl": "Auto",
      "status": "NOT_STARTED"
    }
  ]
}
Open in ClaudeOpen in ChatGPT