Silence user via API

Use Case:
We have a third party payment platform we’re using to “downgrade” a user upon non payment/renewal. When this happens, we want to be able to “downgrade” them on Discourse as well. Meaning, we want them to be able to access the forum, but not create content. For this reason, “silencing” makes the most sense.

I see that the API docs have the ability to suspend, but not silence a user. Is there any way this can be done?

I’ve seen this other topic, discussing the silence admin API. However, I do not see it documented. I’m hoping it wasn’t removed :grimacing:

Quick update, I found that making a PUT request to the endpoint messaged here does indeed work. As does the “reason”.

Is there a reason this isn’t included in documentation?

1 Like

Why not just remove them from the group that allows them to post? That’s what category permissions are for. (Or maybe there’s a reason to silence them…)

Can you elaborate? Category permissions don’t apply to things like “Uncategorized”. Also, without a plugin, there isn’t a granular “cant post but not read” on a per category basis.

So the only seemingly viable option is silencing until their membership renews. This way they can read but not post, forum-wide.

I’m not sure about uncategorized.

You can set categories to read by all and limit who can post and who can reply. How to create private categories using category security settings

You could also move those users to tl0 to control sending pm.