---
title: "Create label"
method: POST
path: "/labels"
tags: ["labels"]
---

# Create label

`POST /labels`

Creates a new label or returns an existing label based on name/value. By default the operation works in a user context, append `?workspaceId` to create/retrieve a label in a workspace context. Resource labels include `resource: true` and a `value`.

## Query parameters

- `workspaceId` integer

## Request body

- CreateLabelRequest
  - `isDefault` boolean
  - `name` string
  - `resource` boolean
  - `value` string

## Response `200`

OK

- CreateLabelResponse
  - `id` integer
  - `isDefault` boolean
  - `name` string
  - `resource` boolean
  - `value` string

## Other responses

- `400` — Bad request
- `403` — Operation not allowed

---

[API](https://skmtc.net/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.net/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/versions/13316c9fe5ff/schema)
