---
title: "Register new domain"
method: POST
path: "/domains"
tags: ["Domains"]
---

# Register new domain

`POST /domains`

Registers and configures a new domain for mail services, including DNS setup

## Request body

- RestmailstackRegisterNewDomainRequest — Request payload for registering a new domain for mail services
  - `domain` string — Domain name to register required: true pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$ example: example.com
  - `website` string — Website URL for domain configuration required: true format: uri example: https://www.example.com

## Response `201`

Domain registered and configured successfully

- RestmailstackDomainResponse — Response containing domain details and status
  - `domain` RestmailstackDomainRecord — Comprehensive domain record information
    - `createdDate` string — Domain registration date required: true format: date example: 2024-09-14
    - `domain` string — Registered domain name required: true example: example.com
    - `expiredDate` string — Domain expiration date required: true format: date example: 2025-09-14
    - `nameservers` string[] — List of assigned nameservers required: true minItems: 2 example: ["ns1.example.com","ns2.example.com"]
  - `requestId` string
  - `status` string — Status indicates the result of the operation ("success" or "error")

## Other responses

- `400` — Invalid request - Missing required fields or invalid format
- `401` — Unauthorized - Missing or invalid API key
- `406` — Not Acceptable - Domain TLD not supported or premium domain
- `409` — Conflict - Domain already registered
- `500` — Internal server error - Configuration failed or service unavailable

---

[API](https://skmtc.net/customeros/apis/customeros-api.md) · [All operations](https://skmtc.net/customeros/apis/customeros-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/customeros/customeros-api/revisions/73526747b270/schema)
