Skip to main content
GET
/
projects
/
{project_id}
/
labels
Get project labels
curl --request GET \
  --url https://api.projectcor.com/v1/projects/{project_id}/labels \
  --header 'Authorization: Bearer <token>'
{
  "labels": [
    {
      "id": 123,
      "name": "<string>",
      "labels": [
        {
          "id": 123,
          "hex": "<string>",
          "hsl": "<string>",
          "rgb": "<string>",
          "lang": "<string>",
          "name": "<string>",
          "color_id": 123
        }
      ]
    }
  ],
  "selected": [
    {
      "id": 123,
      "hex": "<string>",
      "hsl": "<string>",
      "rgb": "<string>",
      "lang": "<string>",
      "name": "<string>",
      "color_id": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
integer
required

Project ID. Must belong to the authenticated user's company.

Query Parameters

page
default:false

Pagination page number. Set to false (the default) to disable pagination.

perPage
integer
default:20

Page size when pagination is enabled.

order
string
default:{}

JSON object as a string (must be valid JSON) for sort criteria passed to the label query.

filters
string
default:{}

JSON object as a string (must be valid JSON) with filter criteria for the grouped labels query (e.g. ids, name, limit).

Response

Grouped project labels and labels assigned to this project

labels
object[]
required

Categories with their labels, scoped to the project label entity type.

selected
object[]

Labels currently assigned to the project (present when a valid project_id is provided).