# Using API to limit trust\_levels?

**URL:** https://meta.discourse.org/t/using-api-to-limit-trust-levels/371684
**Category:** Development
**Tags:** trust-levels, rest-api
**Created:** [June 25, 2025, 5:56pm UTC](https://meta.discourse.org/t/using-api-to-limit-trust-levels/371684 "2025-06-25T17:56:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [June 25, 2025, 5:56pm UTC](https://meta.discourse.org/t/using-api-to-limit-trust-levels/371684/1 "2025-06-25T17:56:23Z")

</div>

Continuing the discussion from [How to limit trust level on group?](https://meta.discourse.org/t/how-to-limit-trust-level-on-group/364927/10):

> [@How to limit trust level on group?](https://meta.discourse.org/t/how-to-limit-trust-level-on-group/364927/10):
>
> No, I don’t think it’s possible to do it that way.

I wonder if any experienced user/dev can give me some light here? I want to limit trust\_levels usint badges and/or automation and I see it’s not possible out of the box.

Trying to get this done I found that API calls can lock or unlock the trust\_level on users, so it could work?

Any advice or suggestion would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![Kayaart](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kayaart](https://meta.discourse.org/u/Kayaart)
#### Post date: [June 25, 2025, 8:23pm UTC](https://meta.discourse.org/t/using-api-to-limit-trust-levels/371684/2 "2025-06-25T20:23:27Z")

</div>

Yes, you got it right: you can’t directly limit the trust level through badges or automation, but you can through the API. If you create a condition (for example, getting a badge), you can call the API with a script to change the trust\_level and fix it. It’s not out of the box, but it works

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [June 25, 2025, 8:34pm UTC](https://meta.discourse.org/t/using-api-to-limit-trust-levels/371684/3 "2025-06-25T20:34:02Z")

</div>

> [@Kayaart](#):
>
> t: you can’t directly limit the trust level through badges or automation, but you can through the API. If you create a condition (for example, getting a badge), you can call the API with a script to change the trust\_level and fix it. It’s not out of the box, but it works

Thanks, I’ll share my experiments. Feel free to share any insight/reading/idea/prototype as well.

_It’s good to see you here, welcome to the forum._

---

<div class="post-metadata">

### Author: ![Kayaart](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Kayaart](https://meta.discourse.org/u/Kayaart)
#### Post date: [June 26, 2025, 9:08am UTC](https://meta.discourse.org/t/using-api-to-limit-trust-levels/371684/4 "2025-06-26T09:08:40Z")

</div>

Thank you, I’ve been on many forums and I can say that the people here are very nice.Thank you for your content
