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

# Create Zone

> Add DNS zone.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/dns_api.yaml post /dns/v2/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: 1282e760bff2
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: Zones
paths:
  /dns/v2/zones:
    post:
      tags:
        - Zones
      summary: Create Zone
      description: Add DNS zone.
      operationId: CreateZone
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InputZone'
        required: false
      responses:
        '200':
          description: CreateZoneResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateZoneResponse'
        '400':
          description: Error message response
          headers:
            error:
              schema:
                type: string
          content: {}
components:
  schemas:
    InputZone:
      required:
        - name
      type: object
      properties:
        contact:
          type: string
          description: email address of the administrator responsible for this zone
        enabled:
          type: boolean
          description: >-
            If a zone is disabled, then its records will not be resolved on dns
            servers
          default: true
        expiry:
          type: integer
          description: >-
            number of seconds after which secondary name servers should stop
            answering request for this zone
          format: uint64
        meta:
          type: object
          additionalProperties:
            type: object
          description: >-
            arbitrarily data of zone in json format

            you can specify `webhook` url and `webhook_method` here

            webhook will get a map with three arrays: for created, updated and
            deleted rrsets

            `webhook_method` can be omitted, POST will be used by default
          example:
            webhook: http://example.com/hook
            webhook_method: PUT
        name:
          type: string
          description: name of DNS zone
          example: example.com
        nx_ttl:
          type: integer
          description: Time To Live of cache
          format: uint64
        primary_server:
          type: string
          description: primary master name server for zone
        refresh:
          type: integer
          description: >-
            number of seconds after which secondary name servers should query
            the master for the SOA record, to detect zone changes.
          format: uint64
        retry:
          type: integer
          description: >-
            number of seconds after which secondary name servers should retry to
            request the serial number
          format: uint64
        serial:
          type: integer
          description: >-
            Serial number for this zone or Timestamp of zone modification
            moment.

            If a secondary name server slaved to this one observes an increase
            in this number,

            the slave will assume that the zone has been updated and initiate a
            zone transfer.
          format: uint64
    CreateZoneResponse:
      type: object
      properties:
        id:
          type: integer
          format: uint64
        warnings:
          $ref: '#/components/schemas/SimpleWarnings'
    SimpleWarnings:
      type: array
      items:
        type: string
  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

````