Channels

Update a channel

Changes only the fields you send. The settings object of the channel's type replaces the current settings, including secrets: send them again. Other types' objects are refused (422); create a new channel to change the type. Enabling clears an automatic disable.

patch/channels/{channel}

Request

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

Path parameters

channelstring uuid required

Channel ID.

Request body

namestring

Name shown in escalation paths

enabledboolean

Turn delivery on or off. Turning it on clears an automatic disable and its failure count

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 updated 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.