Posting API

Micropub and XML-RPC APIs.

Micropub is a W3C recommendation for posting to your web site. It started life in the IndieWeb community and is now supported in several platforms.

Sending a new post to often looks as simple as this (where 123456789 is an app token):

POST /micropub
Authorization: Bearer 123456789


To upload a photo to a blog, first query Micropub to get the media endpoint:

GET /micropub?q=config
Authorization: Bearer 123456789

This will return a response like:

  "media-endpoint": ""

The media endpoint accepts a multipart/form-data upload with a file part containing the JPEG image data. will send back an HTTP 202 response while the image is being copied to the published site. It may take a few seconds for it to be available at the URL in the response:

HTTP/1.1 202 Accepted

Now that you have the URL for the uploaded photo, you can add a photo parameter to a new post. To set alt text for the photo, also include an mp-photo-alt parameter.

POST /micropub
Authorization: Bearer 123456789


When creating a new post, the Micropub API also accepts a “name” parameter to give the post a title:

POST /micropub
Authorization: Bearer 123456789


To retrieve a list of recent posts, the Micropub API supports /micropub?q=source. This is documented on the IndieWeb wiki. also allows editing an existing post or deleting a post as described in the Micropub spec. supports Micropub on both the server and from the iOS app:

  • For posting from a third-party client to a microblogs, you can use IndieAuth or generate an app token under Account → “App tokens”. If you use a token, set it the Authorization: Bearer header.
  • For posting from the iOS and macOS apps to any Micropub server, under Settings → “When writing a new post” choose “WordPress or compatible weblog”. Enter your web site domain name and will look for an authorization endpoint to complete the setup.

Note: for iOS and macOS will always default to WordPress posting if your web site supports it, so that it can set a default category and post format.

For users who have multiple microblogs configured, /micropub?q=config will return of the list of sites. You can post to a specific microblog by passing an mp-destination parameter of the URL (uid from the configured list).

The XML-RPC support (MetaWeblog API) allows you to post to a microblog and from the iOS app to WordPress, MovableType, and other compatible blogging platforms:

  • For posting from a third-party client like MarsEdit on your Mac to microblogs, generate an app token under Account → “App tokens”. When prompted for a username in your third-party client, enter your username and the app token for the password.
  • For posting from the iOS app to WordPress and compatible weblogs, will look for your XML-RPC endpoint and prompt for your blog’s username and password.

On the server, responds to the following XML-RPC methods:

  • metaWeblog.newPost
  • metaWeblog.editPost
  • metaWeblog.deletePost
  • metaWeblog.getPost
  • metaWeblog.getRecentPosts
  • metaWeblog.newMediaObject

From the iOS client, calls the following XML-RPC methods:

  • blogger.getUserInfo
  • blogger.newPost
  • wp.newPost
  • wp.getTerms
  • metaWeblog.newMediaObject