capabilities.work

Categorize and Publish Post

A 3-step recipe with WordPress. We can help you get access.

Recipe · 3 steps

Categorize and Publish Post

Create a category and publish a post assigned to it.

  1. Create the category term that the post will be filed under. WordPress returns 201 with the new term id on success.
  2. Publish a new post and assign it to the category created in the prior step by referencing its id in the categories array.
  3. Read the newly created post back by id to confirm it persisted with the expected published status.
What you'll need to have ready
  • authorization: HTTP Basic Authorization header value built from a WordPress Application Password (e.g. "Basic dXNlcjpwYXNzd29yZA==").
  • categoryName: The display name for the new category (e.g. "Technology").
  • categoryDescription: Optional HTML description of the category.
  • postTitle: The title for the new post.
  • postContent: The HTML content body for the new post.
For your developer

Arazzo workflow wordpress:categorize-and-publish-post, 3 operations: createCategory → createPost → getPost. Specs on APIs.io.