Skip to content
Start here

Addressing

AddressingRegional Hostnames

List Regional Hostnames
client.Addressing.RegionalHostnames.List(ctx, query) (*SinglePage[RegionalHostnameListResponse], error)
GET/zones/{zone_id}/addressing/regional_hostnames
Fetch Regional Hostname
client.Addressing.RegionalHostnames.Get(ctx, hostname, query) (*RegionalHostnameGetResponse, error)
GET/zones/{zone_id}/addressing/regional_hostnames/{hostname}
Create Regional Hostname
client.Addressing.RegionalHostnames.New(ctx, params) (*RegionalHostnameNewResponse, error)
POST/zones/{zone_id}/addressing/regional_hostnames
Update Regional Hostname
client.Addressing.RegionalHostnames.Edit(ctx, hostname, params) (*RegionalHostnameEditResponse, error)
PATCH/zones/{zone_id}/addressing/regional_hostnames/{hostname}
Delete Regional Hostname
client.Addressing.RegionalHostnames.Delete(ctx, hostname, body) (*RegionalHostnameDeleteResponse, error)
DELETE/zones/{zone_id}/addressing/regional_hostnames/{hostname}

AddressingRegional HostnamesRegions

List Regions
client.Addressing.RegionalHostnames.Regions.List(ctx, query) (*SinglePage[RegionalHostnameRegionListResponse], error)
GET/accounts/{account_id}/addressing/regional_hostnames/regions

AddressingServices

List Services
client.Addressing.Services.List(ctx, query) (*SinglePage[ServiceListResponse], error)
GET/accounts/{account_id}/addressing/services

AddressingAddress Maps

List Address Maps
client.Addressing.AddressMaps.List(ctx, query) (*SinglePage[AddressMap], error)
GET/accounts/{account_id}/addressing/address_maps
Address Map Details
client.Addressing.AddressMaps.Get(ctx, addressMapID, query) (*AddressMapGetResponse, error)
GET/accounts/{account_id}/addressing/address_maps/{address_map_id}
Create Address Map
client.Addressing.AddressMaps.New(ctx, params) (*AddressMapNewResponse, error)
POST/accounts/{account_id}/addressing/address_maps
Update Address Map
client.Addressing.AddressMaps.Edit(ctx, addressMapID, params) (*AddressMap, error)
PATCH/accounts/{account_id}/addressing/address_maps/{address_map_id}
Delete Address Map
client.Addressing.AddressMaps.Delete(ctx, addressMapID, body) (*AddressMapDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/address_maps/{address_map_id}
ModelsExpand Collapse
type AddressMap struct{…}
ID stringoptional

Identifier of an Address Map.

maxLength32
CanDelete booloptional

If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps.

CanModifyIPs booloptional

If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps.

CreatedAt Timeoptional
formatdate-time
DefaultSNI stringoptional

If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.

Description stringoptional

An optional description field which may be used to describe the types of IPs or zones on the map.

Enabled booloptional

Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.

ModifiedAt Timeoptional
formatdate-time
type Kind string

The type of the membership.

One of the following:
const KindZone Kind = "zone"
const KindAccount Kind = "account"

AddressingAddress MapsAccounts

Add an account membership to an Address Map
client.Addressing.AddressMaps.Accounts.Update(ctx, addressMapID, params) (*AddressMapAccountUpdateResponse, error)
PUT/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}
Remove an account membership from an Address Map
client.Addressing.AddressMaps.Accounts.Delete(ctx, addressMapID, body) (*AddressMapAccountDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}

AddressingAddress MapsIPs

Add an IP to an Address Map
client.Addressing.AddressMaps.IPs.Update(ctx, addressMapID, ipAddress, params) (*AddressMapIPUpdateResponse, error)
PUT/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}
Remove an IP from an Address Map
client.Addressing.AddressMaps.IPs.Delete(ctx, addressMapID, ipAddress, body) (*AddressMapIPDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}

AddressingAddress MapsZones

Add a zone membership to an Address Map
client.Addressing.AddressMaps.Zones.Update(ctx, addressMapID, params) (*AddressMapZoneUpdateResponse, error)
PUT/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}
Remove a zone membership from an Address Map
client.Addressing.AddressMaps.Zones.Delete(ctx, addressMapID, body) (*AddressMapZoneDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}

AddressingLOA Documents

Download LOA Document
client.Addressing.LOADocuments.Get(ctx, loaDocumentID, query) (*Response, error)
GET/accounts/{account_id}/addressing/loa_documents/{loa_document_id}/download
Upload LOA Document
client.Addressing.LOADocuments.New(ctx, params) (*LOADocumentNewResponse, error)
POST/accounts/{account_id}/addressing/loa_documents

AddressingPrefixes

List Prefixes
client.Addressing.Prefixes.List(ctx, query) (*SinglePage[Prefix], error)
GET/accounts/{account_id}/addressing/prefixes
Prefix Details
client.Addressing.Prefixes.Get(ctx, prefixID, query) (*Prefix, error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}
Add Prefix
client.Addressing.Prefixes.New(ctx, params) (*Prefix, error)
POST/accounts/{account_id}/addressing/prefixes
Update Prefix Description
client.Addressing.Prefixes.Edit(ctx, prefixID, params) (*Prefix, error)
PATCH/accounts/{account_id}/addressing/prefixes/{prefix_id}
Delete Prefix
client.Addressing.Prefixes.Delete(ctx, prefixID, body) (*PrefixDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/prefixes/{prefix_id}
ModelsExpand Collapse
type Prefix struct{…}
ID stringoptional

Identifier of an IP Prefix.

maxLength32
AccountID stringoptional

Identifier of a Cloudflare account.

maxLength32
DeprecatedAdvertised booloptional
Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.

DeprecatedAdvertisedModifiedAt Timeoptional
Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.

formatdate-time
Approved stringoptional

Approval state of the prefix (P = pending, V = active).

ASN int64optional

Autonomous System Number (ASN) the prefix will be advertised under.

CIDR stringoptional

IP Prefix in Classless Inter-Domain Routing format.

CreatedAt Timeoptional
formatdate-time
DelegateLOACreation booloptional

Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner.

Description stringoptional

Description of the prefix.

maxLength1000
IrrValidationState stringoptional

State of one kind of validation for an IP prefix.

LOADocumentID stringoptional

Identifier for the uploaded LOA document.

maxLength32
ModifiedAt Timeoptional
formatdate-time
DeprecatedOnDemandEnabled booloptional
Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.

DeprecatedOnDemandLocked booloptional
Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BGP routes within a single IP Prefix.

Whether advertisement status of the prefix is locked, meaning it cannot be changed.

OwnershipValidationState stringoptional

State of one kind of validation for an IP prefix.

OwnershipValidationToken stringoptional

Token provided to demonstrate ownership of the prefix.

RPKIValidationState stringoptional

State of one kind of validation for an IP prefix.

AddressingPrefixesService Bindings

List Service Bindings
client.Addressing.Prefixes.ServiceBindings.List(ctx, prefixID, query) (*SinglePage[ServiceBinding], error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings
Get Service Binding
client.Addressing.Prefixes.ServiceBindings.Get(ctx, prefixID, bindingID, query) (*ServiceBinding, error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}
Create Service Binding
client.Addressing.Prefixes.ServiceBindings.New(ctx, prefixID, params) (*ServiceBinding, error)
POST/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings
Delete Service Binding
client.Addressing.Prefixes.ServiceBindings.Delete(ctx, prefixID, bindingID, body) (*PrefixServiceBindingDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}
ModelsExpand Collapse
type ServiceBinding struct{…}
ID stringoptional

Identifier of a Service Binding.

maxLength32
CIDR stringoptional

IP Prefix in Classless Inter-Domain Routing format.

Provisioning ServiceBindingProvisioningoptional

Status of a Service Binding's deployment to the Cloudflare network

State ServiceBindingProvisioningStateoptional

When a binding has been deployed to a majority of Cloudflare datacenters, the binding will become active and can be used with its associated service.

One of the following:
const ServiceBindingProvisioningStateProvisioning ServiceBindingProvisioningState = "provisioning"
const ServiceBindingProvisioningStateActive ServiceBindingProvisioningState = "active"
ServiceID stringoptional

Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the List Services endpoint.

maxLength32
ServiceName stringoptional

Name of a service running on the Cloudflare network

AddressingPrefixesBGP Prefixes

List BGP Prefixes
client.Addressing.Prefixes.BGPPrefixes.List(ctx, prefixID, query) (*SinglePage[BGPPrefix], error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes
Fetch BGP Prefix
client.Addressing.Prefixes.BGPPrefixes.Get(ctx, prefixID, bgpPrefixID, query) (*BGPPrefix, error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}
Create BGP Prefix
client.Addressing.Prefixes.BGPPrefixes.New(ctx, prefixID, params) (*BGPPrefix, error)
POST/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes
Update BGP Prefix
client.Addressing.Prefixes.BGPPrefixes.Edit(ctx, prefixID, bgpPrefixID, params) (*BGPPrefix, error)
PATCH/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}
ModelsExpand Collapse
type BGPPrefix struct{…}
ID stringoptional

Identifier of BGP Prefix.

maxLength32
ASN int64optional

Autonomous System Number (ASN) the prefix will be advertised under.

ASNPrependCount int64optional

Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute

maximum3
minimum0
AutoAdvertiseWithdraw booloptional

Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route.

BGPSignalOpts BGPPrefixBGPSignalOptsoptional
Enabled booloptional

Whether control of advertisement of the prefix to the Internet is enabled to be performed via BGP signal

ModifiedAt Timeoptional

Last time BGP signaling control was toggled. This field is null if BGP signaling has never been enabled.

formatdate-time
CIDR stringoptional

IP Prefix in Classless Inter-Domain Routing format.

CreatedAt Timeoptional
formatdate-time
ModifiedAt Timeoptional
formatdate-time
OnDemand BGPPrefixOnDemandoptional
Advertised booloptional

Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.

AdvertisedModifiedAt Timeoptional

Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.

formatdate-time
OnDemandEnabled booloptional

Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.

OnDemandLocked booloptional

Whether the advertisement status of the prefix is locked, meaning it cannot be changed.

AddressingPrefixesAdvertisement Status

Get Advertisement Status
Deprecated
client.Addressing.Prefixes.AdvertisementStatus.Get(ctx, prefixID, query) (*PrefixAdvertisementStatusGetResponse, error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status
Update Prefix Dynamic Advertisement Status
Deprecated
client.Addressing.Prefixes.AdvertisementStatus.Edit(ctx, prefixID, params) (*PrefixAdvertisementStatusEditResponse, error)
PATCH/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status

AddressingPrefixesDelegations

List Prefix Delegations
client.Addressing.Prefixes.Delegations.List(ctx, prefixID, query) (*SinglePage[Delegations], error)
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations
Create Prefix Delegation
client.Addressing.Prefixes.Delegations.New(ctx, prefixID, params) (*Delegations, error)
POST/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations
Delete Prefix Delegation
client.Addressing.Prefixes.Delegations.Delete(ctx, prefixID, delegationID, body) (*PrefixDelegationDeleteResponse, error)
DELETE/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}
ModelsExpand Collapse
type Delegations struct{…}
ID stringoptional

Identifier of a Delegation.

maxLength32
CIDR stringoptional

IP Prefix in Classless Inter-Domain Routing format.

CreatedAt Timeoptional
formatdate-time
DelegatedAccountID stringoptional

Account identifier for the account to which prefix is being delegated.

maxLength32
ModifiedAt Timeoptional
formatdate-time
ParentPrefixID stringoptional

Identifier of an IP Prefix.

maxLength32