Skip to main content

Microsoft Teams

Send and reply to Microsoft Teams alerts via the Alerta v2 API.

Endpoints

MethodPathPurpose
POST/v2/teams/sendSend a new Teams message
POST/v2/teams/replyReply to an existing Teams message

Send a Teams Alert

POST /v2/teams/send

Required Fields

  • channelRef
  • title
  • message
curl --request POST \
--url https://api.alerta.encrisoft.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."
}'

Sample Response

{
"statusCode": 200,
"message": "Message sent successfully",
"data": {
"messageId": "teams-message-id",
"balance": 90
}
}

Reply To A Teams Message

POST /v2/teams/reply

Required Fields

  • channelRef
  • requestRef
  • title
  • message
curl --request POST \
--url https://api.alerta.encrisoft.com/v2/teams/reply \
--header "content-type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--header "x-api-secret: YOUR_API_SECRET" \
--data '{
"channelRef": "TB_ALT_ZBYD6W5YN0450H4W",
"requestRef": "TBR_ALT_JN26IOOVAKECSKUN",
"title": "Transaction Alert Matthew",
"message": "A suspicious transaction was detected new reply"
}'

Sample Response

{
"success": true,
"message": "Teams reply sent successfully.",
"requestRef": "TBR_ALT_JN26IOOVAKECSKUN",
"replyRef": "TBR_ALT_...",
"sentAt": "2026-06-19T10:32:00.000Z"
}

Common Errors

{
"statusCode": 403,
"message": "Missing API key"
}
{
"statusCode": 403,
"message": "Missing API secret"
}
{
"statusCode": 403,
"message": "Invalid API key"
}
{
"statusCode": 403,
"message": "Invalid API secret"
}
{
"statusCode": 403,
"message": "Organization is inactive"
}
{
"statusCode": 400,
"message": "Invalid Channel reference"
}

Teams Notes

  • Teams send and reply use channelRef.
  • Teams replies require the Alerta requestRef returned by the original send request.
  • channelRef is an internal Alerta reference, not the Teams channel name or ID.