> For the complete documentation index, see [llms.txt](https://developer.gerosense.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gerosense.ai/gerosense-api-proxy-reference/getting-users-resilience.md).

# Getting Users Resilience

Use `/resilience` endpoint to request a user's resilience:

<mark style="color:blue;">`GET`</mark> `/api/v1.1/resilience`

#### Query Parameters

| Name                                           | Type   | Description                                                                            |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------- |
| model\_type<mark style="color:red;">\*</mark>  | String | <p>Model to use.<br>Either <code>steps</code> or <code>bpm</code> (for heart rate)</p> |
| device\_name<mark style="color:red;">\*</mark> | String | A unique device name like `iPhone` or `Apple Watch`                                    |

#### Headers

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \<token>  |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json |

{% tabs %}
{% tab title="200: OK The resilience was calculated" %}

{% endtab %}

{% tab title="404: Not Found Not enough data to calculate the resilience" %}

{% endtab %}
{% endtabs %}

{% code title="REQUEST (EXAMPLE)" %}

```bash
curl 'https://<api-proxy-hostname>/api/v1.1/resilience?model_type=steps&device_name=iPhone' \
     -H 'accept: application/json' \
     -H 'Authorization: Bearer <token>' \
     -H 'Content-Type: application/json'
```

{% endcode %}

{% code title="200 – RESPONSE (EXAMPLE)" %}

```json
{
  "user_id": "85b4453a-46de-484c-bbc2-12666ebc7ed9",
  "device_name": "iphone",
  "model_type": "steps",
  "resilience": 2
}
```

{% endcode %}
