---
title: Routes
---

[Skip to content](#%5Ftop) 

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

[Magic Transit](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Routes

##### [List Routes](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/list)

client.magicTransit.routes.list(RouteListParams { account\_id } params, RequestOptionsoptions?): [RouteListResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Flist%5Fresponse%20%3E%20%28schema%29) { routes } 

GET/accounts/{account\_id}/magic/routes

##### [Route Details](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/get)

client.magicTransit.routes.get(stringrouteID, RouteGetParams { account\_id } params, RequestOptionsoptions?): [RouteGetResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Fget%5Fresponse%20%3E%20%28schema%29) { route } 

GET/accounts/{account\_id}/magic/routes/{route\_id}

##### [Create a Route](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/create)

client.magicTransit.routes.create(RouteCreateParams { account\_id, nexthop, prefix, 4 more } params, RequestOptionsoptions?): [RouteCreateResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Fcreate%5Fresponse%20%3E%20%28schema%29) { id, nexthop, prefix, 6 more } 

POST/accounts/{account\_id}/magic/routes

##### [Update Route](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/update)

client.magicTransit.routes.update(stringrouteID, RouteUpdateParams { account\_id, nexthop, prefix, 4 more } params, RequestOptionsoptions?): [RouteUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Fupdate%5Fresponse%20%3E%20%28schema%29) { modified, modified\_route } 

PUT/accounts/{account\_id}/magic/routes/{route\_id}

##### [Delete Route](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/delete)

client.magicTransit.routes.delete(stringrouteID, RouteDeleteParams { account\_id } params, RequestOptionsoptions?): [RouteDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Fdelete%5Fresponse%20%3E%20%28schema%29) { deleted, deleted\_route } 

DELETE/accounts/{account\_id}/magic/routes/{route\_id}

##### [Update Many Routes](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/bulk%5Fupdate)

client.magicTransit.routes.bulkUpdate(RouteBulkUpdateParams { account\_id, routes } params, RequestOptionsoptions?): [RouteBulkUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Fbulk%5Fupdate%5Fresponse%20%3E%20%28schema%29) { modified, modified\_routes } 

PUT/accounts/{account\_id}/magic/routes

##### [Delete Many Routes](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit/subresources/routes/methods/empty)

client.magicTransit.routes.empty(RouteEmptyParams { account\_id } params, RequestOptionsoptions?): [RouteEmptyResponse](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20route%5Fempty%5Fresponse%20%3E%20%28schema%29) { deleted, deleted\_routes } 

DELETE/accounts/{account\_id}/magic/routes

##### ModelsExpand Collapse 

Scope { colo\_names, colo\_regions } 

Used only for ECMP routes.

colo\_names?: Array<string\>

List of colo names for the ECMP scope.

colo\_regions?: Array<string\>

List of colo regions for the ECMP scope.

RouteListResponse { routes } 

routes?: Array<Route\>

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.

RouteGetResponse { route } 

route?: Route { id, nexthop, prefix, 6 more } 

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.

RouteCreateResponse { id, nexthop, prefix, 6 more } 

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.

RouteUpdateResponse { modified, modified\_route } 

modified?: boolean

modified\_route?: ModifiedRoute { id, nexthop, prefix, 6 more } 

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.

RouteDeleteResponse { deleted, deleted\_route } 

deleted?: boolean

deleted\_route?: DeletedRoute { id, nexthop, prefix, 6 more } 

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.

RouteBulkUpdateResponse { modified, modified\_routes } 

modified?: boolean

modified\_routes?: Array<ModifiedRoute\>

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.

RouteEmptyResponse { deleted, deleted\_routes } 

deleted?: boolean

deleted\_routes?: Array<DeletedRoute\>

id: string

Identifier

maxLength32

nexthop: string

The next-hop IP Address for the static route.

prefix: string

IP Prefix in Classless Inter-Domain Routing format.

priority: number

Priority of the static route.

created\_on?: string

When the route was created.

formatdate-time

description?: string

An optional human provided description of the static route.

modified\_on?: string

When the route was last modified.

formatdate-time

scope?: [Scope](https://developers.cloudflare.com/api/typescript/resources/magic%5Ftransit#%28resource%29%20magic%5Ftransit.routes%20%3E%20%28model%29%20scope%20%3E%20%28schema%29) { colo\_names, colo\_regions } 

Used only for ECMP routes.

weight?: number

Optional weight of the ECMP scope - if provided.