# DomainZone

> API reference for Domain Zones (core.apoxy.dev/v1alpha3)

**API Group:** `core.apoxy.dev/v1alpha3`

## Operations

### List Domain Zones

<APIEndpoint method="GET" path="/apis/core.apoxy.dev/v1alpha3/domainzones" />

List DomainZone

**Response**

- `200`: OK

---

### Create Domain Zone

<APIEndpoint method="POST" path="/apis/core.apoxy.dev/v1alpha3/domainzones" />

Create a DomainZone

**Request Body**

Spec fields (`DomainZoneSpec`):

| Field | Type | Description |
| --- | --- | --- |
| `nameservers` | string[] | Nameservers to use for this domain zone. If not specified, defaults to Apoxy's nameservers. |
| `registrationConfig` | [RegistrationConfig](#registrationconfig) | RegistrationConfig contains configuration for domain registration. |

**Response**

- `200`: OK
- `201`: Created
- `202`: Accepted

---

### Delete All Domain Zones

<APIEndpoint method="DELETE" path="/apis/core.apoxy.dev/v1alpha3/domainzones" />

Delete collection of DomainZone

**Response**

- `200`: OK

---

### Get Domain Zone

<APIEndpoint method="GET" path="/apis/core.apoxy.dev/v1alpha3/domainzones/{name}" />

Get the specified DomainZone

**Response**

- `200`: OK

---

### Replace Domain Zone

<APIEndpoint method="PUT" path="/apis/core.apoxy.dev/v1alpha3/domainzones/{name}" />

Replace the specified DomainZone

**Request Body**

Spec fields (`DomainZoneSpec`):

| Field | Type | Description |
| --- | --- | --- |
| `nameservers` | string[] | Nameservers to use for this domain zone. If not specified, defaults to Apoxy's nameservers. |
| `registrationConfig` | [RegistrationConfig](#registrationconfig) | RegistrationConfig contains configuration for domain registration. |

**Response**

- `200`: OK
- `201`: Created

---

### Update Domain Zone

<APIEndpoint method="PATCH" path="/apis/core.apoxy.dev/v1alpha3/domainzones/{name}" />

Partially update the specified DomainZone

**Response**

- `200`: OK
- `201`: Created

---

### Delete Domain Zone

<APIEndpoint method="DELETE" path="/apis/core.apoxy.dev/v1alpha3/domainzones/{name}" />

Delete a DomainZone

**Response**

- `200`: OK
- `202`: Accepted

---

## Schema Reference

### RegistrationConfig

| Field | Type | Description |
| --- | --- | --- |
| `autoRenew` | boolean | AutoRenew indicates whether the domain should be automatically renewed. |
| `registrant` | [Registrant](#registrant) | Registrant contains the registrant contact information. |
| `registrationPeriodYears` | integer (int32) | RegistrationPeriodYears is the number of years to register the domain for. |

### Registrant

| Field | Type | Description |
| --- | --- | --- |
| `address` | [Address](#address) | Address of the registrant. |
| `email` | string | Email of the registrant. |
| `firstName` | string | FirstName of the registrant. |
| `lastName` | string | LastName of the registrant. |
| `organization` | string | Organization of the registrant. |
| `phone` | string | Phone number of the registrant. |

### Address

| Field | Type | Description |
| --- | --- | --- |
| `addressLine1` | string | Address line 1. |
| `addressLine2` | string | Address line 2. |
| `city` | string | City. |
| `country` | string | Country code (ISO 3166-1 alpha-2). |
| `postalCode` | string | PostalCode or ZIP code. |
| `stateProvince` | string | State or province. |
