Channels

Create a channel

Send type and the settings object of that type, for example type: "email" with email: {address}. Webhook URLs must be public addresses. Slack channels post through a Slack workspace connected under Integrations in the dashboard, Telegram channels are connected there too. Create channels before the escalation paths that use them.

post/channels

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Request body

namestring required

Name shown in escalation paths

type'email' | 'slack' | 'discord' | 'microsoft_teams' | 'telegram' | 'webhook' | 'pushover' | 'sms' | 'voice' required
enabledboolean

Whether it delivers from the start. Default true

Example request

{
  "name": "On-call email",
  "email": {
    "address": "oncall@example.com"
  },
  "slack": {
    "channel": "C0123456789",
    "channel_name": "#alerts"
  },
  "discord": {
    "webhook_url": "https://discord.com/api/webhooks/123/abc"
  },
  "microsoft_teams": {
    "webhook_url": "https://discord.com/api/webhooks/123/abc"
  },
  "webhook": {
    "url": "https://hooks.example.com/spectate",
    "headers": [
      {
        "key": "Authorization",
        "value": "Bearer s3cr3t"
      }
    ]
  },
  "pushover": {
    "user_key": "uQiRzpo4DXghDmr9QzzfQu27cmVRsG",
    "api_token": "azGDORePK8gMaC0QOYAMyEEuzJnyUi",
    "priority": 1
  },
  "sms": {
    "phone_number": "+31612345678"
  },
  "voice": {
    "phone_number": "+31612345678"
  }
}

Response

The new channel.

idstring uuid required

Channel ID

namestring required

Name shown in escalation paths

type'email' | 'slack' | 'discord' | 'microsoft_teams' | 'telegram' | 'webhook' | 'pushover' | 'sms' | 'voice' required
enabledboolean required

Whether the channel delivers. false when a member turned it off or Spectate did after repeated failures (auto_disabled)

auto_disabledboolean required

Whether Spectate turned the channel off because deliveries kept failing. Fix the cause, then enable it or send a test with enable

disabled_atstring date-time nullable required

When the channel was turned off automatically

disabled_reasonstring nullable required

Why it was turned off automatically

consecutive_failuresinteger required

Failed deliveries since the last successful one

failing_sincestring date-time nullable required

Since when deliveries fail

last_failure_atstring date-time nullable required

When a delivery last failed

last_failure_reasonstring nullable required

Why the last delivery failed

last_delivered_atstring date-time nullable required

When a delivery last succeeded

created_atstring date-time required

When the channel was created

Example response

{
  "name": "On-call email",
  "email": {
    "address": "oncall@example.com"
  },
  "slack": {
    "channel": "C0123456789",
    "channel_name": "#alerts"
  },
  "telegram": {
    "chat_id": "-1001234567890",
    "chat_title": "Ops alerts"
  },
  "webhook": {
    "host": "hooks.example.com"
  },
  "pushover": {
    "user_key": "uQiRzpo4DXghDmr9QzzfQu27cmVRsG",
    "priority": 1
  },
  "sms": {
    "phone_number": "+31612345678"
  },
  "voice": {
    "phone_number": "+31612345678"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.