---
title: "Archive a space"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive a space

Path: CloudRaker Workspace API › Workspace Spaces

`POST /spaces/{spaceId}/archive`

Soft-archives a space by stamping `archivedAt`; it then disappears from list and get. Authorization: requires `space:archive` on the space; organization administrators bypass this check. A caller lacking the grant gets 403. Returns 204 No Content on success; 404 if the space does not exist or is already archived.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `spaceId` (`archiveSpace.path.spaceId`; string, required)

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/spaces/<spaceId>/archive' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/spaces/<spaceId>/archive';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/spaces/<spaceId>/archive"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 204

Archived — no content.

### 404

`not_found` — the space does not exist or is already archived.


Source: https://docs.cloudraker.com/workspace/api/workspace-spaces/archive-space/index.md
