Archive Workspace
Archive and unarchive workspaces to hide them from active lists without deleting their data.
Archiving a workspace hides it from your active workspace lists without deleting any of its data. Use the archiveWorkspace mutation to archive a workspace and unarchiveWorkspace to restore it. Archiving is the reversible alternative to deleting a workspace — all records, lists, comments, and files are preserved and become visible again the moment you unarchive. Workspaces are Workspace objects in the API.
Both mutations target a single workspace and return Boolean! (true on success). The target workspace is resolved from the id argument, or from the blue-workspace-id request header when id is omitted.
Request
Archive a workspace by passing its ID:
mutation ArchiveWorkspace {
archiveWorkspace(id: "project_123")
}Restore it later with unarchiveWorkspace:
mutation UnarchiveWorkspace {
unarchiveWorkspace(id: "project_123")
}You can omit id and let the workspace be resolved from the blue-workspace-id header instead. This is the only operation set in the reference that documents header-based workspace resolution — it lets you reuse a single request configuration across calls without threading the ID into every mutation:
# Sent with header: blue-workspace-id: project_123
mutation ArchiveCurrentWorkspace {
archiveWorkspace
}If both the id argument and the header are present, the id argument takes precedence. The id accepts either a workspace ID or its slug.
Parameters
archiveWorkspace
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | No | ID or slug of the workspace to archive. When omitted, the workspace is resolved from the blue-workspace-id header. |
unarchiveWorkspace
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | No | ID or slug of the workspace to unarchive. When omitted, the workspace is resolved from the blue-workspace-id header. |
Response
Both mutations return Boolean! — true when the operation succeeds.
{
"data": {
"archiveWorkspace": true
}
}Returns
| Field | Type | Description |
|---|---|---|
archiveWorkspace / unarchiveWorkspace | Boolean! | true when the workspace is archived or unarchived. |
What archiving does
When you archive a workspace, the API:
- Marks the workspace as archived and hides it from active workspace lists.
- Clears template status — if the workspace was a template,
isTemplateis set tofalse. - Moves the workspace to the end of every member’s workspace ordering.
- Removes it from any workspace folders it was filed under.
- Records the archive in the workspace activity log.
- Notifies connected clients in real time so the workspace disappears from open sessions.
unarchiveWorkspace reverses the archived flag and re-positions the workspace at the end of the ordering. It does not restore template status or folder membership — set those again explicitly after unarchiving if you need them.
Errors
| Code | When |
|---|---|
PROJECT_NOT_FOUND | No workspace matches the resolved id (or no id was provided and no X-Bloo-Project-ID header was sent). |
FORBIDDEN | The caller is not an OWNER or ADMIN of the workspace, or the precondition is not met — archiveWorkspace requires an active workspace, unarchiveWorkspace requires an already-archived one. |
{
"errors": [
{
"message": "Project was not found.",
"extensions": { "code": "PROJECT_NOT_FOUND" }
}
]
}{
"errors": [
{
"message": "You are not authorized.",
"extensions": { "code": "FORBIDDEN" }
}
]
}archiveWorkspace only accepts a workspace that is currently active, and unarchiveWorkspace only accepts one that is currently archived. Calling either on a workspace in the wrong state fails the authorization check and returns FORBIDDEN — archiving is not idempotent, so archiving an already-archived workspace errors rather than silently returning true.
Permissions
| Workspace role | Archive / Unarchive |
|---|---|
OWNER | Yes |
ADMIN | Yes |
MEMBER | No |
CLIENT | No |
COMMENT_ONLY | No |
VIEW_ONLY | No |
The caller must also hold an OWNER, ADMIN, or MEMBER role at the organization level.
Related
- Delete a workspace — the permanent, non-reversible alternative.
- List workspaces — filter active versus archived workspaces.
- Workspace activity — read the archive/unarchive entries.
- Workspace templates — how template status interacts with archiving.