# "psave" doesn't save in a preset

**URL:** <https://wled.discourse.group/t/psave-doesnt-save-in-a-preset/9158>\
**Category:** Uncategorized\
**Created:** [September 7, 2023, 4:48pm UTC](https://wled.discourse.group/t/psave-doesnt-save-in-a-preset/9158 "2023-09-07T16:48:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jc78](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/jc78/32/3310_2.png) [@jc78](https://wled.discourse.group/u/jc78)\
**Post date:** [September 7, 2023, 4:48pm UTC](https://wled.discourse.group/t/psave-doesnt-save-in-a-preset/9158/1 "2023-09-07T16:48:05Z")

</div>

I’m trying to create a preset with a simple API command that saves the current state to a specific preset number.

I’m using the JSON API and adding `{"psave":110}` to the API Command field. Unfortunately, when I save the preset, the command reverts to an empty command: ‘{}’. Using the preset doesn’t save the current settings to preset #110 as expected.

Conversely, I can use the HTTP API with `PS=110` and that saves properly and works to create a new preset at #110.

I’m not sure if this is a bug with the JSON API or if this functionality just isn’t supported with JSON. I wanted to use JSON over HTTP because with it, I can name the preset. But I don’t see an option to save a named preset with HTTP, or even rename an existing preset.

Can anyone advice me if I’m doing something wrong? Or did I just encounter a bug?

---

<div class="post-metadata">

**Author:** ![ALDIY](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/aldiy/32/2716_2.png) [@ALDIY](https://wled.discourse.group/u/ALDIY)\
**Post date:** [September 7, 2023, 5:21pm UTC](https://wled.discourse.group/t/psave-doesnt-save-in-a-preset/9158/2 "2023-09-07T17:21:20Z")

</div>

I faced the same thing and the reply was that {“psave”:110} example can not be used in a preset , it works perfectly fine if used from something like MQTT .  
 ![image](https://global.discourse-cdn.com/free1/uploads/wled/original/2X/2/285c1d63fb7b7eaa9b87e8182d4b9b631d6cd5b5.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/wled/original/2X/4/4903a31427dec944cf7fc270e27dcf7e3f71e6b4.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/wled/original/2X/6/6f3fc2a2b5710af27696b3f2f85afc831911fef4.png)
