---
title: "Create a new label"
type: reference
method: POST
path: /rest-api/label/create.do
tag: "Labels"
---

# Create a new label

`POST https://YOUR-NETWORK-DOMAIN/rest-api/label/create.do`

Creates a new label with the specified properties. The JSON request body must include 'value' (label name), and 'defaultLabelObjectType' (1=Banner or 2=Placement) when 'defaultLabel' is true. Optionally include 'defaultLabel' (boolean) and 'defaultLabelPlacementTypes' (array of placement type IDs). Returns validation errors if the value is empty or the object type is invalid. Returns an error if a label with the same value already exists. Requires the LABELS_MANAGEMENT permission.

## Body

A JSON body. An example, built from the field definitions:

```json
{
  "id": "100",
  "value": "Sports",
  "defaultLabel": "false",
  "defaultLabelObjectType": "1"
}
```

## Responses

- `200` — Label created successfully
- `400` — Invalid value, object type or placement type ids (per-field errors), or a label with that value already exists
- `401` — Authentication error
- `403` — No access to labels management

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/label/create.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "100",
  "value": "Sports",
  "defaultLabel": "false",
  "defaultLabelObjectType": "1"
}'
```

Source: https://epom.com/ad-server/docs/api/labels/post-label-create