---
title: "Add labels to a space"
method: POST
path: "/wiki/rest/api/space/{spaceKey}/label"
tags: ["Experimental"]
---

# Add labels to a space

`POST /wiki/rest/api/space/{spaceKey}/label`

Adds labels to a piece of content. Does not modify the existing labels.

Notes:

- Labels can also be added when creating content ([Create content](#api-content-post)).
- Labels can be updated when updating content ([Update content](#api-content-id-put)).
This will delete the existing labels and replace them with the labels in
the request.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to update the content.

## Path parameters

- `spaceKey` string, required

## Request body

- LabelCreate[]
  - `prefix` string, required — The prefix for the label. `global`, `my` `team`, etc.
  - `name` string, required — The name of the label, which will be shown in the UI.

## Response `200`

Returned if the labels are added to the content.

- LabelArray
  - `results` Label[], required
    - `prefix` string, required
    - `name` string, required
    - `id` string, required
    - `label` string, required
  - `start` integer
  - `limit` integer
  - `size` integer, required
  - `_links` GenericLinks

## Other responses

- `400` — Returned if; - The body contains labels with invalid characters or too many characters. - The body contains too many labels. - The target content would contain too many labels after the operation. - The calling user does not have permission to edit labels.
- `403` — Returned if the calling user can view but not edit the content.
- `404` — Returned if; - There is no space with the given space key. - The calling user does not have permission to view the space.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
