Publishing Posts to WordPress With the SyncDock API
Create Gutenberg posts via the SyncDock API, edit single blocks, schedule publication, and attach media from any external client.
On this page
Publishing through SyncDock means sending Gutenberg block JSON to the /wp-json/syncdock/v1/ namespace with a write-scoped key. Posts arrive in the editor as real blocks rather than a wall of classic HTML, so human editors can keep working in Gutenberg on content an agent or pipeline wrote.
Before you begin
- A SyncDock API key with write scopes — see API keys and scopes
- A client that can send JSON over HTTPS
Reading the site before writing to it
Good automated publishing starts with context, and this is where SyncDock differs most from a bare post endpoint. Call /context/posts for recent, popular, and similar content plus gap analysis, and /context/taxonomies for the live category and tag tree. An agent that checks first can update the near-duplicate that already exists instead of creating a competing post — the discovery endpoints (multi-taxonomy filters, date-range queries, full-text search with highlighted excerpts) make finding the right post one request.
Creating a post from block JSON
Send structured block JSON covering any of the 18+ supported core block types — paragraphs, headings, images, lists, quotes, and more — and SyncDock renders valid block markup on the WordPress side. There is no generating raw markup, pasting it in, and repairing broken block comments by hand.
Alongside the content, the same request can carry taxonomy assignments and SEO metadata. Titles, descriptions, and SEO fields are written into Yoast SEO, Rank Math, or All in One SEO automatically, falling back to native meta when none is active.
To schedule instead of publishing immediately, create the post with the future status and a date; WordPress publishes it on time through its normal scheduling machinery, giving a pipeline a queue for free.
Editing a single block
Block-level partial updates are the feature that makes ongoing automated maintenance safe. Insert, replace, or delete one block by its index and every other byte of the post stays identical — an agent can refresh an outdated paragraph, swap an image, or append a section without the whole-document rewrite that quietly destroys formatting and bloats revision history.
If an automated edit does go wrong, the API can list a post's revisions and restore any of them, so the pipeline has an undo as well as a queue.
Attaching media
Upload images via multipart/form-data or base64 JSON — whichever your client can produce — with server-side MIME validation on the way in. The response returns complete metadata and sizing data, and the attachment can then be referenced from image blocks or set as the featured image.
Watch the activity log during your first integration run. Every request is recorded with its status code and response time, which turns a silent pipeline failure into a readable line.
Next steps
SyncDock
Headless publishing for WordPress — push posts in from external tools and AI pipelines over a clean, authenticated API.
See also
Related documentation
- Getting Started With SyncDockInstall SyncDock and turn WordPress into a headless publishing target for AI agents, SaaS apps, and automation pipelines.
- SyncDock API Keys, Scopes & HMAC SigningCreate SyncDock API keys, assign least-privilege permission scopes, and decide when to require HMAC-SHA256 request signing.