# Remove one record from the managed zone

> Remove one record from the managed zone: CustomDomain™ API reference in the managed dns group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/managed-dns/deleteManagedDNSRecord

## `DELETE https://api.customdomain.ai/v1/connections/{id}/managed-dns/records/{record_id}`

Removes a `discovered`, `imported` or `manual` record. A `customdomain` record is how CustomDomain™ serves the domain and is refused with 409; disconnecting the domain removes it. Once the zone is `active`, only an API key or an app-scoped widget token may remove records. A widget token removes records only from a zone that is its own, as for adding them.

### Authentication

`apiKey`, `widgetJWT`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
| `record_id` | path | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | The zone after the change. |
| `401` | Error envelope: {code, title, details}. |
| `403` | `token_wrong_end_user` (a widget token whose end user is not the connection's), or `forbidden` (the zone is live and the token is an end user's). |
| `404` | Error envelope: {code, title, details}. |
| `409` | The record is one CustomDomain™ needs for the connection, or (a widget token) the zone is hosted for someone else because not every connection linked to it is the token's. |
| `503` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `zone` | string | yes | The hosted zone: the registrable domain. |
| `status` | `awaiting_delegation`, `active`, `failed` | yes | `awaiting_delegation`: the zone holds the records; set the nameservers below at the registrar. `active`: every nameserver the registry lists is ours. `failed`: the switch never happened within 14 days, or the nameservers moved away again (the first warning says which); a failed zone keeps being checked and turns active once the delegation appears. |
| `nameservers` | array of string | yes | The nameservers to set at the registrar. |
| `observed_nameservers` | array of string | yes | The nameservers the registry listed at the last check. |
| `registrar` | object | yes | The domain's registrar, or null when unknown. |
| `records` | array of object | yes |  |
| `warnings` | array of string | yes | Plain-language notes for the user (a partial delegation, records a zone file import skipped, records replaced). |
| `checked_at` | string | yes | When the delegation was last checked. |
| `activated_at` | string or null | yes |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
