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

ParameterTypeRequiredDescription
idStringNoID or slug of the workspace to archive. When omitted, the workspace is resolved from the blue-workspace-id header.

unarchiveWorkspace

ParameterTypeRequiredDescription
idStringNoID 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

FieldTypeDescription
archiveWorkspace / unarchiveWorkspaceBoolean!true when the workspace is archived or unarchived.

What archiving does

When you archive a workspace, the API:

  1. Marks the workspace as archived and hides it from active workspace lists.
  2. Clears template status — if the workspace was a template, isTemplate is set to false.
  3. Moves the workspace to the end of every member’s workspace ordering.
  4. Removes it from any workspace folders it was filed under.
  5. Records the archive in the workspace activity log.
  6. 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

CodeWhen
PROJECT_NOT_FOUNDNo workspace matches the resolved id (or no id was provided and no X-Bloo-Project-ID header was sent).
FORBIDDENThe 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" }
    }
  ]
}
Preconditions are enforced as authorization

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 roleArchive / Unarchive
OWNERYes
ADMINYes
MEMBERNo
CLIENTNo
COMMENT_ONLYNo
VIEW_ONLYNo

The caller must also hold an OWNER, ADMIN, or MEMBER role at the organization level.