Skip to content
Start here

Prefixes

List Prefixes
GET/accounts/{account_id}/addressing/prefixes
Prefix Details
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}
Add Prefix
POST/accounts/{account_id}/addressing/prefixes
Update Prefix Description
PATCH/accounts/{account_id}/addressing/prefixes/{prefix_id}
Delete Prefix
DELETE/accounts/{account_id}/addressing/prefixes/{prefix_id}
ModelsExpand Collapse
Prefix = object { id, account_id, advertised, 15 more }
id: optional string

Identifier of an IP Prefix.

maxLength32
account_id: optional string

Identifier of a Cloudflare account.

maxLength32
Deprecatedadvertised: optional boolean
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.

Deprecatedadvertised_modified_at: optional string
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: optional string

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

asn: optional number

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

cidr: optional string

IP Prefix in Classless Inter-Domain Routing format.

created_at: optional string
formatdate-time
delegate_loa_creation: optional boolean

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

description: optional string

Description of the prefix.

maxLength1000
irr_validation_state: optional string

State of one kind of validation for an IP prefix.

loa_document_id: optional string

Identifier for the uploaded LOA document.

maxLength32
modified_at: optional string
formatdate-time
Deprecatedon_demand_enabled: optional boolean
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.

Deprecatedon_demand_locked: optional boolean
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.

ownership_validation_state: optional string

State of one kind of validation for an IP prefix.

ownership_validation_token: optional string

Token provided to demonstrate ownership of the prefix.

rpki_validation_state: optional string

State of one kind of validation for an IP prefix.

PrefixDeleteResponse = object { errors, messages, success }
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
success: true

Whether the API call was successful.

PrefixesService Bindings

List Service Bindings
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings
Get Service Binding
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}
Create Service Binding
POST/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings
Delete Service Binding
DELETE/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}
ModelsExpand Collapse
ServiceBinding = object { id, cidr, provisioning, 2 more }
id: optional string

Identifier of a Service Binding.

maxLength32
cidr: optional string

IP Prefix in Classless Inter-Domain Routing format.

provisioning: optional object { state }

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

state: optional "provisioning" or "active"

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:
"provisioning"
"active"
service_id: optional string

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

maxLength32
service_name: optional string

Name of a service running on the Cloudflare network

ServiceBindingDeleteResponse = object { errors, messages, success }
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
success: true

Whether the API call was successful.

PrefixesBGP Prefixes

List BGP Prefixes
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes
Fetch BGP Prefix
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}
Create BGP Prefix
POST/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes
Update BGP Prefix
PATCH/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}
ModelsExpand Collapse
BGPPrefix = object { id, asn, asn_prepend_count, 6 more }
id: optional string

Identifier of BGP Prefix.

maxLength32
asn: optional number

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

asn_prepend_count: optional number

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

maximum3
minimum0
auto_advertise_withdraw: optional boolean

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.

bgp_signal_opts: optional object { enabled, modified_at }
enabled: optional boolean

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

modified_at: optional string

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

formatdate-time
cidr: optional string

IP Prefix in Classless Inter-Domain Routing format.

created_at: optional string
formatdate-time
modified_at: optional string
formatdate-time
on_demand: optional object { advertised, advertised_modified_at, on_demand_enabled, on_demand_locked }
advertised: optional boolean

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

advertised_modified_at: optional string

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

formatdate-time
on_demand_enabled: optional boolean

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

on_demand_locked: optional boolean

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

PrefixesAdvertisement Status

Get Advertisement Status
Deprecated
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status
Update Prefix Dynamic Advertisement Status
Deprecated
PATCH/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/status
ModelsExpand Collapse

PrefixesDelegations

List Prefix Delegations
GET/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations
Create Prefix Delegation
POST/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations
Delete Prefix Delegation
DELETE/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}
ModelsExpand Collapse
Delegations = object { id, cidr, created_at, 3 more }
id: optional string

Identifier of a Delegation.

maxLength32
cidr: optional string

IP Prefix in Classless Inter-Domain Routing format.

created_at: optional string
formatdate-time
delegated_account_id: optional string

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

maxLength32
modified_at: optional string
formatdate-time
parent_prefix_id: optional string

Identifier of an IP Prefix.

maxLength32
DelegationDeleteResponse = object { id }
id: optional string

Identifier of a Delegation.

maxLength32