WordPress Extended icon

WordPress Extended

WordPress REST API with Custom Post Types, ACF and Meta Fields

Actions17

Post → Update

AI-generated

Summary

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'

Links

Discussion