Test Notification Channel
POST /notification_channels/{channel_id}/test
POST /notification_channels/{channel_id}/testInteractive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Path Parameters
Notification channel ID.
uuidResponse Body
application/json
application/json
application/json
curl -X POST "$AISIX_CP/notification_channels/$CHANNEL_ID/test" \ -H "Authorization: Bearer $AISIX_TOKEN"Probe ran; see `ok`.
{
"ok": true,
"error": "string"
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Resource not found.
{
"error": {
"code": "NOT_FOUND",
"message": "provider key not found"
}
}Complete operation details and schema variants
POST /notification_channels/{channel_id}/test
Test Notification Channel
Synchronously send a clearly-labeled test notification through
the channel and report the outcome. Always returns 200; the
body carries the verdict.
Parameters
channel_id(path, string, required): Notification channel ID.
Responses
-
200: Probe ran; seeok. -
ok(boolean, required): Whether the test send succeeded. -
error(string, optional): Failure detail whenokisfalse. -
401: Missing or invalid bearer. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
404: Resource not found. Response fields (application/json): identical toPOST /notification_channels/{channel_id}/test, response 401 above.
cURL
curl -X POST '$AISIX_CP/notification_channels/{channel_id}/test' -H 'Authorization: Bearer $AISIX_TOKEN'