API for triggering notification manually
Endpoint
POST /api/events/settings/alertingChannels/notify/{id}
Use cases
- After you attempt to resolve an issue (manually or by using automation), you need to notify relevant stakeholders.
- This API allows users to manually trigger an alert channel within an event or incident.
Request payload
Refer to the following sample request payload:
{
"eventId": "eventIdToTriggerAlertFor",
"customPayloadFields": [
{
"type": "staticString",
"key": "hello",
"value": "world"
},
{
"type": "staticString",
"key": "alert",
"value": "payload"
}
]
}
Permissions
You need the canInvokeAlertChannel
permission to use the API.
Payload details
eventId
(string, required): The ID of the event associated with the alert.customPayloadFields
(array, optional): A list of key-value pairs to be included in the alert payload.- Each object in the array contains:
type
: Specifies the type of payload field (for example,staticString
).key
: The key name.value
: The corresponding value.
Expected response
- Success (200 OK): Alert channel triggered successfully.
- Error (400 Bad Request): Invalid request payload.
- Error (404 Not Found): Alert channel ID does not exist.
- Error (500 Internal Server Error): Unexpected server error.
Additional notes
- The
customPayloadFields
section is optional. - This API complements the existing
PUT /api/events/settings/alertingChannels/{id}
API for testing alert channels. - Ensure that the alert channel ID is valid before making a request.