Requests And Responses
Alerta API requests use JSON request bodies and JSON responses.
Headers
x-api-key: YOUR_API_KEY
x-api-secret: YOUR_API_SECRET
Content-Type: application/json
Request Shape
POST /v2/discord/send
{
"channelRef": "C_ALT_EXAMPLE",
"message": "Database replication lag exceeded threshold."
}
Successful Response Shape
Successful responses include the delivery result and any provider metadata needed for follow-up actions.
{
"statusCode": 200,
"message": "Message sent successfully",
"data": {
"replyData": ""
}
}
Error Response Shape
{
"statusCode": 401,
"message": "Authentication failed",
"error": "Unauthorized"
}
Copy-Friendly cURL Template
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_EXAMPLE",
"message": "Database replication lag exceeded threshold."
}'