Skip to main content

Microsoft Teams API

Use this page for Microsoft Teams-only public V2 endpoints.

Authentication

All Teams V2 public endpoints require:

  • x-api-key
  • x-api-secret
  • Content-Type: application/json

Base path:

/v2

Rate limit:

  • 180 requests / 60 seconds

Teams Routes

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

Send A Teams Message

POST /v2/teams/send

Required Fields

  • channelRef
  • title
  • message
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."
}'

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
  • teamId
  • channelId
  • messageId
  • title
  • message
curl --request POST \
--url https://api.usealerta.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": "C_ALT_TEAMS123",
"teamId": "team-id",
"channelId": "channel-id",
"messageId": "parent-message-id",
"title": "Reply",
"message": "Acknowledged, investigating now."
}'

Sample Response

{
"statusCode": 200,
"message": "Reply sent successfully",
"data": {
"balance": 80
}
}

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 teamId, channelId, and messageId.
  • channelRef is an internal Alerta reference, not the Teams channel name or ID.