---
title: Routes
---

[Skip to content](#_top)

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

[Workers](https://developers.cloudflare.com/api/python/resources/workers)

Copy Markdown

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

---

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

# Routes

##### [List Worker Routes](https://developers.cloudflare.com/api/python/resources/workers/subresources/routes/methods/list)

workers.routes.list(RouteListParams\*\*kwargs) -> SyncSinglePage\[[RouteListResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_list_response%20%3E%20(schema)>)]

GET/zones/{zone\_id}/workers/routes

##### [Get Worker Route](https://developers.cloudflare.com/api/python/resources/workers/subresources/routes/methods/get)

workers.routes.get(strroute\_id, RouteGetParams\*\*kwargs) -> [RouteGetResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_get_response%20%3E%20(schema)>)

GET/zones/{zone\_id}/workers/routes/{route\_id}

##### [Create Worker Route](https://developers.cloudflare.com/api/python/resources/workers/subresources/routes/methods/create)

workers.routes.create(RouteCreateParams\*\*kwargs) -> [RouteCreateResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_create_response%20%3E%20(schema)>)

POST/zones/{zone\_id}/workers/routes

##### [Replace Worker Route](https://developers.cloudflare.com/api/python/resources/workers/subresources/routes/methods/update)

workers.routes.update(strroute\_id, RouteUpdateParams\*\*kwargs) -> [RouteUpdateResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_update_response%20%3E%20(schema)>)

PUT/zones/{zone\_id}/workers/routes/{route\_id}

##### [Delete Worker Route](https://developers.cloudflare.com/api/python/resources/workers/subresources/routes/methods/delete)

workers.routes.delete(strroute\_id, RouteDeleteParams\*\*kwargs) -> [RouteDeleteResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_delete_response%20%3E%20(schema)>)

DELETE/zones/{zone\_id}/workers/routes/{route\_id}

##### ModelsExpand Collapse

<details>

<summary>

class RouteListResponse: …

</summary>

id: str

Identifier.

maxLength32

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

pattern: str

Pattern to match incoming requests against. <a href="https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior">Learn more</a>.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_list_response%20%3E%20(schema)%20%3E%20(property)%20pattern">Link to this property</a>

script: Optional\[str]

Name of the script to run if the route matches.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_list_response%20%3E%20(schema)%20%3E%20(property)%20script">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workers.routes%20%3E%20(model)%20route_list_response%20%3E%20(schema)>)

<details>

<summary>

class RouteGetResponse: …

</summary>

id: str

Identifier.

maxLength32

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

pattern: str

Pattern to match incoming requests against. <a href="https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior">Learn more</a>.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_get_response%20%3E%20(schema)%20%3E%20(property)%20pattern">Link to this property</a>

script: Optional\[str]

Name of the script to run if the route matches.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_get_response%20%3E%20(schema)%20%3E%20(property)%20script">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workers.routes%20%3E%20(model)%20route_get_response%20%3E%20(schema)>)

<details>

<summary>

class RouteCreateResponse: …

</summary>

id: str

Identifier.

maxLength32

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_create_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

pattern: str

Pattern to match incoming requests against. <a href="https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior">Learn more</a>.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_create_response%20%3E%20(schema)%20%3E%20(property)%20pattern">Link to this property</a>

script: Optional\[str]

Name of the script to run if the route matches.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_create_response%20%3E%20(schema)%20%3E%20(property)%20script">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workers.routes%20%3E%20(model)%20route_create_response%20%3E%20(schema)>)

<details>

<summary>

class RouteUpdateResponse: …

</summary>

id: str

Identifier.

maxLength32

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_update_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

pattern: str

Pattern to match incoming requests against. <a href="https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior">Learn more</a>.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_update_response%20%3E%20(schema)%20%3E%20(property)%20pattern">Link to this property</a>

script: Optional\[str]

Name of the script to run if the route matches.

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_update_response%20%3E%20(schema)%20%3E%20(property)%20script">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workers.routes%20%3E%20(model)%20route_update_response%20%3E%20(schema)>)

<details>

<summary>

class RouteDeleteResponse: …

</summary>

id: Optional\[str]

Identifier.

maxLength32

<a href="#(resource)%20workers.routes%20%3E%20(model)%20route_delete_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workers.routes%20%3E%20(model)%20route_delete_response%20%3E%20(schema)>)