Skip to content

Post to Publication migration

This page is for API clients and automation maintainers moving from the legacy Post model to Publications.

Post HTTP routes, post-named MCP tools, and the legacy Post authoring model are retired. Publication is the only authoring record for API and automation work.

What changed

  • The posts, post_destinations, post_media, post_variants, and thread_drafts tables are removed after the legacy backfill completes and no Post rows or pending publish_post Jobs remain.
  • Post HTTP routes and the post-named MCP tools (create_draft, list_drafts, update_draft, set_post_renditions, schedule_post, schedule_draft, get_post_status, list_scheduled_posts, cancel_post) are removed.
  • Old Post links still resolve to the canonical Publication through immutable legacy_post and legacy_post_variant aliases. The aliases store only the mapping from a legacy ID to a Publication (and optional segment); they carry no content, status, schedule, or provider state.
  • Historical migration files remain so an older database can upgrade in place. They translate legacy rows and non-terminal publishing Jobs into Publications, Renditions, and authorization receipts before the final schema drops the legacy tables.

Field mapping

Legacy Post fieldPublication replacement
idpublication_id, then call /publications/{id}.
contentsource_text and the first segment body.
thread_draft or /posts/thread itemscreation_preset: "thread" with one segment per thread item.
social_account_idsOne Rendition per destination social_account_id.
media_idsSegment or Rendition media entries.
Post variantsPublication Renditions.
scheduled_atPOST /publications/{id}/schedule after the draft is saved.
random_delay_minutesPublication random_delay_minutes.
statusPublication lifecycle status plus each Rendition status.

Route mapping

Removed surfaceReplacement
POST /postsPOST /publications, then POST /publications/{id}/schedule when scheduling.
GET /postsGET /publications.
GET /posts/{id}Resolve the legacy alias to publication_id, then GET /publications/{id}.
PATCH /posts/{id}PATCH /publications/{id} or schedule and cancel endpoints.
DELETE /posts/{id}DELETE /publications/{id} with expected_revision.
POST /posts/draftPOST /publications.
PUT /posts/{id}/draftPATCH /publications/{id}.
/posts/{id}/variantsGET /publications/{id} and PUT /publications/{id}/renditions.
GET /posts/schedule-overviewGET /publications with calendar_from and calendar_before, then group by day.

CLI and MCP

The CLI keeps the friendly openpost post and openpost thread command names, but every command creates, reads, and mutates Publications and Renditions through the canonical API. Use the returned Publication IDs in scripts.

MCP exposes canonical Publication tools only: create_publication, list_publications, get_publication, update_publication, set_publication_renditions, reply_to_rendition, validate_publication, schedule_publication, cancel_publication, publish_publication_now, and list_publication_events.

Open source under AGPL-3.0-only.