ℹ️ Micropub cross-posting and syndicate-to

Micro.blog now has the option to include specific services when cross-posting. For example, if you have both Twitter and Mastodon enabled under Account → Edit Feeds & Cross-posting, if you choose “Show Cross-posting” on the web you can uncheck Twitter so that the post will not be cross-posted there.

Behind the scenes this uses the Micropub API’s syndication support. If you’re writing an app for Micro.blog, here’s what you need to know.

To query a list of available cross-posting targets, make a GET request to /micropub?q=config or /micropub?q=syndicate-to. The returned list will include uid and name fields:

{
  "syndicate-to": [
    {
      "uid": "twitter",
      "name": "Twitter (@microdotblog)"
    },
    {
      "uid": "mastodon",
      "name": "Mastodon (@manton@indieweb.social)"
    }
  ]
}

The currently supported services are Twitter, Medium, LinkedIn, Mastodon, Tumblr, and Flickr.

To include or exclude one of these services when sending a POST to /micropub, pass an mp-syndicate-to[] parameter with the uid, for example:

POST /micropub

content=Hello&mp-syndicate-to[]=twitter&mp-syndicate-to[]=mastodon

Note that Micro.blog by default assumes you want to cross-post everywhere. If the mp-syndicate-to parameter is missing, Micro.blog will try to cross-post to all configured services.

If you want to exclude all services, you must pass mp-syndicate-to[] with a blank value.