Table of Contents

Class CreateZoneRequest

Namespace
Cloudflare.NET.Zones.Models
Assembly
Cloudflare.NET.dll

Request to create a new Zone in Cloudflare.

Creates a zone for a domain and associates it with an account. The domain must not already be added to Cloudflare in the same or another account.

public record CreateZoneRequest : IEquatable<CreateZoneRequest>
Inheritance
CreateZoneRequest
Implements
Inherited Members

Examples

var request = new CreateZoneRequest(
  Name: "example.com",
  Type: ZoneType.Full,
  Account: new ZoneAccountReference("account-id-here"),
  JumpStart: true
);
var zone = await zonesApi.CreateZoneAsync(request);

Constructors

CreateZoneRequest(string, ZoneType, ZoneAccountReference, bool?)

Request to create a new Zone in Cloudflare.

Creates a zone for a domain and associates it with an account. The domain must not already be added to Cloudflare in the same or another account.

public CreateZoneRequest(string Name, ZoneType Type, ZoneAccountReference Account, bool? JumpStart = null)

Parameters

Name string

The domain name to add (e.g., "example.com").

Type ZoneType

The type of zone setup: Full for Cloudflare-hosted DNS, Partial for CNAME setup, Secondary for secondary DNS.

Account ZoneAccountReference

The account to associate the zone with.

JumpStart bool?

Whether to automatically fetch existing DNS records from the domain. Defaults to false. This is a best-effort operation; failure does not prevent zone creation.

Examples

var request = new CreateZoneRequest(
  Name: "example.com",
  Type: ZoneType.Full,
  Account: new ZoneAccountReference("account-id-here"),
  JumpStart: true
);
var zone = await zonesApi.CreateZoneAsync(request);
See Also

Properties

Account

The account to associate the zone with.

[JsonPropertyName("account")]
public ZoneAccountReference Account { get; init; }

Property Value

ZoneAccountReference

JumpStart

Whether to automatically fetch existing DNS records from the domain. Defaults to false. This is a best-effort operation; failure does not prevent zone creation.

[JsonPropertyName("jump_start")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? JumpStart { get; init; }

Property Value

bool?

Name

The domain name to add (e.g., "example.com").

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string

Type

The type of zone setup: Full for Cloudflare-hosted DNS, Partial for CNAME setup, Secondary for secondary DNS.

[JsonPropertyName("type")]
public ZoneType Type { get; init; }

Property Value

ZoneType

See Also