---
title: "Create primary server"
method: POST
path: "/dns/v2/secondary-zones/{zoneName}/primaries"
tags: ["SecondaryZones"]
---

# Create primary server

`POST /dns/v2/secondary-zones/{zoneName}/primaries`

## Request

- Base URL: `https://api.gcore.com`
- URL: `https://api.gcore.com/dns/v2/secondary-zones/{zoneName}/primaries`
- Auth: HTTP apikey

Create a primary server for a secondary zone.

## Path parameters

- `zoneName` string, required

## Request body

- CreatePrimaryServerPayload
  - `address` string: Hostname or IP literal, optionally with a `:port` suffix. Public/routable IP literals are accepted; private, link-local, unspecified, and multicast IP literals are rejected with a 400 error. Hostnames and loopback addresses are accepted as-is and resolved only at transfer time.
  - `meta` object
  - `priority` integer: Priority of this primary relative to the zone's other primaries. Defaults to 10 when omitted; an explicit 0 is retained rather than replaced by the default.

## Response `201`

PrimaryServerResponse

- PrimaryServerResponse
  - `address` string
  - `consecutive_failures` integer
  - `created_at` string, date-time
  - `enabled` boolean
  - `id` integer
  - `last_error_at` string, date-time
  - `last_error_msg` string
  - `last_success_at` string, date-time
  - `meta` object
  - `priority` integer
  - `secondary_zone_id` integer
  - `updated_at` string, date-time

## Other responses

- `400`: SecondaryZoneErrorResponse
- `404`: SecondaryZoneErrorResponse
- `502`: SecondaryZoneErrorResponse

## Changes

- **2026-09-04** `796429501557`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/g-core/apis/gcore-openapi/changes/dns/v2/secondary-zones/:zoneName/primaries/post.md)

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) - [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) - [OpenAPI document](https://skmtc.dev/g-core/apis/gcore-openapi/revisions/a2b772345f3a?raw)
