# Firmware update via API

You can run a firmware update from a specified URL programmatically, using bearer authentication.

On the "Access Settings" page, enable full access using bearer authentication and set the API-key:

<figure><img src="/files/iirQvZvmOpQzPFKC9mIE" alt=""><figcaption></figcaption></figure>

Example of a command to run a firmware update from the URL: "<https://my\\_server.com:7000/gw\\_firmware/>"

```shell
    curl -v http://<RUUVI_GW_IP>/fw_update.json 
      -H "Authorization: Bearer 1SDrQH1FkH+pON0GsSjt2gYeMSP02uYqfuu7LWdaBvY=" 
      -H 'Content-Type: application/json' 
      -d '{"url":"https://my_server.com:7000/gw_firmware/"}'
```


---

# Agent Instructions: 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:

```
GET https://docs.ruuvi.com/ruuvi-gateway-firmware/examples/firmware-update-via-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
