Alerts
Alert endpoints deliver messages to connected Slack, Discord, and Microsoft Teams destinations. Use these endpoints from trusted server-side systems only.
Slack Alert
POST /v2/slack/send
Sends a new message to a connected Slack channel.
Required Headers
x-api-key: YOUR_API_KEY
x-api-secret: YOUR_API_SECRET
Content-Type: application/json
Request
curl --request POST \
--url https://api.usealerta.com/v2/slack/send \
--header "content-type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--header "x-api-secret: YOUR_API_SECRET" \
--data '{
"channel": "alerts",
"message": "Database replication lag exceeded threshold.",
"replyTo": false
}'
Response
{
"statusCode": 200,
"message": "Message sent successfully",
"data": {
"replyData": ""
}
}
Discord Alert
POST /v2/discord/send
Sends a new message to a connected Discord channel.
Request
curl --request POST \
--url https://api.usealerta.com/v2/discord/send \
--header "content-type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--header "x-api-secret: YOUR_API_SECRET" \
--data '{
"channelRef": "C_ALT_ABC123",
"message": "Database replication lag exceeded threshold."
}'
Response
{
"statusCode": 200,
"message": "Message sent successfully",
"data": {
"replyData": {
"channelId": "123456789012345678",
"messageId": "1492962136463249598"
}
}
}
Microsoft Teams Alert
POST /v2/teams/send
Sends a new message to a connected Microsoft Teams channel.
Request
curl --request POST \
--url https://api.usealerta.com/v2/teams/send \
--header "content-type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--header "x-api-secret: YOUR_API_SECRET" \
--data '{
"channelRef": "C_ALT_TEAMS123",
"title": "Database Alert",
"message": "Database replication lag exceeded threshold."
}'
Response
{
"statusCode": 200,
"message": "Message sent successfully",
"data": {
"replyData": ""
}
}
Common Fields
| Field | Description |
|---|---|
message | Main alert body |
title | Short alert title when supported by the provider |
channel | Slack channel name or configured Slack destination |
channelRef | Alerta channel reference for Discord and Teams destinations |
replyTo | Whether the response should include reply-ready provider metadata |
Delivery Guidance
- keep messages short enough to scan in chat
- include the system, environment, and severity
- include a runbook or dashboard link when possible
- avoid sending secrets or sensitive payloads in alert text