---
title: "Archive a label or group"
method: POST
path: "/labels/{labelId}/archive"
tags: ["Labels"]
---

# Archive a label or group

`POST /labels/{labelId}/archive`

## Request

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

Requires the **Labels: Delete** permission (on by default for admins). Archived labels drop out of the default list and cannot be applied, but passages already labelled keep them. Archiving a group also archives every label in it. Safe to repeat: archiving something already archived returns `archivedCount: 0`. Nothing is deleted; restore it at any time.

## 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 archived.
    - `archivedCount` integer: How many labels and groups changed from active to archived.

## Other responses

- `403`: You lack the Labels: Delete permission
- `404`: No label with that id in your company

---

[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)
