> For the complete documentation index, see [llms.txt](https://docs.connect.jfrog.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.connect.jfrog.io/developers/api-reference/connect-api-reference/overview/update-trigger.md).

# Update Trigger

When deploying OTA updates on devices, there are situations when your device state is not compatible with receiving new updates. If, for instance, your device is currently in use by the end-user, you would rather not deploy the new update at that time. Using the `Update Trigger` call, you can manage from within your application when you would like to receive updates, and when not to.&#x20;

**After setting the update trigger, your device will not receive new updates until you unset the trigger.**

The Update Trigger for a specific device can also be set through the JFrog Connect Web GUI, through the device details box when selecting it on the Devices page.

## Update Trigger

<mark style="color:green;">`POST`</mark> `https://api.connect.jfrog.io/v1/set_update_trigger`

#### Request Body

| Name                                            | Type    | Description                                                                                |
| ----------------------------------------------- | ------- | ------------------------------------------------------------------------------------------ |
| user\_token<mark style="color:red;">\*</mark>   | string  | This is your account token. Can be found under the Settings category on Connect dashboard. |
| device\_token<mark style="color:red;">\*</mark> | string  | This is your device token.                                                                 |
| trigger\_set                                    | boolean | Set to `true` to **NOT** receive new updates. Set to `false` to receive new updates        |

{% tabs %}
{% tab title="200 Successfully updated the trigger." %}

```
{"message": "Success"}
```

{% endtab %}

{% tab title="400 Error occurred." %}

```
{"error_message": "<ERROR_MESSAGE>"}
```

{% endtab %}

{% tab title="429 Rate limit reached." %}

```
{}
```

{% endtab %}
{% endtabs %}

## Example

{% tabs %}
{% tab title="Python" %}

```python
import json
import requests


#Upswift tokens
user_token = "<user token>"
device_token = "<device token>"

json_content = {'user_token': user_token,
                'device_token': device_token,
                'trigger_set': True}

call_request = requests.post("https://api.connect.jfrog.io/v1/set_update_trigger", json=json_content)
call_response = json.loads(call_request.text)

if call_request.status_code != 200:
    if call_request.status_code == 429:
        error = "API limit reached"
    else:
        error = call_response["error_message"]
    print(error)
else:
    response_message = call_response["message"]

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.connect.jfrog.io/developers/api-reference/connect-api-reference/overview/update-trigger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
