---
title: "Create a primary server"
method: POST
path: "/{account}/secondary_dns/primaries"
tags: ["secondary dns"]
---

# Create a primary server

`POST /{account}/secondary_dns/primaries`

Creates a primary server into the account.

## Path parameters

- `account` integer, required

## Request body

- object
  - `name` string, required
  - `ip` string, required
  - `port` string

## Response `201`

Primary Server created.

- object
  - `data` PrimaryServer
    - `id` integer, required
    - `account_id` integer, required
    - `name` string, required
    - `ip` string, required
    - `port` integer, required
    - `linked_secondary_zones` string[], required
    - `created_at` string, date-time, required — A date-time value, representing when the entry was created, formatted as ISO 8601.
    - `updated_at` string, date-time, required — A date-time value, representing when the entry was last updated, formatted as ISO 8601.

## Other responses

- `400` — A required parameter is missing or the request is invalid.

## Changes

- **2025-07-11** (v2) `06780be0ef17` — 10 info
  - the response property `data/account_id` became required for the status `201`
  - the response property `data/created_at` became required for the status `201`
  - the response property `data/id` became required for the status `201`
  - the response property `data/ip` became required for the status `201`
  - …6 more
- **2023-07-18** (v2) `c8591dcf8c29` — 10 breaking
  - the response property `data/account_id` became optional for the status `201`
  - the response property `data/created_at` became optional for the status `201`
  - the response property `data/id` became optional for the status `201`
  - the response property `data/ip` became optional for the status `201`
  - …6 more

[Change history](https://skmtc.dev/dnsimple/apis/dnsimple-api/changes/:account/secondary_dns/primaries/post.md)

---

[API](https://skmtc.dev/dnsimple/apis/dnsimple-api.md) · [All operations](https://skmtc.dev/dnsimple/apis/dnsimple-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dnsimple/apis/dnsimple-api/revisions/faec8b49cc03?raw)
