Skip to main content
POST
/
api
/
e2
/
domains
JavaScript
import Inbound from 'inboundemail';

const client = new Inbound({
  apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});

const domain = await client.domains.create({ domain: 'x' });

console.log(domain.id);
{
  "id": "<string>",
  "domain": "<string>",
  "status": "pending",
  "canReceiveEmails": true,
  "hasMxRecords": true,
  "domainProvider": "<string>",
  "providerConfidence": "<string>",
  "dnsRecords": [
    {
      "type": "<string>",
      "name": "<string>",
      "value": "<string>",
      "isRequired": true,
      "description": "<string>"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "mailFromDomain": "<string>",
  "mailFromDomainStatus": "<string>",
  "dnsConflict": {
    "hasConflict": true,
    "message": "<string>",
    "conflictType": "mx",
    "existingRecords": [
      {
        "type": "<string>",
        "value": "<string>"
      }
    ]
  },
  "parentDomain": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Your Inbound API key. Include it in the Authorization header as: Bearer

Body

domain
string
required
Required string length: 1 - 253

Response

Response for status 201

id
string
required
domain
string
required
status
enum<string>
required
Available options:
pending,
verified,
failed
canReceiveEmails
boolean
required
hasMxRecords
boolean
required
domainProvider
string · null · null
required
providerConfidence
string · null · null
required
dnsRecords
object[]
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
mailFromDomain
string
mailFromDomainStatus
string
dnsConflict
object
parentDomain
string
message
string