Skip to content

Commit 6aad33a

Browse files
[DNS] Add APIRequest example for creating an internal zone (#23228)
1 parent 6ec7953 commit 6aad33a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/content/partials/dns/internal-zone-create-api.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ params:
33
- conditional?
44
---
55

6-
import { Details, Render } from "~/components";
6+
import { Details, Render, APIRequest } from "~/components";
77

8-
1. Use the [Create Zone](/api/resources/zones/) endpoint to create an [internal zone](/dns/internal-dns/internal-zones/). Specify your account ID and set the `type` to `internal`.
8+
1. Use the [Create Zone](/api/resources/zones/methods/create/) endpoint to create an [internal zone](/dns/internal-dns/internal-zones/). Specify your account ID and set the `type` to `internal`.
99

1010
{ props.conditional === "get-started-detail" && (
1111
<Details header="Internal zone configuration conditions">
@@ -14,6 +14,20 @@ import { Details, Render } from "~/components";
1414
)
1515
}
1616

17+
<Details header="Example">
18+
<APIRequest
19+
path="/zones"
20+
method="POST"
21+
json={{
22+
"account": {
23+
"id": "<ACCOUNT_ID>",
24+
},
25+
"name": "<ZONE_NAME>",
26+
"type": "internal"
27+
}}
28+
/>
29+
</Details>
30+
1731
2. Add DNS records to your internal zone using your preferred option:
1832
- [Import](/api/resources/dns/subresources/records/methods/import/) a formatted BIND file. Refer to the [DNS records how-to](/dns/manage-dns-records/how-to/import-and-export/) for guidance.
1933
- Use other API endpoints, such as [`/batch`](/api/resources/dns/subresources/records/methods/batch/), to manage DNS records. Refer to [Batch record changes](/dns/manage-dns-records/how-to/batch-record-changes/#use-the-api) for details.

0 commit comments

Comments
 (0)