Notification Destinations
Notification destinations define where and how you receive alerts. You can configure them at four levels: team-wide, per monitor, per tag, or per tag group.
Example request:
$ OHDEAR_TOKEN="your API token" $ curl https://ohdear.app/api/team-notification-destinations \ -H "Authorization: Bearer $OHDEAR_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json'
All endpoints below follow the same authentication pattern.
Destination response fields #
Every notification destination endpoint returns an object with these fields:
{ "id": 1, "label": "Primary alerts", "team_id": 1, "channel": "mail", "destination": { "mail": "[email protected]" }, "notification_types": [ "HttpUptimeCheckFailedNotification", "HttpUptimeCheckRecoveredNotification", "CertificateExpiresSoonNotification" ] }
id: unique identifier for the destinationlabel: custom label (if set)team_id: the team ID (only present for team-level destinations)channel: the notification channel (see supported channels)destination: channel-specific destination configuration (see channel destination formats)notification_types: array of notification type class names this destination receives (see available notification types)
For tag-level destinations, the response also includes a tag object. For tag-group-level destinations, it includes a tagGroup object.
List notification destinations #
Each level has its own list endpoint:
- Team-level:
GET /api/team-notification-destinations - Monitor-level:
GET /api/monitors/{monitorId}/notification-destinations - Tag-level:
GET /api/tags/notification-destinations - Tag-group-level:
GET /api/tag-groups/{tagGroupId}/notification-destinations
Each returns a list of destination objects.
Create a notification destination #
Each level has its own create endpoint:
- Team-level:
POST /api/team-notification-destinations/{teamId} - Monitor-level:
POST /api/monitors/{monitorId}/notification-destinations - Tag-level:
POST /api/tags/{tagId}/notification-destinations - Tag-group-level:
POST /api/tag-groups/{tagGroupId}/notification-destinations
Request body (JSON):
channel(string, required) -- the notification channel to use (see supported channels)destination(object, required) -- channel-specific fields (see channel destination formats)notification_types(array, optional) -- array of notification type class names. If omitted, all available notification types for the channel are enabledlabel(string, optional) -- a custom label for this destination (max 191 characters)test(boolean, optional) -- set totrueto send a test notification immediately after creation
Returns the destination object.
Update a notification destination #
Each level has its own update endpoint:
- Team-level:
PUT /api/team-notification-destinations/{teamId}/destination/{destinationId} - Monitor-level:
PUT /api/monitors/{monitorId}/notification-destinations/{destinationId} - Tag-level:
PUT /api/tags/{tagId}/notification-destinations/{destinationId} - Tag-group-level:
PUT /api/tag-groups/{tagGroupId}/notification-destinations/{destinationId}
The request body accepts the same fields as creation.
Returns the updated destination object.
Delete a notification destination #
Each level has its own delete endpoint:
- Team-level:
DELETE /api/team-notification-destinations/{teamId}/destination/{destinationId} - Monitor-level:
DELETE /api/monitors/{monitorId}/notification-destinations/{destinationId} - Tag-level:
DELETE /api/tags/{tagId}/notification-destinations/destination/{destinationId} - Tag-group-level:
DELETE /api/tag-groups/{tagGroupId}/notification-destinations/{destinationId}
Returns 204 No Content on success.
Supported channels #
Oh Dear supports these notification channels:
| Channel | Value |
|---|---|
mail |
|
| Slack | slackApi |
| Slack (Legacy) | slack |
| Discord | discord |
| Telegram | telegram |
| Microsoft Teams | microsoftTeamsWorkflow |
| Microsoft Teams (Legacy) | microsoftTeams |
| Google Chat | googleChat |
| PagerDuty | pagerDuty |
| Opsgenie | opsgenie |
| Pushover | pushover |
| SMS | sms |
| Webhooks | webhook |
Channel destination formats #
Each channel requires specific fields in the destination object.
Email:
{ "mail": "[email protected]" }
Slack (API):
{ "channel": "#ops-alerts", "slack_api_token": "xoxp-..." }
Slack (Legacy webhook):
{ "url": "https://hooks.slack.com/services/..." }
Discord:
{ "url": "https://discordapp.com/api/webhooks/..." }
Telegram:
{ "chat_id": "123456789" }
Microsoft Teams (Workflow):
{ "url": "https://..." }
Microsoft Teams (Legacy):
{ "url": "https://outlook.webhook.office.com/..." }
Google Chat:
{ "url": "https://chat.googleapis.com/v1/spaces/..." }
Opsgenie:
{ "apiKey": "...", "priority": "P3", "euEndpoint": false }
PagerDuty:
{ "apiKey": "...", "serviceId": "...", "fromEmail": "[email protected]" }
Webhooks:
{ "url": "https://example.com/webhook" }
SMS:
{ "to": "+1234567890", "from": "oh dear", "apiKey": "...", "apiSecret": "..." }
Pushover:
{ "userKey": "...", "apiToken": "...", "priority": "0" }
Available notification types #
You can control exactly which notifications a destination receives by passing an array of notification type class names. Here are all available types, grouped by check:
Uptime:
HttpUptimeCheckFailedNotification, HttpUptimeCheckRecoveredNotification, PingUptimeCheckFailedNotification, PingUptimeCheckRecoveredNotification, TcpUptimeCheckFailedNotification, TcpUptimeCheckRecoveredNotification
Certificate health:
CertificateExpiresSoonNotification, CertificateFixedNotification, CertificateHasChangedNotification, CertificateUnhealthyNotification
Broken links:
BrokenLinksFoundNotification, BrokenLinksFixedNotification
Mixed content:
MixedContentFoundNotification, MixedContentFixedNotification
Performance:
PerformanceThresholdExceededNotification, PerformanceThresholdRecoveredNotification, PerformanceDeltaExceededNotification
Lighthouse:
LighthouseIssuesDetectedNotification, LighthouseIssuesFixedNotification
Cron jobs:
CronNotExecutedOnTimeNotification, CronFailedNotification
Sitemap:
SitemapIssuesFoundNotification, SitemapIssuesFixedNotification
DNS:
DnsIssuesFoundNotification, DnsIssuesFixedNotification, DnsRecordsChangedNotification
DNS blocklist:
DnsBlocklistIssuesFoundNotification, DnsBlocklistIssuesFixedNotification
Application health:
ApplicationHealthClientErrorNotification, ApplicationHealthResultsTooOldNotification, ApplicationHealthProblemDetectedNotification, ApplicationHealthProblemFixedNotification
Domain:
DomainIssuesFoundNotification, DomainIssuesFixedNotification
Port scanning:
PortsCheckFailedNotification, PortsCheckRecoveredNotification
AI monitoring:
AiCheckSucceededNotification, AiCheckFailedNotification
Oh Dear system:
MonitorAddedNotification
MonitorAddedNotification type is not available for the Opsgenie and PagerDuty channels.
Feel free to reach out via [email protected] or on X via @OhDearApp if you have any other questions. We'd love to help!