Change ownership through the API?

I’m trying to change the ownership of posts through the API, but can’t work out how to do it.

I tried using PUT to /posts/{id}.json with setting post[username] and post[user_id], but neither of those seemed to work.

Anyone know how to do this?

Did you start with How to reverse engineer the Discourse API

1 Like

No I’ve not done that yet. I know how to do it, but I don’t have time just this second. I’ll post here if I get around to it and discover the answer =)

1 Like

Do a post request to the URL /t/[TOPIC_ID]/change-owner.json with the form data post_ids[] and username.

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.