Guide

Publish Workflows REST API

Custom routes under prc-publish-workflows/v1 for Workspaces and self-watch. Workflow-status terms also use core /wp/v2/workflow-status. Post types that support prc-publish-workflows expose custom REST fields watchers (hydrated user list) and watchChildPosts (boolean; report packages only).

Base path: /wp-json/prc-publish-workflows/v1/

Auth summary

AccessRoutes
edit_posts (can_use_workspaces)List/create workspaces, resolve URL, search tracker projects
Author, watcher, or adminSingle workspace read/update, watchers, items, tracker link / items
Owner or manage_optionsDelete workspace
edit_post on targetPOST /posts/{id}/watch-self

Workspaces

MethodPathDescription
GET/workspacesPaginated list scoped to author or watcher (X-WP-Total)
POST/workspacesCreate (title required, description optional)
GET/workspaces/{id}Hydrated detail
PATCH/workspaces/{id}Update title/description
DELETE/workspaces/{id}Delete (owner/admin)
PATCH/workspaces/{id}/watchersReplace watcher user ID list
POST/workspaces/{id}/itemsAdd item (type, optional objectId / url / label)
DELETE/workspaces/{id}/items/{itemId}Remove item
POST/workspaces/resolve-urlResolve permalink / edit / pattern / template-part URL to { postId, postType, title, status }
GET/workspaces/trackers/{provider}/projectsSearch Linear or Asana projects (search)
PATCH/workspaces/{id}/trackers/{provider}Link a project (projectId) or unlink (null / empty)
GET/workspaces/{id}/trackers/{provider}/itemsLive issues or tasks for the linked project (max 50)

provider is linear or asana. Unknown providers return 400. Missing tokens return 503 prc_tracker_not_configured. Items without a linked project return 400 prc_tracker_not_linked.

GET /workspaces/{id} includes trackers.linear and trackers.asana as { configured, project } only. It does not embed item lists.

Reference

Add item body

Typed options, defaults, and constraints in one scannable reference.
4 fields
type enum required
Item kind.
objectId number
Post or attachment ID when type is post or attachment.
url url
URL for link items or resolution helpers.
label string
Display label.
Reference
Typed options, defaults, and constraints in one scannable reference.
1 field
projectId string
Provider project id. Empty or null unlinks the project.

GET /workspaces?search= matches workspace title and excerpt only. MCP agents that need to find a file inside a workspace should use Abilities instead.

Responses hydrate titles, statuses, edit/view links, thumbnails, and mime labels server-side. Tracker items are { id, title, url, assignees, dueDate, complete }.

Post REST fields

Registered on each post type with prc-publish-workflows support (alongside core /wp/v2/{type}/{id}):

FieldTypeDescription
watchersobject[]Hydrated watcher list (id, name, email, slack_user_id, avatar_url). Writable; single server-side writer.
watchChildPostsbooleanWhen true on a multi-section report, the current user's watcher state mirrors to chapter posts in multiSectionReport. Default false.

Watch self

POST /posts/{id}/watch-self

Adds the current user to the post's watcher list so the post shows up in their working-on lists. Permission: can edit the post.

Was this helpful?