Currently, the Stack Exchange API allows for raising flags on posts, but no way to to retract them.

However, you can still retract a flag by sending a HTTP Post request to{post id}/retract/{flag type} and passing your cookies (namely acct and prov), as well as your fkey, along.

The flags types are:

  • Not an answer: AnswerNotAnAnswer
  • Very low quality: PostLowQuality
  • Spam: PostSpam
  • Rude or abusive: PostOffensive
  • Custom mod flag: PostOther

An example of such a request would look like this:

Cookie: prov=xxxxxxxx; acct=t=xxxxxxxx&s=xxxxxxxx;


This request should be pretty easy to perform, as you have already obtained the necessary cookies and the fkey upon login. In Java, this seems to be possible through a jsoup request.

If you have further questions about implementing this, feel free to join us in our chatroom.