> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-2188.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create secondary zone

> Create a secondary zone. Optionally include `primary_server` to create
the first primary server in the same request.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/dns_api.yaml post /dns/v2/secondary-zones
openapi: 3.1.0
info:
  title: Gcore OpenAPI – DNS API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 88ab66bc0456
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Analyze
  - name: Clients
  - name: DNSSEC
  - name: Locations
  - name: Lookup
  - name: Metrics
  - name: NetworkMappings
  - name: Pickers
  - name: RRsets
  - name: SecondaryZones
  - name: Zones
paths:
  /dns/v2/secondary-zones:
    post:
      tags:
        - SecondaryZones
      summary: Create secondary zone
      description: |-
        Create a secondary zone. Optionally include `primary_server` to create
        the first primary server in the same request.
      operationId: CreateSecondaryZone
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSecondaryZonePayload'
        required: true
      responses:
        '201':
          description: SecondaryZoneResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecondaryZoneResponse'
        '400':
          description: SecondaryZoneErrorResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecondaryZoneErrorResponse'
        '409':
          description: SecondaryZoneErrorResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecondaryZoneErrorResponse'
        '502':
          description: SecondaryZoneErrorResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecondaryZoneErrorResponse'
components:
  schemas:
    CreateSecondaryZonePayload:
      type: object
      properties:
        meta:
          type: object
          additionalProperties:
            type: object
        poll_interval:
          type: integer
          format: int64
        primary_server:
          $ref: '#/components/schemas/CreatePrimaryServerPayload'
        transfer_mode:
          type: string
          description: Transfer mode. Defaults to push when omitted.
          enum:
            - push
            - pull
            - both
        tsig_algorithm:
          type: string
          description: >-
            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:
          type: string
        tsig_secret:
          type: string
        use_tls:
          type: boolean
        zone_name:
          type: string
    SecondaryZoneResponse:
      type: object
      properties:
        client_id:
          type: integer
          format: int64
        created_at:
          type: string
          format: date-time
        enabled:
          type: boolean
        id:
          type: integer
          format: int64
        last_serial:
          type: integer
          format: int64
        last_transfer_at:
          type: string
          format: date-time
        meta:
          type: object
          additionalProperties:
            type: object
        poll_interval:
          type: integer
          format: int64
        transfer_mode:
          type: string
        tsig_algorithm:
          type: string
        tsig_key_name:
          type: string
        updated_at:
          type: string
          format: date-time
        use_tls:
          type: boolean
        zone_name:
          type: string
    SecondaryZoneErrorResponse:
      type: object
      properties:
        code:
          type: string
        error:
          type: string
        message:
          type: string
    CreatePrimaryServerPayload:
      type: object
      properties:
        address:
          type: string
          description: >-
            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:
          type: object
          additionalProperties:
            type: object
        priority:
          type: integer
          description: >-
            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.
          format: int64
          default: 10
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234_abcdef`
      type: apiKey
      in: header
      name: Authorization

````