---
search:
  tags:
    - Topics
    - POST
seo:
  description: >-
    Archive a topic or restore an archived topic by ID. Archive only the
    requested… Reference for the POST /topics/{topicId}/archive endpoint in the
    Modem API.
sidebar:
  label: Archive topic
  badge: POST
title: Archive topic
type: openapi-operation
---
Archive a topic or restore an archived topic by ID. Archive only the requested topic. Agent archive calls require a nonblank archivedReason; omit archivedReason when restoring. Superseded topics cannot be changed. Repeated calls preserve the original archive decision and history.

`POST /topics/{topicId}/archive`

**Request body** (`application/json`, required)

- `archived` (boolean, required) — True to archive; false to restore.
- `archivedReason` (string) — Reason for archiving. Agent archive calls require a nonblank reason. Omit when restoring.

Request body example:

```json
{
  "archived": true,
  "archivedReason": "string"
}
```

**Responses**

- `200` — OK
- `400` — Invalid request (validation failed).
- `401` — Missing or invalid API key.
- `403` — The API key does not have access to this resource.
- `404` — The requested resource was not found.
- `409` — The request conflicts with an existing resource or idempotency operation.
- `429` — Rate limit exceeded.
- `500` — Internal server error.

Response example, 200:

```json
{
  "archived": true,
  "archivedAt": "2019-08-24T14:15:22Z",
  "archivedByUserId": "string",
  "archivedReason": "string",
  "topicId": "97b608a9-302e-4387-a5f4-fd35969cdc21"
}
```
