---
title: "Creates a new primary domain."
method: POST
path: "/domains/primary"
tags: ["domains - primary"]
---

# Creates a new primary domain.

`POST /domains/primary`

## Request

- Base URL: `https://manager.digicertdns.com/v1`
- URL: `https://manager.digicertdns.com/v1/domains/primary`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/digicert/apis/digicert-dns/docs/domains/primary/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint creates a new primary domain, allowing users to define and configure it within the system.</br></br>Key features include:</br></br>- **Clear success messaging:** Returns a `201` success code with a confirmation message indicating the successful completion of the requested action.</br>- **Comprehensive error handling:** Returns a `400` error code with a clear description when requests fail.</br>- **Seamless domain creation:** Facilitates the creation of a primary domain in-line with the appropriate schema, ensuring smooth and efficient organization.

## Request body

- PrimaryDomainCreate
  - `name` string
  - `soaId` integer
  - `gtd` boolean
  - `tsigKeyConfig` TsigKeyConfigRequest[]
    - `ipSetId` integer
    - `tsigKeyId` integer
  - `resourceGroups` integer[]
  - `nameserverSetId` integer
  - `valiMail` Valimail
    - `enabled` boolean
    - `policy` string
    - `additionalRua` string

## Response `201`

Primary domain created successfully.

- PrimaryDomainCreateResponse
  - `id` integer
  - `name` string
  - `type` string
  - `soaId` integer
  - `nameserverSetId` integer
  - `gtd` boolean
  - `createdTs` string
  - `modifiedTs` string
  - `tsigKeyConfig` TsigKeyConfigRequest[]
    - `ipSetId` integer
    - `tsigKeyId` integer
  - `resourceGroups` integer[]
  - `valimail` boolean

## Other responses

- `400`: Request is malformed or invalid.

---

[API](https://skmtc.dev/digicert/apis/digicert-dns.md) - [All operations](https://skmtc.dev/digicert/apis/digicert-dns/llms.txt) - [OpenAPI document](https://skmtc.dev/digicert/apis/digicert-dns/revisions/c74fc728cff8?raw)
