I want to build a small bookmarklet which can take the selected text and send it to Stack Overflow to create a new post containing the selected text.

Also get a unique id or something that helps to point back to question easily.

I am a new API user so I'm not sure whether this is possible with the existing API?

This created new Post is just sort of template, User can edit it, can add tags title etc. before submitting it to Stack Overflow.

A good example will be select some code on jsFiddle and click the bookmarklet. Then the bookmarklet creates a new post with the code already included in the post and also the link to the fiddle. The user can edit the unfilled details like tag etc and submit question. This just to smooth the post creation flow.

1 Answer 1


No, the current API does not allow you to create new posts (questions or answers). If you scroll through the documentation looking for [auth required] you'll notice that only comments can be posted at this time.

Having said that, there are a couple of issues with your bookmarklet idea. What would the title of the post be (assuming the selected text would be the body of a question)? What tags would the post have? How would you check to see if you're posting a duplicate or not?

I think these are just a few of the issues that need to be addressed before posting questions is allowed through the API.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .