---
title: "Trigger a background scan for pre-existing DNS records. Can use ZoneId for existing zones or Domain for pre-zone creation scenarios."
method: POST
path: "/dnszone/records/scan"
tags: ["DNS Zone"]
---

# Trigger a background scan for pre-existing DNS records. Can use ZoneId for existing zones or Domain for pre-zone creation scenarios.

`POST /dnszone/records/scan`

## Request body

- TriggerDnsZoneRecordScanRequest
  - `ZoneId` integer, nullable — The ID of the DNS Zone to scan. Either ZoneId or Domain must be provided, but not both.
  - `Domain` string, nullable — The domain name to scan. Either ZoneId or Domain must be provided, but not both. Can be used even before creating the DNS zone.

## Response `200`

DNS record scan job triggered successfully

- DnsZoneRecordScanTriggerResponse
  - `JobId` string, guid
  - `Status` 0 | 1 | 2 | 3 — 0 = Pending 1 = InProgress 2 = Completed 3 = Failed

## Other responses

- `400` — Invalid request - either ZoneId or Domain must be provided, but not both
- `401` — The request authorization failed
- `404` — The DNS Zone with the requested ID does not exist

---

[API](https://skmtc.net/bunny/apis/bunny-net-cdn-logging.md) · [All operations](https://skmtc.net/bunny/apis/bunny-net-cdn-logging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bunny/bunny-net-cdn-logging/revisions/9e622620664b/schema)
