CentralCSP
APIAlerts

Send a test alert

Sends a sample notification through the channel right away and reports the result. A failed send still answers 200, with ok: false and the destination's HTTP status.

Requires the manager role on the website and the alerting plan feature.

POST
/v1/workspaces/{workspaceId}/websites/{websiteId}/alerts/channels/{channelId}/test

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

websiteId*string

The website's id.

channelId*string

The alert channel's id.

Response Body

The outcome of a test send.

application/json
  1. response
ok*boolean

Whether the test notification went through.

status?|

HTTP status the destination replied with.

error?string

What went wrong, when ok is false.

Example Request
curl -X POST 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/alerts/channels/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/test'
Example Response
{  "ok": true,  "status": 0,  "error": "string"}