Start for $1
  • $1 for a 7-day trial. When the 7 days end, your card is charged from $95 a month for one site, and the plan renews every month until you cancel.
  • Cancel any time with our ready-made cancel email. No reason needed.
  • Your first paid month can be refunded within 7 days of paying it. Write to hello@blogautopost.com.

Publish to WordPress through the REST API

CMS publishingPublished 2026-10-19

A short, practical walk through the credential WordPress built for software that publishes on a person's behalf, and the one request that creates a post.

Last updated

What an application password is

WordPress 5.6 introduced application passwords, a way for a program to make authenticated requests without using the account's real password. The core team's integration guide describes the format: 24 characters made only of upper-case letters, lower-case letters and digits. WordPress shows the value in 6 chunks of four so a person can read it, and the spaces are optional, because they are stripped before the password is checked.

Each password belongs to a user and carries a name you choose, a creation time, and a record of where and when it was last used. The guide says the last-used column is accurate to within 24 hours, which makes it a handy way to spot a password nobody uses any more. One limit is worth knowing early: the guide says an application password is for programs, so it cannot be used to sign in on the normal login page.

Check that your site offers them

By default application passwords are available to all users on sites served over HTTPS. Two things can turn them off: a site that is not on HTTPS, or a filter that a developer has set on purpose. The guide gives a direct test. Request the REST API root, normally /wp-json/ on your domain, and look at the authentication key in the response. If that key is empty, application passwords are not available on that site.

Create the password

  1. Sign in to the WordPress dashboard as the user the integration should act as. Pick the lowest role that can do the job, since the credential carries that user's permissions.
  2. Open the Edit User screen: Users, then Edit User.
  3. Enter a name for the application and add the new password.
  4. Copy the password into your secret store right away and paste it into the tool that will publish.

The same screen lists existing passwords and lets you revoke any of them, so a leaked or retired credential can be cut off without touching the account itself.

Send the credential

The REST handbook says the credentials travel as Basic Auth (RFC 7617) on requests served over HTTPS. That means one header: the word Basic, then the Base64 of username:password. The example below is computed from a made-up user and password so you can see the shape; the spaces were removed before encoding.

Header built from the sample user and sample password
Authorization: Basic ZWRpdG9yLWJvdDphYmNkRUZHSDEyMzRpamtsTU5PUDY3ODk=

On the command line you can let curl do the encoding with --user "USERNAME:PASSWORD", which is the form the handbook uses for its own example.

Publish a post

A new post is one POST request to /wp/v2/posts under the REST root. The reference lists the arguments; the table shows the ones a blog publisher normally sets.

FieldWhat it carries
titleThe post title.
contentThe body, with its HTML markup.
excerptThe short summary shown in lists.
slugAn alphanumeric identifier unique to the post type, used in the URL.
statusOne of publish, future, draft, pending, private.
categoriesTerms assigned in the category taxonomy, as an array.
tagsTerms assigned in the post_tag taxonomy, as an array.
featured_mediaThe ID of the featured media for the post.
A minimal body, with sample values
{
  "title": "How to pick a pour-over grinder",
  "content": "<p>Burr size matters more than price.</p>",
  "excerpt": "Three checks before you buy.",
  "slug": "pour-over-grinder",
  "status": "publish"
}

The response is the stored post. Two of its fields are read only and are the ones you keep: id, the unique identifier you will need to update the post later with POST /wp/v2/posts/<id>, and link, the public URL.

Choosing a status

The reference allows five statuses: publish, future, draft, pending and private. Use publish for a live post, and draft when a person should look at it in the editor first. The date fields, date in the site's timezone and date_gmt in GMT, carry the publication date. Try a scheduled post on a test site first, since the reference does not spell out scheduling.

When it does not work

What you seeWhat the sources say to check
The authentication key in the REST root is emptyThe site is not on HTTPS, or application passwords were turned off on purpose.
The password works in a script but not on the login formThat is by design: the guide says application passwords are for programs.
The list of posts is missing your new entryThe list endpoint returns published posts by default, so ask for the other statuses with the status argument.

If you want to see how a scheduler handles the same steps, the WordPress connection guide and the WordPress integration page cover them, and the indexability checker is a quick way to confirm that a freshly published URL can be crawled.

Frequently asked questions

Do I have to keep the spaces in the password?

No. The core guide says spaces are stripped out before the password is hashed and verified, so the chunked form and the plain form both work. The chunks only exist to help a person read it.

Does the password need HTTPS?

By default application passwords are available on sites served over HTTPS. The integration guide warns that without it the password can be seen on the network, and it names a filter for forcing availability for people who accept that risk.

Can I limit an application password to publishing only?

Not by the password itself. The guide describes scoping as something the core team expects to add later. Until then, the credential acts with the permissions of its user, so create a user with a role that fits the job.

How do I remove access?

Open the Edit User screen for that user and revoke the password. The guide describes the same screen for generating, viewing and revoking passwords.

Sources

Put BlogAutoPost on your blog

Start a 7-day trial, connect your WordPress, Shopify or Webflow blog and approve the first draft yourself.

  • $1 for a 7-day trial. When the 7 days end, your card is charged from $95 a month for one site, and the plan renews every month until you cancel.
  • Cancel any time with our ready-made cancel email. No reason needed.
  • Your first paid month can be refunded within 7 days of paying it. Write to hello@blogautopost.com.