Addressing

addressing

Addressing

Address Maps

addressing.address_maps

Methods

Create Address Map -> Envelope<{ id, can_delete, can_modify_ips, 7 more... }>
post/accounts/{account_id}/addressing/address_maps

Create a new address map under the account.

Delete Address Map -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/addressing/address_maps/{address_map_id}

Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.

Update Address Map -> Envelope<>
patch/accounts/{account_id}/addressing/address_maps/{address_map_id}

Modify properties of an address map owned by the account.

Address Map Details -> Envelope<{ id, can_delete, can_modify_ips, 7 more... }>
get/accounts/{account_id}/addressing/address_maps/{address_map_id}

Show a particular address map owned by the account.

List Address Maps -> SinglePage<>
get/accounts/{account_id}/addressing/address_maps

List all address maps owned by the account.

Domain types

AddressMap = { id, can_delete, can_modify_ips, 5 more... }
Kind = "zone" | "account"

addressing.address_maps.accounts

Methods

Remove An Account Membership From An Address Map -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}

Remove an account as a member of a particular address map.

Add An Account Membership To An Address Map -> { errors, messages, success, 1 more... }
put/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{account_id}

Add an account as a member of a particular address map.

addressing.address_maps.ips

Methods

Remove An IP From An Address Map -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}

Remove an IP from a particular address map.

Add An IP To An Address Map -> { errors, messages, success, 1 more... }
put/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}

Add an IP from a prefix owned by the account to a particular address map.

addressing.address_maps.zones

Methods

Remove A Zone Membership From An Address Map -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}

Remove a zone as a member of a particular address map.

Add A Zone Membership To An Address Map -> { errors, messages, success, 1 more... }
put/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{zone_id}

Add a zone as a member of a particular address map.

Addressing

LOA Documents

addressing.loa_documents

Methods

Upload LOA Document -> Envelope<{ id, account_id, created, 4 more... }>
post/accounts/{account_id}/addressing/loa_documents

Submit LOA document (pdf format) under the account.

addressing.loa_documents.downloads

Methods

Download LOA Document -> unknown
get/accounts/{account_id}/addressing/loa_documents/{loa_document_id}/download

Download specified LOA document under the account.

Addressing

Prefixes

addressing.prefixes

Methods

Add Prefix -> Envelope<>
post/accounts/{account_id}/addressing/prefixes

Add a new prefix under the account.

Delete Prefix -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/addressing/prefixes/{prefix_id}

Delete an unapproved prefix owned by the account.

Update Prefix Description -> Envelope<>
patch/accounts/{account_id}/addressing/prefixes/{prefix_id}

Modify the description for a prefix owned by the account.

Prefix Details -> Envelope<>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}

List a particular prefix owned by the account.

List Prefixes -> SinglePage<>
get/accounts/{account_id}/addressing/prefixes

List all prefixes owned by the account.

Domain types

Prefix = { id, account_id, advertised, 10 more... }

addressing.prefixes.bgp

addressing.prefixes.bgp.bindings

Methods

Create Service Binding -> Envelope<>
post/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings

Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. Note: This API may only be used on prefixes currently configured with a Magic Transit service binding, and only allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum.

Delete Service Binding -> { errors, messages, success }
delete/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}

Delete a Service Binding

Get Service Binding -> Envelope<>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}

Fetch a single Service Binding

List Service Bindings -> SinglePage<>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings

List the Cloudflare services this prefix is currently bound to. Traffic sent to an address within an IP prefix will be routed to the Cloudflare service of the most-specific Service Binding matching the address. Example: binding 192.0.2.0/24 to Cloudflare Magic Transit and 192.0.2.1/32 to the Cloudflare CDN would route traffic for 192.0.2.1 to the CDN, and traffic for all other IPs in the prefix to Cloudflare Magic Transit.

Domain types

ServiceBinding = { id, cidr, provisioning, 2 more... }

addressing.prefixes.bgp.prefixes

Methods

Create BGP Prefix -> Envelope<>
post/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes

Create a BGP prefix, controlling the BGP advertisement status of a specific subnet. When created, BGP prefixes are initially withdrawn, and can be advertised with the Update BGP Prefix API.

Update BGP Prefix -> Envelope<>
patch/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}

Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn).

Fetch BGP Prefix -> Envelope<>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}

Retrieve a single BGP Prefix according to its identifier

List BGP Prefixes -> SinglePage<>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes

List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to control which specific subnets are advertised to the Internet. It is possible to advertise subnets more specific than an IP Prefix by creating more specific BGP Prefixes.

Domain types

BGPPrefix = { id, asn, bgp_signal_opts, 4 more... }

addressing.prefixes.bgp.statuses

Methods

Update Prefix Dynamic Advertisement Status -> Envelope<{ advertised, advertised_modified_at }>
patch/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status

Advertise or withdraw BGP route for a prefix.

Get Advertisement Status -> Envelope<{ advertised, advertised_modified_at }>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status

List the current advertisement state for a prefix.

Security
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example: X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194

Accepted Permissions (at least one required)

Magic Transit Prefix Read Magic Transit Prefix Write IP Prefixes: Write IP Prefixes: Read IP Prefixes: BGP On Demand Write IP Prefixes: BGP On Demand Read

Parameters
account_id: string

Identifier

prefix_id: string

Identifier

Response fields
errors: Array<>
messages: Array<>
success: true

Whether the API call was successful

result: { advertised, advertised_modified_at }
Optional
Request example
200Example

addressing.prefixes.delegations

Methods

Create Prefix Delegation -> Envelope<>
post/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations

Create a new account delegation for a given IP prefix.

Delete Prefix Delegation -> Envelope<{ id }>
delete/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}

Delete an account delegation for a given IP prefix.

List Prefix Delegations -> SinglePage<>
get/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations

List all delegations for a given account IP prefix.

Domain types

Delegations = { id, cidr, created_at, 3 more... }
Addressing

Regional Hostnames

addressing.regional_hostnames

Methods

Create Regional Hostname -> Envelope<{ created_on, hostname, region_key }>
post/zones/{zone_id}/addressing/regional_hostnames

Create a new Regional Hostname entry. Cloudflare will only use data centers that are physically located within the chosen region to decrypt and service HTTPS traffic. Learn more about Regional Services.

Delete Regional Hostname -> { errors, messages, success }
delete/zones/{zone_id}/addressing/regional_hostnames/{hostname}

Delete the region configuration for a specific Regional Hostname.

Update Regional Hostname -> Envelope<{ created_on, hostname, region_key }>
patch/zones/{zone_id}/addressing/regional_hostnames/{hostname}

Update the configuration for a specific Regional Hostname. Only the region_key of a hostname is mutable.

Fetch Regional Hostname -> Envelope<{ created_on, hostname, region_key }>
get/zones/{zone_id}/addressing/regional_hostnames/{hostname}

Fetch the configuration for a specific Regional Hostname, within a zone.

List Regional Hostnames -> SinglePage<{ created_on, hostname, region_key }>
get/zones/{zone_id}/addressing/regional_hostnames

List all Regional Hostnames within a zone.

addressing.regional_hostnames.regions

Methods

List Regions -> SinglePage<{ key, label }>
get/accounts/{account_id}/addressing/regional_hostnames/regions

List all Regional Services regions available for use by this account.

Addressing

Services

addressing.services

Methods

List Services -> SinglePage<{ id, name }>
get/accounts/{account_id}/addressing/services

Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the IP addresses. This endpoint can be used as a reference of available services on the Cloudflare network, and their service IDs.