# API to get composer settings?

**URL:** https://meta.discourse.org/t/api-to-get-composer-settings/265344
**Category:** Development
**Tags:** composer, rest-api
**Created:** [May 17, 2023, 2:53pm UTC](https://meta.discourse.org/t/api-to-get-composer-settings/265344 "2023-05-17T14:53:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chrisbai2021](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbai2021/32/307437_2.png) [@chrisbai2021](https://meta.discourse.org/u/chrisbai2021)
#### Post date: [May 17, 2023, 2:53pm UTC](https://meta.discourse.org/t/api-to-get-composer-settings/265344/1 "2023-05-17T14:53:02Z")

</div>

Hello friends,

I am building a mobile forum app using Discourse API and I’d like to implement client-side minimum character enforcement for topics/posts so that we don’t have to fire an API request to validate whether the inputted text content satisfy the requirements.

However it does look like we allow configuring minimum post and first post length dynamically through admin settings.

My question is: is there a way to fetch down all these settings using an API call (in my case, at app startup time) so that the app doesn’t need to hardcode the thresholds and assume they won’t change?

Thanks in advance for taking a look!

Best,  
Chris

---

<div class="post-metadata">

### Author: ![chrisbai2021](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbai2021/32/307437_2.png) [@chrisbai2021](https://meta.discourse.org/u/chrisbai2021)
#### Post date: [May 17, 2023, 6:36pm UTC](https://meta.discourse.org/t/api-to-get-composer-settings/265344/2 "2023-05-17T18:36:47Z")

</div>

I found `admin/site_settings/category/posting.json` but it seems that this is only visible to admin users…

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2023, 6:45pm UTC](https://meta.discourse.org/t/api-to-get-composer-settings/265344/3 "2023-05-17T18:45:23Z")

</div>

Best I can offer is to [Reverse engineer the Discourse API](https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576) and see if the UX is pulling down the information that you require.

I didn’t see in a quick look, so the next thing I’d do is look in the source of the composer.

And a quick look at `max_post_length` I don’t see it in a serializer, so I think that the Discourse client probably just posts it to see if it’s too long. And then I tested that, and indeed, the client doesn’t know the max length:

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/7/f/87f635c746e2a2c2e97eeb95e92e0c2338205e9a.png)
