# JSON API built-in effects

**URL:** <https://wled.discourse.group/t/json-api-built-in-effects/6258>\
**Category:** Projects\
**Created:** [November 4, 2022, 1:40am UTC](https://wled.discourse.group/t/json-api-built-in-effects/6258 "2022-11-04T01:40:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![twincommander](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/twincommander/32/3785_2.png) [@twincommander](https://wled.discourse.group/u/twincommander)\
**Post date:** [November 4, 2022, 1:40am UTC](https://wled.discourse.group/t/json-api-built-in-effects/6258/1 "2022-11-04T01:40:53Z")

</div>

Is it possible to enable one of the built-in effects API POST. If so can you point me to an example

---

<div class="post-metadata">

**Author:** ![Aircoookie](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/aircoookie/32/2_2.png) [@Aircoookie](https://wled.discourse.group/u/Aircoookie)\
**Post date:** [November 4, 2022, 7:43am UTC](https://wled.discourse.group/t/json-api-built-in-effects/6258/2 "2022-11-04T07:43:05Z")

</div>

`{"seg":{"fx":1}}` sets blink effect on all selected segments. You can find the list of effect IDs in FX.h, or set an effect and get the JSON state to see its FX ID.  
I will add some more examples to the docs soon 🙂

---

<div class="post-metadata">

**Author:** ![twincommander](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/twincommander/32/3785_2.png) [@twincommander](https://wled.discourse.group/u/twincommander)\
**Post date:** [November 4, 2022, 7:27pm UTC](https://wled.discourse.group/t/json-api-built-in-effects/6258/3 "2022-11-04T19:27:12Z")

</div>

Perfect! with that info and this link ([https://github.com/Aircoookie/WLED/wiki/List-of-effects-and-palettes](https://github.com/Aircoookie/WLED/wiki/List-of-effects-and-palettes)) that lists all the effects and pallets {“seg”:{"pal”:_pal number_}}

Very cool, super easy.

Much better than coping the state from the presets…

i.e. “mainseg”:0,“seg”:[{“id”:0,“start”:0,“stop”:6,“grp”:1,“spc”:0,“of”:0,“on”:bool(1),“cct”:127,“col”:[[255,0,0],[0,0,0],[0,0,0]],“fx”:0,“sx”:29,“ix”:128,“pal”:2,“sel”:bool(1),“rev”:bool(0),“mi”:bool(0)}]}

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [November 4, 2022, 10:55pm UTC](https://wled.discourse.group/t/json-api-built-in-effects/6258/4 "2022-11-04T22:55:13Z")

</div>

> [@twincommander](#):
>
> i.e. “mainseg”:0,“seg”:[{“id”:0,“start”:0,“stop”:6,“grp”:1,“spc”:0,“of”:0,“on”:bool(1),“cct”:127,“col”:[[255,0,0],[0,0,0],[0,0,0]],“fx”:0,“sx”:29,“ix”:128,“pal”:2,“sel”:bool(1),“rev”:bool(0),“mi”:bool(0)}]}

Actually it does the same with more settings at once and greater precision (targeting only one segment).
