This is the standard bit


$Token = 'whatever-the-token-is' | ConvertTo-SecureString -AsPlainText -Force

$Body = @{ content = 'Testing again. 1 , 2, 1, 2' h = 'entry' 'post-status' = 'draft' }

You then put ‘?mp-destination=’ followed by the URL of the test micro.blog on the end of the base URL as in the gist below. (The markdown conversion is nausing up the URL if I type it in here - sorry!


invoke-restmethod [micro.blog/micropub](https://micro.blog/micropub?mp-destination=https://mattypenny-test.micro.blog) -Method post  -Authentication Bearer -Token $Token -Body $Body

url                                                              preview                                                 edit
---                                                              -------                                                 ----
[mattypenny-test.micro.blog/2024/02/1...](https://mattypenny-test.micro.blog/2024/02/18/testing-again.html) [micro.blog/account/p...](https://micro.blog/account/posts/143155/preview/3875601) [micro.blog/account/p...](https://micro.blog/account/posts/143155/edit/3875601)

Contents