Canonical: https://weaveos.com/reference/cloudflare/create-dns-record

1. [Software capabilities](https://weaveos.com/reference)
2. /[Cloudflare](https://weaveos.com/reference/cloudflare)
3. /Create a DNS record

[![](https://weaveos.com/reference/logos/cloudflare.svg)Cloudflare](https://weaveos.com/reference/cloudflare)

# Create a DNS record

Create a record in a zone through the DNS Records API or the Cloudflare TypeScript client.

Documentation reviewed November 26, 2026 · 2 methods with sources

## Ways to do it

1. [1API: POST /zones/{zone\_id}/dns\_records](https://weaveos.com/reference/cloudflare/create-dns-record#method-1)
2. [2SDK: client.dns.records.create()](https://weaveos.com/reference/cloudflare/create-dns-record#method-2)

API

### POST /zones/{zone\_id}/dns\_records

Create a record in the specified zone.

[Read source: Cloudflare API: Create DNS Record](https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/create/)

- Requirements

  A zone ID, an API token with DNS Write when using token auth, and a JSON payload for the chosen record type.

- Limitations

  A and AAAA records cannot share a name with a CNAME record. NS records cannot share a name with another record type. Cloudflare represents internationalized names in Punycode. The API documentation requires priority for MX and URI records.

SDK

### client.dns.records.create()

Call client.dns.records.create with the record fields.

[Read source: Generated Cloudflare TypeScript DNS method: POST /zones/{zone\_id}/dns\_records](https://github.com/cloudflare/cloudflare-typescript/blob/0eb9ef0ea40c1fe38e4b19be92f41bd7466bc1d6/src/resources/dns/api.md#L66)

- Requirements

  An authenticated Cloudflare TypeScript client and a RecordCreateParams object with zone\_id, name, ttl, type, and any record-specific fields.

- Limitations

  Version 7.4.0 types priority as optional. The endpoint documentation requires it for MX and URI records.

[Previous Cloudflare taskFind a Cloudflare zone ID](https://weaveos.com/reference/cloudflare/find-zone-id) [Next Cloudflare task Apply DNS record changes in a batch](https://weaveos.com/reference/cloudflare/batch-dns-record-changes)

## More from Cloudflare

[View all 8 Cloudflare tasks](https://weaveos.com/reference/cloudflare)

- ### [List DNS records in a Cloudflare zone](https://weaveos.com/reference/cloudflare/list-zone-dns-records)

  Use the DNS Records API or Cloudflare TypeScript SDK to retrieve a zone’s records. The DNS Records page lets you inspect a record while working in the dashboard.

  API, SDK, Interface

- ### [Tail Cloudflare Worker logs](https://weaveos.com/reference/cloudflare/tail-worker-logs)

  Use wrangler tail to see incoming Worker requests and errors in your terminal. Use the dashboard’s Live view when you want to inspect the same stream in a browser.

  CLI, Interface

- ### [Import DNS records from a BIND zone file](https://weaveos.com/reference/cloudflare/import-dns-zone-file)

  Upload a BIND-format zone file to import DNS records into a Cloudflare zone.

  API, SDK

- ### [Export DNS records as a BIND zone file](https://weaveos.com/reference/cloudflare/export-dns-records)

  Export a zone’s DNS records in BIND format. The REST endpoint supports record filters. The generated TypeScript client currently exposes only the zone identifier for this call.

  API, SDK

## The same task in other apps

- [![](https://weaveos.com/reference/logos/airtable.svg)Airtable](https://weaveos.com/reference/airtable)

  ### [How to create an Airtable record](https://weaveos.com/reference/airtable/create-record)

  Send a records array to Airtable’s Create records endpoint. To collect entries from people, use a published form that writes each submission to the target table.

  API, Interface
