# Toggle email domain allowlist

Enable or disable email domain allowlist enforcement for public subscribe on a dashboard.

Source: https://statusdashboard.com/docs/api/status-dashboards/dashboards/subscriptions/email-domain-allowlist-toggle

`PATCH /app/dashboards/{id}/subscriptions/email-domain-allowlist`

Enables or disables the email domain allowlist without replacing the stored domain list. Requires the **Email** plan capability (`emailEnabled`).

When enabled with an empty domain list, **all** public email signups are blocked until at least one domain is added.

***

## 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 enforce the allowlist on public subscribe, `false` to allow any domain (subject to channel availability). |

***

## Sample request
```bash
curl -X PATCH https://api.statusdashboard.com/app/dashboards/a1b2c3d4-e5f6-7890-abcd-ef1234567890/subscriptions/email-domain-allowlist \
  -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`  | Invalid body                                          |
| `403`  | Org plan does not include email                       |
| `404`  | Dashboard not found or not owned by your organization |
