---
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

- Base URL: `https://api.bunny.net`
- URL: `https://api.bunny.net/dnszone/records/scan`
- Auth: one of:
  - API key in header `AccessKey`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-net-api/docs/dnszone/records/scan/post.ts> (a function with typed inputs; its response is checked against the schema)

## 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 = In Progress 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

## Changes

- **2026-11-12** `2b06f94dbfbf`: 2 breaking, 4 info
  - added `#/components/schemas/DnsZoneScanJobStatus` to the `Status` response property `oneOf` list for the response status `200`
  - the `Status` response's property type changed from `integer` to no type for status `200`
  - removed the `0.00` enum value from the `Status` response property for the response status `200`
  - removed the `1.00` enum value from the `Status` response property for the response status `200`
  - …2 more
- **2026-10-27** `2096a6606d8d`: 2 info
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `AccessKey`
  - the security scope `ScopedApiKey` was added to the endpoint's security scheme `bearer`

[Operation history](https://skmtc.dev/bunny/apis/bunny-net-api/changes/dnszone/records/scan/post.md)

---

[API](https://skmtc.dev/bunny/apis/bunny-net-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-net-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-net-api/revisions/2b06f94dbfbf?raw)
