Actions17
Post → Update
AI-generatedSummary
Update a post
Inputs
- postId (required) — Unique identifier of the post to update.
- updateFields — Collection of fields to update such as title, content, status, categories, etc.
Output shape
a single updated post object
Returns the updated post with all fields as returned by the WP REST API.
Examples
Example 1: Update a post's title and status
postId = 42, updateFields.title = 'New Title', updateFields.status = 'publish'
Example 2: Set post to draft and assign categories
postId = 10, updateFields.status = 'draft', updateFields.categories = [5, 9]
Example 3: Update post content and excerpt
postId = 7, updateFields.content = 'Updated content', updateFields.excerpt = 'Short summary'