---
title: "Post creates a label"
method: POST
path: "/labels"
tags: ["label"]
---

# Post creates a label

`POST /labels`

This endpoint let user creates a label.

## Headers

- `X-Request-Id` string

## Request body

- Label
  - `id` integer — The ID of the label
  - `name` string — The name the label
  - `description` string — The description the label
  - `color` string — The color the label
  - `scope` string — The scope the label
  - `project_id` integer — The ID of project that the label belongs to
  - `creation_time` string, date-time — The creation time the label
  - `update_time` string, date-time — The update time of the label

## Response `201`

Create successfully.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `409` — Conflict
- `415` — Unsupported MediaType
- `500` — Internal server error

---

[API](https://skmtc.dev/cerit/apis/harbor-api.md) · [All operations](https://skmtc.dev/cerit/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cerit/harbor-api/revisions/62d78801f8df/schema)
