> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodostatus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Notification Channels

> Configure how you and your team receive alerts

Notification channels determine how you receive alerts about incidents, monitor failures, and other events.

## Supported Channels

| Channel             | Use Case                             |
| ------------------- | ------------------------------------ |
| **Slack**           | Team notifications in channels       |
| **Discord**         | Community and team alerts            |
| **Email**           | On-call and subscriber notifications |
| **PagerDuty**       | Incident management and escalation   |
| **OpsGenie**        | On-call scheduling and alerts        |
| **Microsoft Teams** | Enterprise team notifications        |
| **Webhook**         | Custom integrations                  |

## Setting Up Slack

1. Create a Slack incoming webhook:
   * Go to [api.slack.com/apps](https://api.slack.com/apps)
   * Create an app → Incoming Webhooks → Add to channel
   * Copy the webhook URL

2. Add to Kodo:
   ```bash theme={null}
   curl -X POST "https://kodostatus.com/api/v1/notifications/channels" \
     -H "X-API-Key: your_api_key" \
     -H "Content-Type: application/json" \
     -d '{
       "type": "slack",
       "name": "Engineering Alerts",
       "config": {
         "webhook_url": "https://hooks.slack.com/services/..."
       }
     }'
   ```

## Setting Up Discord

1. In your Discord server:
   * Right-click channel → Edit Channel → Integrations → Webhooks
   * Create Webhook → Copy URL

2. Add to Kodo:
   ```bash theme={null}
   curl -X POST "https://kodostatus.com/api/v1/notifications/channels" \
     -H "X-API-Key: your_api_key" \
     -d '{
       "type": "discord",
       "name": "Status Alerts",
       "config": {
         "webhook_url": "https://discord.com/api/webhooks/..."
       }
     }'
   ```

## Setting Up Email

```bash theme={null}
curl -X POST "https://kodostatus.com/api/v1/notifications/channels" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "type": "email",
    "name": "On-call Team",
    "config": {
      "emails": ["oncall@example.com", "team@example.com"]
    }
  }'
```

## Setting Up PagerDuty

1. In PagerDuty:
   * Go to Services → Select Service → Integrations
   * Add Integration → Events API v2
   * Copy the Integration Key

2. Add to Kodo:
   ```bash theme={null}
   curl -X POST "https://kodostatus.com/api/v1/notifications/channels" \
     -H "X-API-Key: your_api_key" \
     -d '{
       "type": "pagerduty",
       "name": "On-call",
       "config": {
         "routing_key": "your_integration_key"
       }
     }'
   ```

## Testing Channels

Always test new channels:

```bash theme={null}
curl -X POST "https://kodostatus.com/api/v1/notifications/channels/ch_abc123/test" \
  -H "X-API-Key: your_api_key"
```

## Notification Events

Choose which events trigger notifications:

| Event                    | Description                   |
| ------------------------ | ----------------------------- |
| `incident.created`       | New incident created          |
| `incident.updated`       | Incident status changed       |
| `incident.resolved`      | Incident resolved             |
| `service.status_changed` | Service status updated        |
| `monitor.down`           | Monitor detected downtime     |
| `monitor.recovered`      | Monitor back online           |
| `ssl.expiring`           | SSL certificate expiring soon |
| `domain.expiring`        | Domain registration expiring  |

## Channel Priorities

Configure notification urgency per channel:

* **Critical** - PagerDuty, phone calls
* **High** - Slack #incidents, email
* **Normal** - Slack #status, Discord
* **Low** - Email digest
