Hookbase
Docs
GuideAPI ReferenceIntegrationsUse CasesCLIMCP
Getting StartedSDK ReferencePortal ComponentsAPI Reference
Get Started

API Reference

OverviewAPI ExplorerAuthenticationAPI Keys

Core Endpoints

SourcesDestinationsRoutesEventsDeliveriesDelivery ClustersTransformsFiltersSchemasWebhook IngestAnalytics

Development Tools

TunnelsCron JobsCron GroupsScheduled Sends

Administration

Custom DomainsAudit LogsNotification ChannelsAlert RulesRedaction PoliciesObservability Export
DocsReceiveAPINotification Channels

Notification Channels API

Notification channels define where alerts are sent when route failures, recoveries, or other events occur.

Endpoints

MethodPathDescription
GET/api/notification-channelsList channels
POST/api/notification-channelsCreate channel
GET/api/notification-channels/{id}Get channel
PATCH/api/notification-channels/{id}Update channel
DELETE/api/notification-channels/{id}Delete channel
POST/api/notification-channels/{id}/testSend test notification

Notification Channel Object

{
  "id": "nch_abc123",
  "name": "Slack #alerts",
  "type": "slack",
  "config": {
    "webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx"
  },
  "enabled": true,
  "lastNotifiedAt": "2024-01-15T10:30:00Z",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

Channel Types

Slack

{
  "type": "slack",
  "config": {
    "webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx"
  }
}

Microsoft Teams

{
  "type": "teams",
  "config": {
    "webhookUrl": "https://outlook.office.com/webhook/..."
  }
}

Discord

{
  "type": "discord",
  "config": {
    "webhookUrl": "https://discord.com/api/webhooks/..."
  }
}

PagerDuty

{
  "type": "pagerduty",
  "config": {
    "routingKey": "your-pagerduty-routing-key",
    "severity": "critical"
  }
}

PagerDuty severity options: critical, error, warning, info

Email

{
  "type": "email",
  "config": {
    "addresses": ["[email protected]", "[email protected]"]
  }
}

Webhook

{
  "type": "webhook",
  "config": {
    "url": "https://yourapp.com/hookbase-alerts",
    "headers": {
      "Authorization": "Bearer your-secret"
    }
  }
}

List Channels

GET /api/notification-channels

Example

curl https://api.hookbase.app/api/notification-channels \
  -H "Authorization: Bearer whr_your_api_key"

Response

{
  "data": [
    {
      "id": "nch_abc123",
      "name": "Slack #alerts",
      "type": "slack",
      "enabled": true,
      "lastNotifiedAt": "2024-01-15T10:30:00Z"
    }
  ]
}

Create Channel

POST /api/notification-channels

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name
typestringYesChannel type: slack, teams, discord, pagerduty, email, webhook
configobjectYesType-specific configuration
enabledbooleanNoActive status (default: true)

Example

curl -X POST https://api.hookbase.app/api/notification-channels \
  -H "Authorization: Bearer whr_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Slack #alerts",
    "type": "slack",
    "config": {
      "webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx"
    }
  }'

Response

{
  "id": "nch_new123",
  "name": "Slack #alerts",
  "type": "slack",
  "config": {
    "webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx"
  },
  "enabled": true,
  "createdAt": "2024-01-15T10:30:00Z"
}

Get Channel

GET /api/notification-channels/{id}

Returns the full channel object.

Update Channel

PATCH /api/notification-channels/{id}

Request Body

FieldTypeDescription
namestringDisplay name
configobjectType-specific configuration
enabledbooleanActive status

Delete Channel

DELETE /api/notification-channels/{id}

Response

204 No Content

Test Channel

Send a test notification to verify the channel is configured correctly.

POST /api/notification-channels/{id}/test

Example

curl -X POST https://api.hookbase.app/api/notification-channels/nch_abc123/test \
  -H "Authorization: Bearer whr_your_api_key"

Response

{
  "success": true,
  "message": "Test notification sent to Slack #alerts"
}

Error Response

{
  "success": false,
  "error": "Failed to send notification: 403 Forbidden",
  "message": "Check that the webhook URL is correct and the integration is still active"
}

Error Responses

400 Bad Request

Invalid channel config:

{
  "error": "Bad Request",
  "message": "Slack webhook URL must start with https://hooks.slack.com/",
  "code": "INVALID_CONFIG"
}

Related

  • Notification Channels Guide — Setup and usage patterns
  • Routes API — Configure route notifications
PreviousAudit LogsNextAlert Rules

On this page

EndpointsNotification Channel ObjectChannel TypesSlackMicrosoft TeamsDiscordPagerDutyEmailWebhookList ChannelsExampleResponseCreate ChannelRequest BodyExampleResponseGet ChannelUpdate ChannelRequest BodyDelete ChannelResponseTest ChannelExampleResponseError ResponseError Responses400 Bad RequestRelated