Channels

Send a test notification

Delivers a test through the channel right away and returns when it was accepted. A successful test clears the failure count and, with enable, turns a disabled channel back on. A failed test (422 CHANNEL_TEST_FAILED) doesn't count towards turning it off. SMS and voice tests use the team's notification credits (422 NOTIFICATION_CREDITS_EXHAUSTED without them). Limited to 10 tests a minute per token.

post/channels/{channel}/test

Request

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

Path parameters

channelstring uuid required

Channel ID.

Request body

enableboolean

Enable the channel again when the test succeeds, also after Spectate turned it off. Default false

Response

The test was delivered.

messagestring required

What was sent

Example response

{
  "message": "Test notification sent",
  "channel": {
    "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.