---
title: "Create Labels"
method: POST
path: "/v2/labels"
---

# Create Labels

`POST /v2/labels`

## Headers

- `Authorization` string
- `X-CAP-API-OAUTH-TOKEN` string

## Request body

- object
  - `labels` object[]
    - `name` string, required
    - `externalId` string
    - `description` string
    - `entityType` 'CUSTOMER' | 'PRODUCT' | 'STORE', required
    - `expiryConfig` object
      - `type` 'NONE' | 'FIXED_DATE' | 'RELATIVE'
      - `expiryDate` string
      - `unit` 'DAYS' | 'MONTHS' | 'YEARS'
      - `value` integer
      - `roundingUnit` string

## Response `201`

All labels created.

## Other responses

- `207` — Partial success — some labels created, some failed.
- `400` — All labels failed validation.

---

[API](https://skmtc.net/capillarytech/apis/sample-api.md) · [All operations](https://skmtc.net/capillarytech/apis/sample-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capillarytech/sample-api/revisions/de241f2ed9b3/schema)
