---
title: "Restore an archived label or group"
method: POST
path: "/labels/{labelId}/restore"
tags: ["Labels"]
---

# Restore an archived label or group

`POST /labels/{labelId}/restore`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/labels/{labelId}/restore`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

Requires the **Labels: Delete** permission. Restoring a group also restores its archived labels, except ones that were merged. A label in that group whose name is now used by an active label stays archived and is counted in `skippedCount`.

#### Errors

- `400` "This label was merged into another label and cannot be restored."
- `400` "Restore its group first." when the label sits in a group that is still archived.
- `403` without the permission.
- `404` when the label does not exist.
- `409` when the label's own name is now used by an active label under the same parent. Rename one of them first.

## Path parameters

- `labelId` string, required

## Response `200`

Success

- object
  - `status` 'success': `success` on every 2xx response.
  - `data` object: The result.
    - `labelId` string: Id of the label you restored.
    - `restoredCount` integer: How many labels and groups changed from archived to active.
    - `skippedCount` integer: Labels in the group left archived because their name is taken.

## Other responses

- `400`: The label was merged, or its group is archived
- `403`: You lack the Labels: Delete permission
- `404`: No label with that id in your company
- `409`: Its name is used by an active label

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
