> 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

## 👉 **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]`\
\
\&#xNAN;***\*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 %}

![](/files/-MhxffRX8p8N8ArUgN_p)

## 🏷️ **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.

![](/files/-Mhxg0ihSEUD41He4OdE)

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

![](/files/-Mhxg6nFA3F6-9q7fFNO)

&#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.

![](/files/-MhxgIoZZ-mJanBt1Fta)

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