Skip to content

Delete a DNS record

DELETE /api/v2/dns-zones/{id}/records/{recordId}

Deletes one DNS record. A 204 does not prove the IDs were right: a record ID that is not in this zone (already deleted, mistyped or from another zone) also returns 204, and so does a zone that is not on your account. Nothing is deleted then. Take the record ID from records[].id of GET /api/v2/dns-zones/{id} for the same zone. Retrying is safe. When the record was proxied through the CDN, its proxy rule is removed too.

Authentication: An API key with the scope write:dns. About keys and scopes

Request

Path parameters

idstringrequired
The DNS zone ID. From GET /api/v2/dns-zones.
recordIdstringrequired
The DNS record ID. From GET /api/v2/dns-zones/{id}.

Example

DELETE /api/v2/dns-zones/{id}/records/{recordId}
curl -X DELETE "https://cloud.hostup.se/api/v2/dns-zones/zone_01hxa3b4c5d6e7f8g9h0j1k2m3/records/drr_01hxa3b4c5d6e7f8g9h0j1k2m3" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

204 No response body. The record is gone or was not in this zone.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404The zone ID is not a known DNS zone (dns_zone_not_found).
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.