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

# [DNS Zones] Create a new DNS zone

> Create a new DNS zone for hosting domain DNS records. The zone will be provisioned in Cloudflare and configured with default SOA and NS records. Once created, you can add additional DNS records and optionally attach the zone to a domain for integrated management. Zone names must be valid domain names and unique within the project.



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/dns-zones
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/projects/{project_id}/dns-zones:
    post:
      tags:
        - Domains
      summary: '[DNS Zones] Create a new DNS zone'
      description: >-
        Create a new DNS zone for hosting domain DNS records. The zone will be
        provisioned in Cloudflare and configured with default SOA and NS
        records. Once created, you can add additional DNS records and optionally
        attach the zone to a domain for integrated management. Zone names must
        be valid domain names and unique within the project.
      operationId: create_dns_zone
      parameters:
        - in: path
          name: organization_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: project_id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DNSZoneCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DNSZone'
          description: DNS zone created successfully
        '400':
          description: >-
            Invalid zone name or configuration. The zone name may be malformed
            or already exists
        '401':
          description: Authentication credentials were not provided or are invalid
        '403':
          description: You do not have permission to create DNS zones in this project
        '409':
          description: A DNS zone with this name already exists in the project
        '500':
          description: Failed to provision DNS zone in Cloudflare
      security:
        - BearerAuth: []
components:
  schemas:
    DNSZoneCreate:
      type: object
      properties:
        zone_name:
          type: string
          maxLength: 253
        mode:
          enum:
            - onetsolutions
            - client
          type: string
          description: |-
            * `onetsolutions` - onetsolutions
            * `client` - client
          x-spec-enum-id: 34fe6d7cecda02f7
          default: onetsolutions
      required:
        - zone_name
    DNSZone:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        zone_name:
          type: string
          maxLength: 253
        mode:
          enum:
            - onetsolutions
            - client
          type: string
          description: |-
            * `onetsolutions` - onetsolutions
            * `client` - client
          x-spec-enum-id: 34fe6d7cecda02f7
        cloudflare_nameservers:
          readOnly: true
        is_active:
          type: boolean
        is_verified:
          type: boolean
          readOnly: true
        record_count:
          type: integer
          readOnly: true
        records:
          type: array
          items:
            $ref: '#/components/schemas/DNSRecord'
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - cloudflare_nameservers
        - created
        - id
        - is_verified
        - modified
        - record_count
        - records
        - zone_name
    DNSRecord:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        record_type:
          enum:
            - A
            - AAAA
            - CNAME
            - MX
            - TXT
            - NS
            - SRV
            - CAA
            - PTR
            - SOA
          type: string
          description: |-
            * `A` - A
            * `AAAA` - AAAA
            * `CNAME` - CNAME
            * `MX` - MX
            * `TXT` - TXT
            * `NS` - NS
            * `SRV` - SRV
            * `CAA` - CAA
            * `PTR` - PTR
            * `SOA` - SOA
          x-spec-enum-id: 82ebb21f608c0fd6
        name:
          type: string
          maxLength: 253
        content:
          type: string
        ttl:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
        priority:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          nullable: true
        proxied:
          type: boolean
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - content
        - created
        - id
        - modified
        - name
        - record_type
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````