---
title: Prefixes
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Addressing](https://developers.cloudflare.com/api/typescript/resources/addressing)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Prefixes

##### [List Prefixes](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/methods/list)

client.addressing.prefixes.list(PrefixListParams {account\_id } params, RequestOptionsoptions?): SinglePage< [Prefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>) {id, account\_id, advertised, 15 more } >

GET/accounts/{account\_id}/addressing/prefixes

##### [Prefix Details](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/methods/get)

client.addressing.prefixes.get(stringprefixID, PrefixGetParams {account\_id } params, RequestOptionsoptions?): [Prefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>) {id, account\_id, advertised, 15 more }

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}

##### [Add Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/methods/create)

client.addressing.prefixes.create(PrefixCreateParams {account\_id, asn, cidr, 3 more } params, RequestOptionsoptions?): [Prefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>) {id, account\_id, advertised, 15 more }

POST/accounts/{account\_id}/addressing/prefixes

##### [Update Prefix Description](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/methods/edit)

client.addressing.prefixes.edit(stringprefixID, PrefixEditParams {account\_id, description } params, RequestOptionsoptions?): [Prefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>) {id, account\_id, advertised, 15 more }

PATCH/accounts/{account\_id}/addressing/prefixes/{prefix\_id}

##### [Delete Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/methods/delete)

client.addressing.prefixes.delete(stringprefixID, PrefixDeleteParams {account\_id } params, RequestOptionsoptions?): [PrefixDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)>) {errors, messages, success }

DELETE/accounts/{account\_id}/addressing/prefixes/{prefix\_id}

##### [Validate Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/methods/validate)

client.addressing.prefixes.validate(stringprefixID, PrefixValidateParams {account\_id } params, RequestOptionsoptions?): [Prefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>) {id, account\_id, advertised, 15 more }

POST/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/validate

##### ModelsExpand Collapse

<details>

<summary>

Prefix {id, account\_id, advertised, 15 more }

</summary>

id?: string

Identifier of an IP Prefix.

maxLength32

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

account\_id?: string

Identifier of a Cloudflare account.

maxLength32

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20account_id">Link to this property</a>

Deprecatedadvertised?: boolean| null

Prefer the <a href="https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/">BGP Prefixes API</a> 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.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20advertised">Link to this property</a>

Deprecatedadvertised\_modified\_at?: string| null

Prefer the <a href="https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/">BGP Prefixes API</a> 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

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20advertised_modified_at">Link to this property</a>

approved?: string

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

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20approved">Link to this property</a>

asn?: number

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

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20asn">Link to this property</a>

cidr?: string

IP Prefix in Classless Inter-Domain Routing format.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20cidr">Link to this property</a>

created\_at?: string

formatdate-time

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

delegate\_loa\_creation?: boolean

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

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20delegate_loa_creation">Link to this property</a>

description?: string

Description of the prefix.

maxLength1000

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

irr\_validation\_state?: string

State of one kind of validation for an IP prefix.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20irr_validation_state">Link to this property</a>

loa\_document\_id?: string| null

Identifier for the uploaded LOA document.

maxLength32

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20loa_document_id">Link to this property</a>

modified\_at?: string

formatdate-time

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

Deprecatedon\_demand\_enabled?: boolean

Prefer the <a href="https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/">BGP Prefixes API</a> 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.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand_enabled">Link to this property</a>

Deprecatedon\_demand\_locked?: boolean

Prefer the <a href="https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/">BGP Prefixes API</a> 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.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand_locked">Link to this property</a>

ownership\_validation\_state?: string

State of one kind of validation for an IP prefix.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20ownership_validation_state">Link to this property</a>

ownership\_validation\_token?: string

Token provided to demonstrate ownership of the prefix.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20ownership_validation_token">Link to this property</a>

rpki\_validation\_state?: string

State of one kind of validation for an IP prefix.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)%20%3E%20(property)%20rpki_validation_state">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>)

<details>

<summary>

PrefixDeleteResponse {errors, messages, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: true

Whether the API call was successful.

<a href="#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)>)

#### PrefixesService Bindings

##### [List Service Bindings](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/list)

client.addressing.prefixes.serviceBindings.list(stringprefixID, ServiceBindingListParams {account\_id } params, RequestOptionsoptions?): SinglePage< [ServiceBinding](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>) {id, cidr, provisioning, 2 more } >

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bindings

##### [Get Service Binding](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/get)

client.addressing.prefixes.serviceBindings.get(stringbindingID, ServiceBindingGetParams {account\_id, prefix\_id } params, RequestOptionsoptions?): [ServiceBinding](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>) {id, cidr, provisioning, 2 more }

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bindings/{binding\_id}

##### [Create Service Binding](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/create)

client.addressing.prefixes.serviceBindings.create(stringprefixID, ServiceBindingCreateParams {account\_id, cidr, service\_id } params, RequestOptionsoptions?): [ServiceBinding](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>) {id, cidr, provisioning, 2 more }

POST/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bindings

##### [Delete Service Binding](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/delete)

client.addressing.prefixes.serviceBindings.delete(stringbindingID, ServiceBindingDeleteParams {account\_id, prefix\_id } params, RequestOptionsoptions?): [ServiceBindingDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)>) {errors, messages, success }

DELETE/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bindings/{binding\_id}

##### ModelsExpand Collapse

<details>

<summary>

ServiceBinding {id, cidr, provisioning, 2 more }

</summary>

id?: string

Identifier of a Service Binding.

maxLength32

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

cidr?: string

IP Prefix in Classless Inter-Domain Routing format.

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20cidr">Link to this property</a>

<details>

<summary>

provisioning?: Provisioning {state }

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

</summary>

<details>

<summary>

state?: "provisioning"| "active"| "magic\_transit\_route\_missing"

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.

</summary>

One of the following:

"provisioning"

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20provisioning%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

"active"

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20provisioning%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

"magic\_transit\_route\_missing"

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20provisioning%20%3E%20(property)%20state%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20provisioning%20%3E%20(property)%20state">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20provisioning">Link to this property</a>

service\_id?: string

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

maxLength32

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20service_id">Link to this property</a>

service\_name?: string

Name of a service running on the Cloudflare network

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)%20%3E%20(property)%20service_name">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>)

<details>

<summary>

ServiceBindingDeleteResponse {errors, messages, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: true

Whether the API call was successful.

<a href="#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)>)

#### PrefixesBGP Prefixes

##### [List BGP Prefixes](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/methods/list)

client.addressing.prefixes.bgpPrefixes.list(stringprefixID, BGPPrefixListParams {account\_id } params, RequestOptionsoptions?): SinglePage< [BGPPrefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>) {id, asn, asn\_prepend\_count, 6 more } >

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/prefixes

##### [Fetch BGP Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/methods/get)

client.addressing.prefixes.bgpPrefixes.get(stringbgpPrefixID, BGPPrefixGetParams {account\_id, prefix\_id } params, RequestOptionsoptions?): [BGPPrefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>) {id, asn, asn\_prepend\_count, 6 more }

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/prefixes/{bgp\_prefix\_id}

##### [Create BGP Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/methods/create)

client.addressing.prefixes.bgpPrefixes.create(stringprefixID, BGPPrefixCreateParams {account\_id, cidr } params, RequestOptionsoptions?): [BGPPrefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>) {id, asn, asn\_prepend\_count, 6 more }

POST/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/prefixes

##### [Update BGP Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/methods/edit)

client.addressing.prefixes.bgpPrefixes.edit(stringbgpPrefixID, BGPPrefixEditParams {account\_id, prefix\_id, asn\_prepend\_count, 2 more } params, RequestOptionsoptions?): [BGPPrefix](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>) {id, asn, asn\_prepend\_count, 6 more }

PATCH/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/prefixes/{bgp\_prefix\_id}

##### [Delete BGP Prefix](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/methods/delete)

client.addressing.prefixes.bgpPrefixes.delete(stringbgpPrefixID, BGPPrefixDeleteParams {account\_id, prefix\_id } params, RequestOptionsoptions?): [BGPPrefixDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)>) {errors, messages, success }

DELETE/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/prefixes/{bgp\_prefix\_id}

##### ModelsExpand Collapse

<details>

<summary>

BGPPrefix {id, asn, asn\_prepend\_count, 6 more }

</summary>

id?: string

Identifier of BGP Prefix.

maxLength32

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

asn?: number| null

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

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20asn">Link to this property</a>

asn\_prepend\_count?: number

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

maximum3

minimum0

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20asn_prepend_count">Link to this property</a>

auto\_advertise\_withdraw?: 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.

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20auto_advertise_withdraw">Link to this property</a>

<details>

<summary>

bgp\_signal\_opts?: BGPSignalOpts {enabled, modified\_at }

</summary>

enabled?: boolean

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

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20bgp_signal_opts%20%3E%20(property)%20enabled">Link to this property</a>

modified\_at?: string| null

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

formatdate-time

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20bgp_signal_opts%20%3E%20(property)%20modified_at">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20bgp_signal_opts">Link to this property</a>

cidr?: string

IP Prefix in Classless Inter-Domain Routing format.

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20cidr">Link to this property</a>

created\_at?: string

formatdate-time

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

modified\_at?: string

formatdate-time

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

<details>

<summary>

on\_demand?: OnDemand {advertised, advertised\_modified\_at, on\_demand\_enabled, on\_demand\_locked }

</summary>

advertised?: boolean| null

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

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand%20%3E%20(property)%20advertised">Link to this property</a>

advertised\_modified\_at?: string| null

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

formatdate-time

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand%20%3E%20(property)%20advertised_modified_at">Link to this property</a>

on\_demand\_enabled?: boolean

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

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand%20%3E%20(property)%20on_demand_enabled">Link to this property</a>

on\_demand\_locked?: boolean

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

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand%20%3E%20(property)%20on_demand_locked">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)%20%3E%20(property)%20on_demand">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>)

<details>

<summary>

BGPPrefixDeleteResponse {errors, messages, success }

</summary>

<details>

<summary>

errors: Array&lt;Error&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

<details>

<summary>

messages: Array&lt;Message&gt;

</summary>

code: number

minimum1000

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url?: string

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source?: Source {pointer }

</summary>

pointer?: string

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: true

Whether the API call was successful.

<a href="#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)>)

#### PrefixesAdvertisement Status

##### [Get Advertisement Status](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/advertisement_status/methods/get)

Deprecated

client.addressing.prefixes.advertisementStatus.get(stringprefixID, AdvertisementStatusGetParams {account\_id } params, RequestOptionsoptions?): [AdvertisementStatusGetResponse](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_get_response%20%3E%20(schema)>) {advertised, advertised\_modified\_at }

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/status

##### [Update Prefix Dynamic Advertisement Status](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/advertisement_status/methods/edit)

Deprecated

client.addressing.prefixes.advertisementStatus.edit(stringprefixID, AdvertisementStatusEditParams {account\_id, advertised } params, RequestOptionsoptions?): [AdvertisementStatusEditResponse](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_edit_response%20%3E%20(schema)>) {advertised, advertised\_modified\_at }

PATCH/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/bgp/status

##### ModelsExpand Collapse

<details>

<summary>

AdvertisementStatusGetResponse {advertised, advertised\_modified\_at }

</summary>

advertised?: boolean

Advertisement status of the prefix. If <code>true</code>, the BGP route for the prefix is advertised to the Internet. If <code>false</code>, the BGP route is withdrawn.

<a href="#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_get_response%20%3E%20(schema)%20%3E%20(property)%20advertised">Link to this property</a>

advertised\_modified\_at?: string| null

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

formatdate-time

<a href="#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_get_response%20%3E%20(schema)%20%3E%20(property)%20advertised_modified_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_get_response%20%3E%20(schema)>)

<details>

<summary>

AdvertisementStatusEditResponse {advertised, advertised\_modified\_at }

</summary>

advertised?: boolean

Advertisement status of the prefix. If <code>true</code>, the BGP route for the prefix is advertised to the Internet. If <code>false</code>, the BGP route is withdrawn.

<a href="#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_edit_response%20%3E%20(schema)%20%3E%20(property)%20advertised">Link to this property</a>

advertised\_modified\_at?: string| null

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

formatdate-time

<a href="#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_edit_response%20%3E%20(schema)%20%3E%20(property)%20advertised_modified_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_edit_response%20%3E%20(schema)>)

#### PrefixesDelegations

##### [List Prefix Delegations](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/delegations/methods/list)

client.addressing.prefixes.delegations.list(stringprefixID, DelegationListParams {account\_id } params, RequestOptionsoptions?): SinglePage< [Delegations](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)>) {id, cidr, created\_at, 3 more } >

GET/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/delegations

##### [Create Prefix Delegation](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/delegations/methods/create)

client.addressing.prefixes.delegations.create(stringprefixID, DelegationCreateParams {account\_id, cidr, delegated\_account\_id } params, RequestOptionsoptions?): [Delegations](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)>) {id, cidr, created\_at, 3 more }

POST/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/delegations

##### [Delete Prefix Delegation](https://developers.cloudflare.com/api/typescript/resources/addressing/subresources/prefixes/subresources/delegations/methods/delete)

client.addressing.prefixes.delegations.delete(stringdelegationID, DelegationDeleteParams {account\_id, prefix\_id } params, RequestOptionsoptions?): [DelegationDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/addressing#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegation_delete_response%20%3E%20(schema)>) {id }

DELETE/accounts/{account\_id}/addressing/prefixes/{prefix\_id}/delegations/{delegation\_id}

##### ModelsExpand Collapse

<details>

<summary>

Delegations {id, cidr, created\_at, 3 more }

</summary>

id?: string

Identifier of a Delegation.

maxLength32

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

cidr?: string

IP Prefix in Classless Inter-Domain Routing format.

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)%20%3E%20(property)%20cidr">Link to this property</a>

created\_at?: string

formatdate-time

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

delegated\_account\_id?: string

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

maxLength32

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)%20%3E%20(property)%20delegated_account_id">Link to this property</a>

modified\_at?: string

formatdate-time

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

parent\_prefix\_id?: string

Identifier of an IP Prefix.

maxLength32

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)%20%3E%20(property)%20parent_prefix_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)>)

<details>

<summary>

DelegationDeleteResponse {id }

</summary>

id?: string

Identifier of a Delegation.

maxLength32

<a href="#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegation_delete_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegation_delete_response%20%3E%20(schema)>)