---
title: "Find labels used in the given repositories."
method: POST
path: "/filter/labels"
tags: ["filter", "default"]
---

# Find labels used in the given repositories.

`POST /filter/labels`

## Request

- Base URL: `{{ server_url }}/v1`
- URL: `{{ server_url }}/v1/filter/labels`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/athenian/apis/title/docs/filter/labels/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- FilterLabelsRequest: Request body of `/filter/labels`. Defines the account and the repositories where to look for the labels.
  - `account` integer, required: Account ID.
  - `repositories` RepositoryID[]: Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.

## Response `200`

List of labels.

- FilteredLabel[]: List of labels.
  - `name` string, required
  - `description` string
  - `color` string, required: RGB 24-bit color in hex.
  - `used_prs` integer, required

## Other responses

- `400`: The request is invalid.
- `403`: Calling user is not allowed to access the specified repositories.
- `404`: The specified account does not exist or the user is not a member.
- `422`: The account's installation has not finished yet.

---

[API](https://skmtc.dev/athenian/apis/title.md) - [All operations](https://skmtc.dev/athenian/apis/title/llms.txt) - [OpenAPI document](https://skmtc.dev/athenian/apis/title/revisions/110c9f7cffdd?raw)
