Skip to content
AI Inbx
Esc
navigateopen⌘Jpreview

Create a domain

Registers a sending domain and returns the DNS records to publish: SPF, DKIM, DMARC, a return path, and an MX record for receiving. region selects the regional mail infrastructure for this domain and cannot be changed afterwards.

A wildcard — *.acme.dev — is verified once and covers every subdomain: the MX record goes at *.acme.dev, the rest at acme.dev, and the apex keeps whatever mail setup it has. A name one label under a wildcard of yours — hi.acme.dev under *.acme.dev — is created as a subdomain of it: no records, verified as soon as the wildcard is, in whatever space_id you give it. That is how a platform hands each customer an address of their own without touching DNS again.

A domain name can be connected in multiple workspaces, but sending is enabled for the workspace whose DKIM key is published. To move sending, add the domain in the destination workspace and publish its DNS records. The next verification check updates sending readiness; existing mail remains in its original workspace. Duplicate apex or wildcard identities within one workspace fail with domain_taken.

Every workspace already has one domain it did not add: <slug>.aiinbx.app, listed with provided: true. It is verified through our zone, has no records and cannot be deleted; a name under aiinbx.app cannot be added by hand and fails with reserved_domain.

POST/domains
Authorization
AuthorizationBearer token (API key) · headerrequired
Pass an AI Inbx API key as a Bearer token.
Request body
requiredapplication/json
namestringrequired
A domain, a wildcard (`*.acme.dev`), or one label under a wildcard you own (`hi.acme.dev`) — the last is created as a subdomain with no records.
min length 3 · max length 253
regionstring
Allowed:eu-central-1us-east-1
space_idstring
Which space a created resource goes in. Omitted, the workspace itself.
matches ^[a-z]+_[0-9a-f]{32}$
Responses
201The domain was created.
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
namestringrequired
regionstringrequired
Allowed:eu-central-1us-east-1
space_idstring | anyrequired
Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.
Show properties
Any of:
string
string
any
any
parent_idstring | anyrequired
The wildcard this subdomain is filed under, when it is one.
Show properties
Any of:
string
string
any
any
providedbooleanrequired
Whether this is the domain the workspace was given — `<slug>.aiinbx.app`. Verified through our own zone, so it has no records and cannot be deleted.
verified_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
created_atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
trackingobjectrequired
Show properties
opensbooleanrequired
clicksbooleanrequired
recordsobject[]
Show properties
Array of object
purposestringrequired
Allowed:SPFDKIMDMARCRETURN_PATHINBOUND
typestringrequired
Allowed:MXTXTCNAME
namestringrequired
valuestringrequired
ttlintegerrequired
min 0 · max 9007199254740991
statestringrequired
Allowed:pendingverifiedmissing
last_checked_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
400The request is invalid.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
401The API key is missing or invalid.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
403The API key does not have the required scope.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
404The requested resource does not exist.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
409The request conflicts with the resource's current state.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
413The request body or attachments are too large.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
415The request body is not JSON.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
422The request body failed validation.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
429The organisation's request budget is spent (`too_many_requests`), or an upstream mail provider is throttling (`rate_limited`).
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
500An internal error occurred.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
502An upstream mail provider failed.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
503The service is temporarily unavailable.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
Request
curl -X POST "https://api.aiinbx.com/api/v2/domains" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "region": "eu-central-1",
  "space_id": "string"
}'
Response
{
  "id": "string",
  "name": "string",
  "region": "eu-central-1",
  "space_id": "string",
  "parent_id": "string",
  "provided": true,
  "verified_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "tracking": {
    "opens": true,
    "clicks": true
  },
  "records": [
    {
      "purpose": "SPF",
      "type": "MX",
      "name": "string",
      "value": "string",
      "ttl": 9007199254740991,
      "state": "pending",
      "last_checked_at": "2019-08-24T14:15:22Z"
    }
  ]
}