← API reference
Mutation / surfaces

publishWorkspace

Promote a named draft version of a workspace to the live published version. Other open drafts are left untouched. Owner for PERSONAL, else workspace:write.

Arguments

TypeID of the workspace to publish (prefix wks).

TypeID of the draft version to promote (prefix wsv). Fails with a field error when the version is unknown, belongs to another workspace, or is not an open draft.

Returns WorkspacePayload!

Explore in a view

Journeys and Workspaces
View exact SDL
"""
Promote a named draft version of a workspace to the live published version. Other open drafts are left untouched. Owner for PERSONAL, else workspace:write.
"""
publishWorkspace(
  """TypeID of the workspace to publish (prefix `wks`)."""
  id: WorkspaceID!
  """
  TypeID of the draft version to promote (prefix `wsv`). Fails with a field error when the version is unknown, belongs to another workspace, or is not an open draft.
  """
  versionId: WorkspaceVersionID!
): WorkspacePayload! @topic(names: ["surfaces"])

Schema reference describes the API contract. Actual access is checked by the platform for every operation.