# Toggle IP allowlist

Enable or disable IP allowlist enforcement for a dashboard.

Source: https://statusdashboard.com/docs/api/status-dashboards/dashboards/ipallowlist/toggle

`PATCH /app/dashboards/{id}/ipallowlist`

Enables or disables IP allowlist enforcement for a dashboard without replacing the stored IP list. Requires the **IP Allowlist** feature entitlement.

***

## Path parameters
| Parameter | Description                |
| --------- | -------------------------- |
| `id`      | The UUID of the dashboard. |

***

## Request
See [API Basics](/docs/api) for required headers.

### Request body
| Field     | Type      | Description                                       |
| --------- | --------- | ------------------------------------------------- |
| `enabled` | `boolean` | `true` to enable enforcement, `false` to disable. |

***

## Sample request
```bash
curl -X PATCH https://api.statusdashboard.com/app/dashboards/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ipallowlist \
  -H "Authorization: Bearer bcf847abf5c6:def456" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true }'
```

## Sample response
**Status: `200 OK`**

```json
{
  "enabled": true
}
```

***

## Error responses
| Status | When                                                                  |
| ------ | --------------------------------------------------------------------- |
| `400`  | Validation failure — `enabled` missing or not a boolean.              |
| `403`  | Insufficient permissions, or the IP Allowlist feature is not enabled. |
| `404`  | Dashboard not found or does not belong to the caller's organization.  |
