> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/software-delivery-agent-apis/code-repository/labels.md).

# Labels

## GET /labels

> List labels at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels":{"get":{"operationId":"listSpaceLabels","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"The result should inherit entities from parent spaces.","in":"query","name":"inherited","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The substring which is used to filter the labels by their key.","in":"query","name":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesLabel"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List labels at account, org or project level","tags":["labels"]}}}}
```

## POST /labels

> Create label at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels":{"post":{"operationId":"defineSpaceLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabel"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create label at account, org or project level","tags":["labels"]}}}}
```

## PUT /labels

> Save label and values at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesSaveLabelInput":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesSaveLabelValueInput":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"TypesLabelWithValues":{"properties":{"label":{"$ref":"#/components/schemas/TypesLabel"},"values":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}},"type":"object"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels":{"put":{"operationId":"saveSpaceLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"label":{"$ref":"#/components/schemas/TypesSaveLabelInput"},"values":{"items":{"$ref":"#/components/schemas/TypesSaveLabelValueInput"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelWithValues"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Save label and values at account, org or project level","tags":["labels"]}}}}
```

## DELETE /labels/{key}

> Delete label at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels/{key}":{"delete":{"operationId":"deleteSpaceLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Delete label at account, org or project level","tags":["labels"]}}}}
```

## PATCH /labels/{key}

> Update label at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels/{key}":{"patch":{"operationId":"updateSpaceLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabel"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update label at account, org or project level","tags":["labels"]}}}}
```

## GET /labels/{key}/values

> List label values at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels/{key}/values":{"get":{"operationId":"listSpaceLabelValues","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List label values at account, org or project level","tags":["labels"]}}}}
```

## POST /labels/{key}/values

> Create label value at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels/{key}/values":{"post":{"operationId":"defineSpaceLabelValue","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"value":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelValue"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create label value at account, org or project level","tags":["labels"]}}}}
```

## DELETE /labels/{key}/values/{value}

> Delete label value at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels/{key}/values/{value}":{"delete":{"operationId":"deleteSpaceLabelValue","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"value","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Delete label value at account, org or project level","tags":["labels"]}}}}
```

## PATCH /labels/{key}/values/{value}

> Update label value at account, org or project level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/labels/{key}/values/{value}":{"patch":{"operationId":"updateSpaceLabelValue","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"value","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"value":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelValue"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update label value at account, org or project level","tags":["labels"]}}}}
```

## GET /repos/{repo\_identifier}/labels

> List labels at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels":{"get":{"operationId":"listRepoLabels","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"The result should inherit entities from parent spaces.","in":"query","name":"inherited","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The substring which is used to filter the labels by their key.","in":"query","name":"query","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesLabel"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List labels at repo level","tags":["labels"]}}}}
```

## POST /repos/{repo\_identifier}/labels

> Create label at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels":{"post":{"operationId":"defineRepoLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabel"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create label at repo level","tags":["labels"]}}}}
```

## PUT /repos/{repo\_identifier}/labels

> Save label and values at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesSaveLabelInput":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesSaveLabelValueInput":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"TypesLabelWithValues":{"properties":{"label":{"$ref":"#/components/schemas/TypesLabel"},"values":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}},"type":"object"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels":{"put":{"operationId":"saveRepoLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"label":{"$ref":"#/components/schemas/TypesSaveLabelInput"},"values":{"items":{"$ref":"#/components/schemas/TypesSaveLabelValueInput"},"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelWithValues"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Save label and values at repo level","tags":["labels"]}}}}
```

## DELETE /repos/{repo\_identifier}/labels/{key}

> Delete label at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels/{key}":{"delete":{"operationId":"deleteRepoLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Delete label at repo level","tags":["labels"]}}}}
```

## PATCH /repos/{repo\_identifier}/labels/{key}

> Update label at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesLabel":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"description":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"pullreq_count":{"type":"integer"},"repo_id":{"nullable":true,"type":"integer"},"scope":{"type":"integer"},"space_id":{"nullable":true,"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_count":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels/{key}":{"patch":{"operationId":"updateRepoLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"description":{"type":"string"},"key":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumLabelType"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabel"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update label at repo level","tags":["labels"]}}}}
```

## GET /repos/{repo\_identifier}/labels/{key}/values

> List label values at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels/{key}/values":{"get":{"operationId":"listRepoLabelValues","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesLabelValue"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List label values at repo level","tags":["labels"]}}}}
```

## POST /repos/{repo\_identifier}/labels/{key}/values

> Create label value at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels/{key}/values":{"post":{"operationId":"defineRepoLabelValue","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"value":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelValue"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create label value at repo level","tags":["labels"]}}}}
```

## DELETE /repos/{repo\_identifier}/labels/{key}/values/{value}

> Delete label value at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels/{key}/values/{value}":{"delete":{"operationId":"deleteRepoLabelValue","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"value","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Delete label value at repo level","tags":["labels"]}}}}
```

## PATCH /repos/{repo\_identifier}/labels/{key}/values/{value}

> Update label value at repo level

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"TypesLabelValue":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"created":{"type":"integer"},"created_by":{"type":"integer"},"id":{"type":"integer"},"label_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/labels/{key}/values/{value}":{"patch":{"operationId":"updateRepoLabelValue","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"path","name":"value","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"value":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesLabelValue"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update label value at repo level","tags":["labels"]}}}}
```

## GET /repos/{repo\_identifier}/pullreq/{pullreq\_number}/labels

> List labels assigned to pull request

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesScopesLabels":{"properties":{"label_data":{"items":{"$ref":"#/components/schemas/TypesLabelAssignment"},"nullable":true,"type":"array"},"scope_data":{"items":{"$ref":"#/components/schemas/TypesScopeData"},"nullable":true,"type":"array"}},"type":"object"},"TypesLabelAssignment":{"properties":{"assigned":{"nullable":true,"type":"boolean"},"assigned_value":{"$ref":"#/components/schemas/TypesLabelValueInfo"},"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"key":{"type":"string"},"scope":{"type":"integer"},"type":{"$ref":"#/components/schemas/EnumLabelType"},"values":{"items":{"$ref":"#/components/schemas/TypesLabelValueInfo"},"type":"array"}},"type":"object"},"TypesLabelValueInfo":{"properties":{"color":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"value":{"nullable":true,"type":"string"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumLabelType":{"enum":["dynamic","static"],"type":"string"},"TypesScopeData":{"properties":{"repository":{"$ref":"#/components/schemas/TypesRepositoryCore"},"scope":{"type":"integer"},"space":{"$ref":"#/components/schemas/TypesSpaceCore"}},"type":"object"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"EnumRepoType":{"type":"string"},"TypesSpaceCore":{"properties":{"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/pullreq/{pullreq_number}/labels":{"get":{"operationId":"listPullReqLabels","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"The result should contain all labels assignable to the pullreq.","in":"query","name":"assignable","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The substring which is used to filter the labels by their key.","in":"query","name":"query","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"pullreq_number","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesScopesLabels"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List labels assigned to pull request","tags":["labels"]}}}}
```

## PUT /repos/{repo\_identifier}/pullreq/{pullreq\_number}/labels

> Assign label to pull request

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiPullReqAssignLabelInput":{"properties":{"label_id":{"type":"integer"},"value":{"type":"string"},"value_id":{"nullable":true,"type":"integer"}},"type":"object"},"TypesPullReqLabel":{"properties":{"created":{"type":"integer"},"created_by":{"type":"integer"},"label_id":{"type":"integer"},"pullreq_id":{"type":"integer"},"updated":{"type":"integer"},"updated_by":{"type":"integer"},"value_id":{"nullable":true,"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/pullreq/{pullreq_number}/labels":{"put":{"operationId":"assignLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"pullreq_number","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiPullReqAssignLabelInput"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesPullReqLabel"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Assign label to pull request","tags":["labels"]}}}}
```

## DELETE /repos/{repo\_identifier}/pullreq/{pullreq\_number}/labels/{label\_id}

> Unassign label from pull request

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/pullreq/{pullreq_number}/labels/{label_id}":{"delete":{"operationId":"unassignLabel","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"pullreq_number","required":true,"schema":{"type":"integer"}},{"in":"path","name":"label_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Unassign label from pull request","tags":["labels"]}}}}
```
