Send as draft to Micro.blog?

How do I send to Micro.blog as a draft and not as a post? I’m looking to modify this action.

I did a quick a Google for the Micro.blog API documentation. According to the documentation I found, you just need to add a parameter to the call.

To create a draft post, add the parameter “post-status” with the value “draft”. Micro.blog will return the final published URL for the post, even though it doesn’t exist yet, and in the JSON body of the response it will include a preview URL. You can direct users to this URL to preview the post on the web, where they can choose to publish it.

Hope that helps.

Where in the code do I add that?

I can see you haven’t followed the link to the documentation - there’s a note of how many times a link has been used and it is currently zero. Do make sure you check out documentation when it is provided.

If you look at that documentation, you’ll see things like name and content are also parameters. So add it to the data where content is already specified (-along with the call type(?), h).

1 Like

Look for where the data is passing in the HTTP request - this code:

  "data": {
    "h": "entry",
    "content": content
  },

Add the post-status to it, like:

  "data": {
    "h": "entry",
    "content": content,
    "post-status": "draft"
  },

I did not actually test this, but based on the docs that should do it.

Thanks. That worked.