Skip to main content
POST
/
domains
JavaScript
import Nuntly from '@nuntly/sdk';

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

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

console.log(domain.id);
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "createdAt": "<string>",
    "status": "bootstrapping",
    "region": "eu-west-1",
    "statusAt": "<string>",
    "sendingStatus": "enabled",
    "openTracking": true,
    "clickTracking": true,
    "sendingRecords": [
      {
        "name": "<string>",
        "fullname": "<string>",
        "recordType": "TXT",
        "ttl": "<string>",
        "group": "DKIM",
        "value": "<string>",
        "status": "bootstrapping",
        "statusAt": "<string>",
        "selector": "<string>",
        "priority": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>

Body

application/json
name
string
required

The name of the domain to send e-mails'

Response

200 response

data
object
required