# Archive Businesses, Lists, Files and chats (/docs/api-reference/archive)

`POST /v1/archive` · operation `archive`

Archive up to 100 Businesses (biz_, from this Workspace only), Lists (list_), Files (fil_) and chats (chat_id) in one call. Archived items leave default listings but stay readable; an archived chat still opens and takes messages. A chat is archived by its owner or a Workspace owner or admin, for everyone. Idempotent; each id gets its own result.

**Sign-in:** a signed-in person's access token (`Authorization: Bearer …`), which AI apps get through MCP sign-in; or a Workspace API key in the `X-SMB-API-Key` header.

### Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SMB-Workspace-Id` | string (uuid) | yes | Workspace where this operation runs. Required for user tokens and Workspace API keys. |
| `Idempotency-Key` | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | array of string or object | yes | biz_, list_ or fil_ ids, or a chat's id (chat_id). Pass {id, expected_version} to skip an item that changed since that version. |

### Response

**200** Successful authorized response.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `results` | array of object | yes |  |
| `results[].id` | string | yes |  |
| `results[].kind` | one of `business`, `list`, `file`, `chat`, `null` | yes |  |
| `results[].status` | one of `active`, `archived`, `deleted`, `null` | yes |  |
| `results[].version` | integer or null | yes |  |
| `results[].result` | one of `archived`, `restored`, `deleted`, `unchanged`, `error` | yes |  |
| `results[].deleted_at` | string (date-time) | no |  |
| `results[].undo_until` | string (date-time) | no | Deleted: undo_delete works until this time (10 seconds). |
| `results[].error` | object | no |  |
| `request_id` | string | yes |  |

### Errors

- `400` The request is invalid.
- `401` Authentication is required.
- `403` The caller is not authorized.
- `404` The resource was not found.
- `409` The resource revision or idempotency input conflicts.
- `413` The request body is too large.
- `415` The request must be JSON.
- `422` Required evidence is missing.
- `429` Rate limit reached; honor Retry-After.
- `500` The request could not be completed.
- `502` A dependency returned an invalid response.
- `503` The service is temporarily unavailable.

### Example

```bash
curl --request POST "https://api.smb.co/v1/archive" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "SMB-Workspace-Id: $WORKSPACE_ID" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header "Content-Type: application/json" \
  --data '{"ids":[]}'
```