---
title: Labels
---

[Skip to content](#%5Ftop) 

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

[API Gateway](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Labels

##### [List operation labels](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/methods/list)

client.apiGateway.labels.list(LabelListParams { zone\_id, direction, filter, 5 more } params, RequestOptionsoptions?): V4PagePaginationArray<[LabelListResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels%20%3E%20%28model%29%20label%5Flist%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 4 more } \>

GET/zones/{zone\_id}/api\_gateway/labels

##### ModelsExpand Collapse 

LabelListResponse { created\_at, description, last\_updated, 4 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

mapped\_resources?: unknown

Provides counts of what resources are linked to this label

#### LabelsUser

##### [Create user-defined operation labels](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/methods/bulk%5Fcreate)

client.apiGateway.labels.user.bulkCreate(UserBulkCreateParams { zone\_id, body } params, RequestOptionsoptions?): SinglePage<[UserBulkCreateResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user%20%3E%20%28model%29%20user%5Fbulk%5Fcreate%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 3 more } \>

POST/zones/{zone\_id}/api\_gateway/labels/user

##### [Delete user-defined operation labels](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/methods/bulk%5Fdelete)

client.apiGateway.labels.user.bulkDelete(UserBulkDeleteParams { zone\_id } params, RequestOptionsoptions?): SinglePage<[UserBulkDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user%20%3E%20%28model%29%20user%5Fbulk%5Fdelete%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 3 more } \>

DELETE/zones/{zone\_id}/api\_gateway/labels/user

##### [Get a user-defined operation label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/methods/get)

client.apiGateway.labels.user.get(stringname, UserGetParams { zone\_id, with\_mapped\_resource\_counts } params, RequestOptionsoptions?): [UserGetResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user%20%3E%20%28model%29%20user%5Fget%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 4 more } 

GET/zones/{zone\_id}/api\_gateway/labels/user/{name}

##### [Update a user-defined operation label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/methods/update)

client.apiGateway.labels.user.update(stringname, UserUpdateParams { zone\_id, description, metadata } params, RequestOptionsoptions?): [UserUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user%20%3E%20%28model%29%20user%5Fupdate%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 3 more } 

PUT/zones/{zone\_id}/api\_gateway/labels/user/{name}

##### [Edit a user-defined operation label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/methods/edit)

client.apiGateway.labels.user.edit(stringname, UserEditParams { zone\_id, description, metadata } params, RequestOptionsoptions?): [UserEditResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user%20%3E%20%28model%29%20user%5Fedit%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 3 more } 

PATCH/zones/{zone\_id}/api\_gateway/labels/user/{name}

##### [Delete a user-defined operation label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/methods/delete)

client.apiGateway.labels.user.delete(stringname, UserDeleteParams { zone\_id } params, RequestOptionsoptions?): [UserDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user%20%3E%20%28model%29%20user%5Fdelete%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 3 more } 

DELETE/zones/{zone\_id}/api\_gateway/labels/user/{name}

##### ModelsExpand Collapse 

UserBulkCreateResponse { created\_at, description, last\_updated, 3 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

UserBulkDeleteResponse { created\_at, description, last\_updated, 3 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

UserGetResponse { created\_at, description, last\_updated, 4 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

mapped\_resources?: unknown

Provides counts of what resources are linked to this label

UserUpdateResponse { created\_at, description, last\_updated, 3 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

UserEditResponse { created\_at, description, last\_updated, 3 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

UserDeleteResponse { created\_at, description, last\_updated, 3 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

#### LabelsUserResources

#### LabelsUserResourcesOperation

##### [Replace operations attached to a user-defined label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/user/subresources/resources/subresources/operation/methods/update)

client.apiGateway.labels.user.resources.operation.update(stringname, OperationUpdateParams { zone\_id, selector } params, RequestOptionsoptions?): [OperationUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.user.resources.operation%20%3E%20%28model%29%20operation%5Fupdate%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 4 more } 

PUT/zones/{zone\_id}/api\_gateway/labels/user/{name}/resources/operation

##### ModelsExpand Collapse 

OperationUpdateResponse { created\_at, description, last\_updated, 4 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

mapped\_resources?: unknown

Provides counts of what resources are linked to this label

#### LabelsManaged

##### [Get a managed operation label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/managed/methods/get)

client.apiGateway.labels.managed.get(stringname, ManagedGetParams { zone\_id, with\_mapped\_resource\_counts } params, RequestOptionsoptions?): [ManagedGetResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.managed%20%3E%20%28model%29%20managed%5Fget%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 4 more } 

GET/zones/{zone\_id}/api\_gateway/labels/managed/{name}

##### ModelsExpand Collapse 

ManagedGetResponse { created\_at, description, last\_updated, 4 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

mapped\_resources?: unknown

Provides counts of what resources are linked to this label

#### LabelsManagedResources

#### LabelsManagedResourcesOperation

##### [Replace operations attached to a managed label](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/labels/subresources/managed/subresources/resources/subresources/operation/methods/update)

client.apiGateway.labels.managed.resources.operation.update(stringname, OperationUpdateParams { zone\_id, selector } params, RequestOptionsoptions?): [OperationUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.labels.managed.resources.operation%20%3E%20%28model%29%20operation%5Fupdate%5Fresponse%20%3E%20%28schema%29) { created\_at, description, last\_updated, 4 more } 

PUT/zones/{zone\_id}/api\_gateway/labels/managed/{name}/resources/operation

##### ModelsExpand Collapse 

OperationUpdateResponse { created\_at, description, last\_updated, 4 more } 

created\_at: string

formatdate-time

description: string

The description of the label

last\_updated: string

formatdate-time

metadata: unknown

Metadata for the label

name: string

The name of the label

source: "user" | "managed"

* `user` \- label is owned by the user
* `managed` \- label is owned by cloudflare

One of the following:

"user"

"managed"

mapped\_resources?: unknown

Provides counts of what resources are linked to this label