---
title: "Create a DNS zone"
method: POST
path: "/gateway/dns-zone"
tags: ["DNS Zones"]
---

# Create a DNS zone

`POST /gateway/dns-zone`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/gateway/dns-zone`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/docs/gateway/dns-zone/post.ts> (a function with typed inputs; its response is checked against the schema)

Registers a custom domain as a DNS zone owned by the caller's account. The domain must be valid and not already registered.

## Request body

- object
  - `domain` string, required: Domain name
  - `soa` object
    - `domain` string: Zone domain
    - `primary` string: Primary name server
    - `email` string: Admin email
    - `serial` integer
    - `refresh` integer
    - `retry` integer
    - `expire` integer

## Response `200`

Success

- object
  - `body` object
    - `subject` string: Zone subject
    - `account_id` string: Owning account
    - `domain` string: Zone domain
    - `soa` object
      - `domain` string: Zone domain
      - `primary` string: Primary name server
      - `email` string: Admin email
      - `serial` integer
      - `refresh` integer
      - `retry` integer
      - `expire` integer
    - `version` integer

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `409`: Zone domain exists

## Changes

- **2026-11-12** `4915bc3902b1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/changes/gateway/dns-zone/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-4/revisions/4915bc3902b1?raw)
