---
title: Prefixes
---

[Skip to content](#_top)

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

[Addressing](https://developers.cloudflare.com/api/python/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/python/resources/addressing/subresources/prefixes/methods/list)

addressing.prefixes.list(PrefixListParams\*\*kwargs) -> SyncSinglePage\[[Prefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>)]

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

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

addressing.prefixes.get(strprefix\_id, PrefixGetParams\*\*kwargs) -> [Prefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>)

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

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

addressing.prefixes.create(PrefixCreateParams\*\*kwargs) -> [Prefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>)

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

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

addressing.prefixes.edit(strprefix\_id, PrefixEditParams\*\*kwargs) -> [Prefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>)

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

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

addressing.prefixes.delete(strprefix\_id, PrefixDeleteParams\*\*kwargs) -> [PrefixDeleteResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix_delete_response%20%3E%20(schema)>)

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

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

addressing.prefixes.validate(strprefix\_id, PrefixValidateParams\*\*kwargs) -> [Prefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes%20%3E%20(model)%20prefix%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class Prefix: …

</summary>

id: Optional\[str]

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: Optional\[str]

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: Optional\[bool]

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: Optional\[datetime]

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: Optional\[str]

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: Optional\[int]

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: Optional\[str]

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: Optional\[datetime]

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: Optional\[bool]

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: Optional\[str]

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: Optional\[str]

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: Optional\[str]

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: Optional\[datetime]

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: Optional\[bool]

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: Optional\[bool]

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: Optional\[str]

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: Optional\[str]

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: Optional\[str]

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>

class PrefixDeleteResponse: …

</summary>

<details>

<summary>

errors: List\[Error]

</summary>

code: int

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: str

<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: Optional\[str]

<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: Optional\[ErrorSource]

</summary>

pointer: Optional\[str]

<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: List\[Message]

</summary>

code: int

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: str

<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: Optional\[str]

<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: Optional\[MessageSource]

</summary>

pointer: Optional\[str]

<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: Literal\[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/python/resources/addressing/subresources/prefixes/subresources/service_bindings/methods/list)

addressing.prefixes.service\_bindings.list(strprefix\_id, ServiceBindingListParams\*\*kwargs) -> SyncSinglePage\[[ServiceBinding](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>)]

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

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

addressing.prefixes.service\_bindings.get(strbinding\_id, ServiceBindingGetParams\*\*kwargs) -> [ServiceBinding](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>)

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

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

addressing.prefixes.service\_bindings.create(strprefix\_id, ServiceBindingCreateParams\*\*kwargs) -> [ServiceBinding](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding%20%3E%20(schema)>)

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

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

addressing.prefixes.service\_bindings.delete(strbinding\_id, ServiceBindingDeleteParams\*\*kwargs) -> [ServiceBindingDeleteResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.service_bindings%20%3E%20(model)%20service_binding_delete_response%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class ServiceBinding: …

</summary>

id: Optional\[str]

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: Optional\[str]

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: Optional\[Provisioning]

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

</summary>

<details>

<summary>

state: Optional\[Literal\["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: Optional\[str]

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: Optional\[str]

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>

class ServiceBindingDeleteResponse: …

</summary>

<details>

<summary>

errors: List\[Error]

</summary>

code: int

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: str

<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: Optional\[str]

<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: Optional\[ErrorSource]

</summary>

pointer: Optional\[str]

<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: List\[Message]

</summary>

code: int

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: str

<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: Optional\[str]

<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: Optional\[MessageSource]

</summary>

pointer: Optional\[str]

<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: Literal\[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/python/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/methods/list)

addressing.prefixes.bgp\_prefixes.list(strprefix\_id, BGPPrefixListParams\*\*kwargs) -> SyncSinglePage\[[BGPPrefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>)]

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

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

addressing.prefixes.bgp\_prefixes.get(strbgp\_prefix\_id, BGPPrefixGetParams\*\*kwargs) -> [BGPPrefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>)

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

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

addressing.prefixes.bgp\_prefixes.create(strprefix\_id, BGPPrefixCreateParams\*\*kwargs) -> [BGPPrefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>)

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

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

addressing.prefixes.bgp\_prefixes.edit(strbgp\_prefix\_id, BGPPrefixEditParams\*\*kwargs) -> [BGPPrefix](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix%20%3E%20(schema)>)

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

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

addressing.prefixes.bgp\_prefixes.delete(strbgp\_prefix\_id, BGPPrefixDeleteParams\*\*kwargs) -> [BGPPrefixDeleteResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.bgp_prefixes%20%3E%20(model)%20bgp_prefix_delete_response%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class BGPPrefix: …

</summary>

id: Optional\[str]

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: Optional\[int]

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: Optional\[int]

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: Optional\[bool]

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: Optional\[BGPSignalOpts]

</summary>

enabled: Optional\[bool]

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: Optional\[datetime]

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: Optional\[str]

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: Optional\[datetime]

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: Optional\[datetime]

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: Optional\[OnDemand]

</summary>

advertised: Optional\[bool]

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: Optional\[datetime]

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: Optional\[bool]

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: Optional\[bool]

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>

class BGPPrefixDeleteResponse: …

</summary>

<details>

<summary>

errors: List\[Error]

</summary>

code: int

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: str

<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: Optional\[str]

<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: Optional\[ErrorSource]

</summary>

pointer: Optional\[str]

<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: List\[Message]

</summary>

code: int

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: str

<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: Optional\[str]

<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: Optional\[MessageSource]

</summary>

pointer: Optional\[str]

<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: Literal\[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/python/resources/addressing/subresources/prefixes/subresources/advertisement_status/methods/get)

Deprecated

addressing.prefixes.advertisement\_status.get(strprefix\_id, AdvertisementStatusGetParams\*\*kwargs) -> [AdvertisementStatusGetResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_get_response%20%3E%20(schema)>)

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

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

Deprecated

addressing.prefixes.advertisement\_status.edit(strprefix\_id, AdvertisementStatusEditParams\*\*kwargs) -> [AdvertisementStatusEditResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.advertisement_status%20%3E%20(model)%20advertisement_status_edit_response%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class AdvertisementStatusGetResponse: …

</summary>

advertised: Optional\[bool]

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: Optional\[datetime]

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>

class AdvertisementStatusEditResponse: …

</summary>

advertised: Optional\[bool]

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: Optional\[datetime]

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/python/resources/addressing/subresources/prefixes/subresources/delegations/methods/list)

addressing.prefixes.delegations.list(strprefix\_id, DelegationListParams\*\*kwargs) -> SyncSinglePage\[[Delegations](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)>)]

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

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

addressing.prefixes.delegations.create(strprefix\_id, DelegationCreateParams\*\*kwargs) -> [Delegations](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegations%20%3E%20(schema)>)

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

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

addressing.prefixes.delegations.delete(strdelegation\_id, DelegationDeleteParams\*\*kwargs) -> [DelegationDeleteResponse](<https://developers.cloudflare.com/api/python/resources/addressing#(resource)%20addressing.prefixes.delegations%20%3E%20(model)%20delegation_delete_response%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class Delegations: …

</summary>

id: Optional\[str]

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: Optional\[str]

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: Optional\[datetime]

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: Optional\[str]

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: Optional\[datetime]

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: Optional\[str]

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>

class DelegationDeleteResponse: …

</summary>

id: Optional\[str]

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)>)