# Application Groups

> Source: https://developers.cloud66.com/v3/endpoints/application-groups/

## Update Application Group Alerts

URL: https://developers.cloud66.com/v3/endpoints/application-groups/#update-alerts
Endpoint: PATCH /application_groups/:application_group_name/notifications
OAuth scope: admin

Updates alert settings for an application group.

Configures notification alerts for all stacks within the specified application group. This allows bulk management of alert settings across multiple related stacks.

## Alert Configuration

Each alert configuration requires:
- **alert_name**: The name of the alert to configure
- **subscriptions**: Array of notification channel configurations

### Supported Channels

- **email**: Basic email notifications
- **slack**: Requires `slack_url` parameter with Slack webhook URL
- **webhook**: Requires `webhook_url` parameter with your webhook endpoint
- **browser**: In-browser notifications

## Response Structure

The response contains three categories:
- **successes**: Alerts successfully configured
- **not_applicable**: Alerts that don't apply to stacks in this group
- **failures**: Alerts that failed to configure

**Related models:** Application Group, Stack, Alert

Alert configurations applied to an application group will affect all stacks within that group. Individual stack alert settings may override application group settings.

<ResponseCodes 
  codes={[200, 400, 401, 403, 404]}
  overrides={{
    200: "Success - Alerts updated for all stacks in the application group",
    400: "Bad Request - Invalid alert configuration provided",
    403: "Forbidden - OAuth token lacks required `admin` scope or insufficient permissions",
    404: "Not Found - Application group not found"
  }}
/>

### Parameters

- `application_group_name` (string, optional) — Name of the application group
- `alerts` (string, optional) — Array of alert configuration objects

### Request body

```json
{
  "alerts": [
    {
      "alert_name": "deployment_failed",
      "subscriptions": [
        {
          "channel": "email"
        },
        {
          "channel": "slack",
          "slack_url": "https://hooks.slack.com/services/..."
        },
        {
          "channel": "webhook",
          "webhook_url": "https://your-webhook.example.com/alerts"
        },
        {
          "channel": "browser"
        }
      ]
    }
  ]
}
```

### Response

```json
{
  "successes": {
    "alerts": ["deployment_failed"],
    "count": 1
  },
  "not_applicable": {
    "alerts": [],
    "count": 0
  },
  "failures": {
    "alerts": [],
    "count": 0
  }
}
```
