# Journeys and Workspaces

Journey and workspace definitions and their versions.

## Operations

```graphql
# Journeys and Workspaces (surfaces)
# Journey and workspace definitions and their versions.
# Query
analyzeJourneySource: JourneyAuthoringAnalysis!  # Compile Journey XML without saving or executing steps
analyzeWorkspaceSource: WorkspaceAuthoringAnalysis!  # Analyze Workspace XML and Lua without saving, executing handlers or querying business data
compileSchemaXML: String!  # Compile standalone XML schema syntax into JSON Schema without persisting it; host restrictions apply when embedded
generateDefaultDataQuery: String  # Generate a default GraphQL data query for an event topic
getJourney: Journey  # Fetch a single journey by ID, if the caller may see it
getJourneyByHandle: Journey  # Fetch a journey by its stable handle (deep links / anchored launches), if the caller may see it
getJourneyVersion: JourneyVersion  # Fetch one journey version by ID
getMagicQueryGraphQL: MagicQueryOperation!  # Resolves a Magic Query string to the real GraphQL operation and variables it runs, so consumers can graduate from the façade to raw GraphQL
getMagicQuerySchema: MagicQuerySchema!  # Returns the input JSON Schema and output introspection for a Magic Query noun, so consumers (especially LLMs) can learn its contract before calling magicQuery
getWorkspace: Workspace  # Fetch a single workspace by ID, if the caller may see it
getWorkspaceByHandle: Workspace  # Fetch a workspace by its stable handle (deep links / anchored launches), if the caller may see it
getWorkspaceSource: String  # Author-only XML/Lua source envelope for one Workspace version
getWorkspaceVersion: WorkspaceVersion  # Fetch one workspace version by ID
helpChapter: HelpChapter  # Read a chapter of the current published manual edition
helpChapters: [HelpChapterInfo!]!  # List human-facing manual chapters from the running deployment
iacGuides: [IaCGuide!]!  # Every authoring guide, for a tool that syncs them to a folder
iacSchema: IaCSchemaDocument!  # The infrastructure-only view of this schema, for declarative tooling
iacSchemaDocument: IaCSchemaDocumentPayload!  # Fetch the JSON Schema document a SCHEMA-kind validator references, for declarative tooling
iacValidate: IaCValidationResult!  # Validate an infrastructure artifact
listDataChangeEventTopics: [DataChangeEventGroup!]!  # List all valid data change event topics, grouped by resource
listJourneyVersions: JourneyVersionConnection!  # List all versions of a journey, newest first (authoring history), if the caller may see it
listJourneys: JourneyConnection!  # List the caller's visible journey library (own personal + their teams' + instance)
listMagicQueries: [MagicQueryInfo!]!  # Lists every available Magic Query noun with a short description and its options — the discovery entry point
listWorkspaceVersions: WorkspaceVersionConnection!  # List all versions of a workspace, newest first (authoring history), if the caller may see it
listWorkspaces: WorkspaceConnection!  # List the caller's visible workspace library (own personal + their teams' + instance)
loadWorkspaceData: String!  # Runs a declared read-only Lua loader on the current published Workspace version; returns JSON
magicQuery: JSON!  # Executes a Magic Query string and returns the predefined query's JSON result
ping: String!  # Health check endpoint
renderSchemaXML: String!  # Render JSON Schema as native XML without dropping unsupported keywords or changing a saved document
schemaAuthoringCatalog: JSON!  # Compiler-owned vocabulary for the standalone XML JSON Schema dialect, including native form annotations
searchHelp: HelpSearchResult!  # Search human-facing manuals using shared semantic and text retrieval
# Mutation
createJourney: JourneyPayload!  # Create a new journey
createJourneyFromSource: JourneyPayload!  # Compile authoritative Journey XML and create a journey using native scope-dependent authorization
createJourneyVersion: JourneyVersionPayload!  # Create a new draft version of a journey
createJourneyVersionFromSource: JourneyVersionPayload!  # Compile Journey XML into a new draft version under an existing journey, preserving prior versions
createWorkspace: WorkspacePayload!  # Create a new workspace
createWorkspaceVersion: WorkspaceVersionPayload!  # Create a new draft version of a workspace
createWorkspaceVersionSnapshot: WorkspaceVersionPayload!  # Create an immutable source snapshot for reviewed publication
deleteJourney: DeletePayload!  # Delete a journey and all its versions
deleteJourneyVersion: DeletePayload!  # Delete one version from a journey's authoring history
deleteJourneyVersionIfExists: DeletePayload!  # Delete a journey version using native authorization, succeeding when it is already absent for parent-owned cascade cleanup
deleteWorkspace: DeletePayload!  # Delete a workspace and all its versions
deleteWorkspaceVersion: DeletePayload!  # Delete one version from a workspace's authoring history
deleteWorkspaceVersionIfExists: DeletePayload!  # Idempotent cleanup retaining native scope authorization and published-version protection
invokeWorkspaceAction: String!  # Runs a declared Lua action as the caller on the current published Workspace version; returns JSON
publishJourney: JourneyPayload!  # Promote a named draft version of a journey to the live published version
publishWorkspace: WorkspacePayload!  # Promote a named draft version of a workspace to the live published version
updateJourney: JourneyPayload!  # Patch an existing journey — only provided fields are changed
updateJourneyFromSource: JourneyPayload!  # Apply a revision-checked Journey XML or visibility edit while preserving fields omitted by the caller
updateWorkspace: WorkspacePayload!  # Update a workspace
updateWorkspaceSource: WorkspacePayload!  # Revision-checked Workspace authoring update using native authorization and validation
upsertJourney: JourneyPayload!  # Create a journey or overwrite its open draft
upsertWorkspace: WorkspacePayload!  # Create a workspace or overwrite its open draft
validateJourneyDefinition: ValidateSurfacePayload!  # Validate a journey definition through the full two-tier pipeline (Tier-1 SurfaceKit + Tier-2 live-schema GraphQL) WITHOUT persisting it
validateWorkspaceDefinition: ValidateSurfacePayload!  # Validate a workspace definition through the full two-tier pipeline (Tier-1 SurfaceKit + Tier-2 live-schema GraphQL) WITHOUT persisting it
# Subscription
dataChangeEvents: DataChangeEvent!  # Subscribe to real-time data change events

# Call describe_operation(name) for arguments and input types.
```

## Exact schema

Download [complete SDL](/schemas/surfaces.graphql) (108190 bytes). Use the SDL to validate operations; the digest omits argument signatures.

## Guides
- [Inputs, state and values](/docs/journeys/bindings)
- [Forms and validation](/docs/journeys/forms)
- [Queries, selections and writes](/docs/journeys/operations)
- [Conditions and invariants](/docs/journeys/conditions)
- [Waiting, assistance and completion](/docs/journeys/completion)
- [Analysis, drafts and publishing](/docs/journeys/publication)
- [Vocabulary reference](/docs/journeys/reference)
- [Journey definition reference](/docs/journeys/definition-reference)
- [Getting started](/docs/journeys/getting-started)
- [Before you go live](/docs/journeys/go-live)