---
title: Routes
---

[Skip to content](#_top)

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

[Workers](https://developers.cloudflare.com/api/typescript/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/typescript/resources/workers/subresources/routes/methods/list)

client.workers.routes.list(RouteListParams {zone\_id } params, RequestOptionsoptions?): SinglePage< [RouteListResponse](<https://developers.cloudflare.com/api/typescript/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_list_response%20%3E%20(schema)>) {id, pattern, script } >

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

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

client.workers.routes.get(stringrouteID, RouteGetParams {zone\_id } params, RequestOptionsoptions?): [RouteGetResponse](<https://developers.cloudflare.com/api/typescript/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_get_response%20%3E%20(schema)>) {id, pattern, script }

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

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

client.workers.routes.create(RouteCreateParams {zone\_id, pattern, script } params, RequestOptionsoptions?): [RouteCreateResponse](<https://developers.cloudflare.com/api/typescript/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_create_response%20%3E%20(schema)>) {id, pattern, script }

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

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

client.workers.routes.update(stringrouteID, RouteUpdateParams {zone\_id, pattern, script } params, RequestOptionsoptions?): [RouteUpdateResponse](<https://developers.cloudflare.com/api/typescript/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_update_response%20%3E%20(schema)>) {id, pattern, script }

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

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

client.workers.routes.delete(stringrouteID, RouteDeleteParams {zone\_id } params, RequestOptionsoptions?): [RouteDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/workers#(resource)%20workers.routes%20%3E%20(model)%20route_delete_response%20%3E%20(schema)>) {id }

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

##### ModelsExpand Collapse

<details>

<summary>

RouteListResponse {id, pattern, script }

</summary>

id: string

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

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?: string

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>

RouteGetResponse {id, pattern, script }

</summary>

id: string

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

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?: string

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>

RouteCreateResponse {id, pattern, script }

</summary>

id: string

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

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?: string

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>

RouteUpdateResponse {id, pattern, script }

</summary>

id: string

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

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?: string

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>

RouteDeleteResponse {id }

</summary>

id?: string

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