> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
