> For the complete documentation index, see [llms.txt](https://docs.bravostudio.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bravostudio.app/bravo-tags/mobile-actions/action-pull-to-refresh.md).

# Refresh page

Refreshes a screen connected to external data.

## 👉 **The Tag** <a href="#the-tag" id="the-tag"></a>

This set of tags allows to refresh a screen connected to external data, performing an API request and updating the data.

{% tabs %}
{% tab title="Pull to refresh" %}

```
[refresh:pull]
```

The screen is refreshed with a pull-down gesture.

**📍 Where to add the tag:** The top-level app page.
{% endtab %}

{% tab title="Refresh when opening" %}

```
[refresh:always]
```

Every time the page is opened, a remote call is done and the data is updated.

**📍 Where to add the tag:** The top-level app page.
{% endtab %}

{% tab title="Refresh once" %}

```
[refresh:once]
```

Default behaviour. Remote (external data) pages are called once, the first time they are opened.

**📍 Where to add the tag:** The top-level app page.
{% endtab %}

{% tab title="Refresh every X seconds" %}

```
[refresh:interval:<seconds>]
```

Once the page is opened, a remote call is done every \<seconds>.\
\
Example: `[refresh:interval:300]`\
\
***\*Before using it we suggest checking your backend rate limits. We highly recommended not to use it with intervals of less than 10 seconds. Not compatible with the other refresh tags.***<br>

**📍 Where to add the tag:** The top-level app page.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
This feature is useful for any external data that changes often (i.e. real-time stats, attendance list, collective entries, etc.).
{% endhint %}

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-MhxffRX8p8N8ArUgN_p%2Frefresh.gif?alt=media\&token=f87fec5e-7333-4faa-87f6-837632e10a62)

## 🏷️ **How to add the tag** <a href="#how-to-add-the-tag" id="how-to-add-the-tag"></a>

1. Create an app page design. Make sure you add container(s) as needed.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-Mhxg0ihSEUD41He4OdE%2Frefresh1.webp?alt=media\&token=e5284273-4afa-45ed-b254-5dc6eed3f687)

2. **Paste** the tag into the layer name of the **top-level app page**.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-Mhxg6nFA3F6-9q7fFNO%2Fref2.webp?alt=media\&token=cc7eba5d-cb7c-4491-9ad6-fe0265d22662)

&#x20;  &#x20;

{% hint style="info" %}
You can combine <mark style="color:red;">`[refresh:pull]`</mark> with any of the other refresh tags: <mark style="color:red;">`[refresh:always]`</mark>, and <mark style="color:red;">`[refresh:once]`</mark>. However, <mark style="color:red;">`[refresh:always]`</mark> and <mark style="color:red;">`[refresh:once]`</mark> are incompatible with each other. Additionally, <mark style="color:red;">`[refresh:interval:<seconds>]`</mark> is not compatible with any other refresh tags.
{% endhint %}

3. Import Figma file to Bravo.
4. Set up your **binding** as usual. You can use the [example request below](/bravo-tags/mobile-actions/action-pull-to-refresh.md#example-files) to get sample data.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-MhxgIoZZ-mJanBt1Fta%2Fref4.webp?alt=media\&token=fc8e1b2e-a82e-42f8-b5b6-79935e1176fa)

&#x20;   5\. Preview on Bravo Vision. 🚀

## 💾 Example files <a href="#example-files" id="example-files"></a>

Duplicate the files below to see how to set it up!

{% embed url="<https://www.figma.com/community/file/973892292868502990>" %}

**Example request**: Use this request URL to get sample data for the example app above.

*This API updates the stock price every minute, so wait at least a minute between each pull to refresh to see the price change.*

```
https://finnhub.io/api/v1/quote?symbol=TSLA&token=brhpek7rh5re1lpb2gl0
```


---

# 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.bravostudio.app/bravo-tags/mobile-actions/action-pull-to-refresh.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.
