---
title: "Create secondary zone"
method: POST
path: "/dns/v2/secondary-zones"
tags: ["SecondaryZones"]
---

# Create secondary zone

`POST /dns/v2/secondary-zones`

## Request

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

Create a secondary zone. Optionally include `primary_server` (one) or
`primary_servers` (a list) to create its primaries atomically in the same request.

## Request body

- CreateSecondaryZonePayload
  - `meta` object
  - `poll_interval` integer
  - `primary_server` 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.
  - `primary_servers` CreatePrimaryServerPayload[]: Seed the zone with one or more primary servers in this same request, atomically. Mutually exclusive with `primary_server`.
    - `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.
  - `transfer_mode` 'push' | 'pull' | 'both': Transfer mode. Defaults to push when omitted.
  - `tsig_algorithm` string: One of hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512, with or without a trailing dot. Normalized and returned in canonical dotted form. Required together with `tsig_key_name` and `tsig_secret`; must not be set alone.
  - `tsig_key_name` string
  - `tsig_secret` string
  - `use_tls` boolean
  - `zone_name` string

## Response `201`

SecondaryZoneResponse

- SecondaryZoneResponse
  - `client_id` integer
  - `created_at` string, date-time
  - `enabled` boolean
  - `id` integer
  - `last_serial` integer
  - `last_transfer_at` string, date-time
  - `meta` object
  - `poll_interval` integer
  - `transfer_mode` string
  - `tsig_algorithm` string
  - `tsig_key_name` string
  - `updated_at` string, date-time
  - `use_tls` boolean
  - `zone_name` string

## Other responses

- `400`: SecondaryZoneErrorResponse
- `409`: SecondaryZoneErrorResponse
- `502`: SecondaryZoneErrorResponse

## Changes

- **2026-10-07** `e6901e45aa3f`: 1 info
  - added the new optional request property `primary_servers`
- **2026-09-04** `796429501557`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/g-core/apis/gcore-openapi/changes/dns/v2/secondary-zones/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)
