# Refresh the mapping cache

> Source: https://truto.one/docs/api-reference/admin/integrated-accounts/refresh-mapping-cache/

`POST /integrated-account/refresh-mapping-cache`

Resource: **Integrated accounts**

## Request body

- **`environment_id`** _(string)_
  The environment whose cache to refresh. Optional when authenticating with an API token, which is already scoped to one environment — required otherwise.
- **`integration_id`** _(string)_
  Restrict the per-connection clears to this integration's connections, and also drop its cached integration configuration. Must be an integration installed in this environment.

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/integrated-account/refresh-mapping-cache' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "environment_id": "9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60",
  "integration_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}'
```

### JavaScript

```javascript
const body = {
  "environment_id": "9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60",
  "integration_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
};

const response = await fetch('https://api.truto.one/integrated-account/refresh-mapping-cache', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/integrated-account/refresh-mapping-cache"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "environment_id": "9f1d8f52-6b4c-4c4e-9a0e-1b2c3d4e5f60",
    "integration_id": "1ba1f401-7183-47c5-9e39-e8e257e3c795"
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())
```
