Posts and versions
Understand the private draft tip, public version pin, restoration, and archival.
Every post has a current private tip. A published post also has a publishedVersionNumber that identifies the version visible on the public blog.
Draft and live state
Updating a published post does not immediately change its public article. Agent and API writes always create a new private version; the previous published version stays live until an approved call to posts.publish pins the newer tip. For a human editing in the dashboard, repeated saves within a short window (10 minutes) can fold into the current unpublished tip instead of creating a separate version each time — the tip is renumbered, so earlier version numbers may not all exist. A human save that effectively changes nothing creates no version at all.
This allows an agent or owner to revise a live article without exposing incomplete work.
Original publication date for imports
When publishing an imported post for the first time, posts.publish can include originalPublishedAt: an ISO-8601 string or Unix seconds integer on or after 1990-01-01 and strictly before now. For example, {"postId":"post_...","expectedVersionNumber":1,"originalPublishedAt":"2019-05-04T09:00:00Z"}. It is rejected if the post has already been published, and scheduled publishing does not accept it. Publishing is still a live change, so get the owner’s approval for the exact version; one approval can cover an import batch.
The post DTO exposes originalPublishedAt separately from publishedAt, which remains the actual vibecms publish time. The original date is displayed on the public post, used for post ordering, Markdown metadata, structured data, and RSS. An import does not get an artificial “Updated” line solely because it was imported, and its RSS date remains the original date rather than the import time.
Optimistic concurrency
Updates, restores, and publishing use expectedVersionNumber.
{
"expectedVersionNumber": 7
}
If the private tip is no longer version 7, vibecms returns CONFLICT instead of overwriting a newer edit.
Restoration
posts.versions.restore copies content from an older version into a new private tip. History remains intact, and the public version does not change until separately published.
Archival
Archiving removes the post from public output while preserving its history and activity trail. Treat it as a consequential action and obtain confirmation immediately before the call.