# Change Action conditions via API

**URL:** https://community.tago.io/t/change-action-conditions-via-api/1600
**Category:** Analysis and Actions
**Created:** [May 30, 2024, 11:21am UTC](https://community.tago.io/t/change-action-conditions-via-api/1600 "2024-05-30T11:21:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![andre.antivilo](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@andre.antivilo](https://community.tago.io/u/andre.antivilo)
#### Post date: [May 30, 2024, 11:21am UTC](https://community.tago.io/t/change-action-conditions-via-api/1600/1 "2024-05-30T11:21:36Z")

</div>

Is it possible to change Action Trigger value conditions via API?

 ![](https://canada1.discourse-cdn.com/flex034/uploads/tagoio1/original/2X/b/b643bf3eb576d3672321bb77c534d30be3fb5870.png)

I need to update threshold values inside Tago from another app.

---

<div class="post-metadata">

### Author: ![mateus.silva](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mateus.silva](https://community.tago.io/u/mateus.silva)
#### Post date: [June 3, 2024, 7:43pm UTC](https://community.tago.io/t/change-action-conditions-via-api/1600/2 "2024-06-03T19:43:27Z")

</div>

Hello Andre,

Yes, it is possible to change Action Trigger value conditions via the API. Below is an example using `curl` to update the triggers of actions:

`curl 'https://api.tago.io/action/your-action-id' \ -X 'PUT' \ -H 'accept: application/json, text/plain, */*' \ -H 'content-type: application/json' \ -H 'token: YOUR_ACCOUNT_TOKEN' \ --data-raw '{ "trigger": [{ "is": "=", "value": "9", "value_type": "number", "variable": "temperature", "tag_key": "device_type", "tag_value": "organization", "unlock": false }, { "is": "=", "value": "11", "value_type": "number", "variable": "temperature", "tag_key": "device_type", "tag_value": "organization", "unlock": false }] }' `

This command updates the trigger conditions for the specified action. Replace `your-action-id` with your actual action ID and `YOUR_ACCOUNT_TOKEN` with your account token.

---

<div class="post-metadata">

### Author: ![andre.antivilo](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@andre.antivilo](https://community.tago.io/u/andre.antivilo)
#### Post date: [June 10, 2024, 10:52pm UTC](https://community.tago.io/t/change-action-conditions-via-api/1600/3 "2024-06-10T22:52:36Z")

</div>

It worked @mateus.silva, thanks!
