# List all Microsoft Teams integrations

Lists the Microsoft Teams integrations of Errors, with the settings of their **Configure** pages. Connect and remove them in **Errors** → [Integrations](https://errors.betterstack.com/team/0/integrations/ ";_blank")

[endpoint]
base_url = "https://errors.betterstack.com"
path = "/api/v1/microsoft-teams-integrations"
method = "GET"

[[query_param]]
name = "team_name"
description = "Filter integrations belonging to a specified team when using [global API token](https://betterstack.com/docs/errors/api/getting-api-token/#get-a-global-api-token)."
required = false
type = "string"

[[query_param]]
name = "page"
description = "The page number to return, starting with `1`."
required = false
type = "integer"

[[query_param]]
name = "per_page"
description = "Number of results per page. Defaults to `50`, maximum `250`."
required = false
type = "integer"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns a paginated list of Microsoft Teams integrations.'''
body = '''{
  "data": [
    {
      "id": "55",
      "type": "microsoft_teams_integration",
      "attributes": {
        "team_id": "t123456",
        "team_name": "My team",
        "notifications": {
          "spikes": true,
          "spike_protection": true,
          "new_releases": true,
          "new_errors": true,
          "occurrence_milestones": true,
          "occurrence_threshold": false,
          "affected_users_threshold": false,
          "automatically_reopened": false
        },
        "occurrence_threshold_count": 10,
        "occurrence_threshold_interval": "minute",
        "affected_users_threshold_count": 10,
        "tag_filter": [],
        "microsoft_teams_team_name": "Engineering",
        "microsoft_teams_channel_name": "General",
        "routes": [
          {
            "applications": [
              { "application_id": 1234, "environments": ["production"] }
            ],
            "channels": [
              { "id": "19:a1b2c3d4e5f6@thread.tacv2", "name": "Checkout errors" }
            ]
          },
          {
            "applications": [],
            "channels": [
              { "id": "19:f6e5d4c3b2a1@thread.tacv2", "name": "General" }
            ]
          }
        ]
      }
    }
  ],
  "pagination": {
    "first": "https://errors.betterstack.com/api/v1/microsoft-teams-integrations?page=1",
    "last": "https://errors.betterstack.com/api/v1/microsoft-teams-integrations?page=1",
    "prev": null,
    "next": null
  }
}'''

[[response]]
status = 401
description = '''Unauthorized'''
body = '''{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}'''
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the Microsoft Teams integration, the same as in the URL of its **Configure** page."

[[param]]
name = "type"
type = "string"
description = "Always `microsoft_teams_integration`."

[[param]]
name = "attributes.team_id"
type = "string"
description = "The ID of the team the integration belongs to, like `t123`."

[[param]]
name = "attributes.team_name"
type = "string"
description = "The name of the team the integration belongs to."

[[param]]
name = "attributes.notifications"
type = "object"
description = "The **Notify me when** toggles of the integration's **Configure** page, each `true` when on."

[[param]]
name = "attributes.notifications.spikes"
type = "boolean"
description = "Notify when an application has a spike in errors."

[[param]]
name = "attributes.notifications.spike_protection"
type = "boolean"
description = "Notify when spike protection starts sampling exceptions."

[[param]]
name = "attributes.notifications.new_releases"
type = "boolean"
description = "Notify when a new release is observed."

[[param]]
name = "attributes.notifications.new_errors"
type = "boolean"
description = "Notify when a new error occurs."

[[param]]
name = "attributes.notifications.occurrence_milestones"
type = "boolean"
description = "Notify when an error reaches an occurrence milestone: 10, 100, 200, 500 and so on."

[[param]]
name = "attributes.notifications.occurrence_threshold"
type = "boolean"
description = "Notify when an error occurs `occurrence_threshold_count` times within one `occurrence_threshold_interval`."

[[param]]
name = "attributes.notifications.affected_users_threshold"
type = "boolean"
description = "Notify when an error reaches `affected_users_threshold_count` affected users in total."

[[param]]
name = "attributes.notifications.automatically_reopened"
type = "boolean"
description = "Notify when an error is automatically re-opened."

[[param]]
name = "attributes.occurrence_threshold_count"
type = "integer"
description = "How many occurrences within `occurrence_threshold_interval` trigger `notifications.occurrence_threshold`."

[[param]]
name = "attributes.occurrence_threshold_interval"
type = "string"
description = "The interval of the occurrence threshold: `minute`, `hour`, `day`, or `week`."

[[param]]
name = "attributes.affected_users_threshold_count"
type = "integer"
description = "How many affected users in total trigger `notifications.affected_users_threshold`."

[[param]]
name = "attributes.tag_filter"
type = "array of objects"
description = "Send messages only for errors whose exceptions have matching tags. Empty means every error."

[[param]]
name = "attributes.tag_filter[].tag"
type = "string"
description = "The tag to match, like `level` or `environment`."

[[param]]
name = "attributes.tag_filter[].values"
type = "array of strings"
description = "The values the tag matches. Any of them matches."

[[param]]
name = "attributes.microsoft_teams_team_name"
type = "string"
description = "The Microsoft Teams team the Better Stack app was added to. Read-only."

[[param]]
name = "attributes.microsoft_teams_channel_name"
type = "string"
description = "The channel the Better Stack app was added to. Read-only."

[[param]]
name = "attributes.routes"
type = "array of objects"
description = "Which applications' errors go to which channels. An application in no route gets no messages, unless a route has an empty `applications`. Empty sends every error to the channel the Better Stack app was added to."

[[param]]
name = "attributes.routes[].applications"
type = "array of objects"
description = "The applications whose errors the route sends. Empty means any application."

[[param]]
name = "attributes.routes[].applications[].application_id"
type = "integer"
description = "The ID of the error tracking application."

[[param]]
name = "attributes.routes[].applications[].environments"
type = "array of strings"
description = "The environments of the application the route sends. Empty means every environment."

[[param]]
name = "attributes.routes[].channels"
type = "array of objects"
description = "The channels the route posts into."

[[param]]
name = "attributes.routes[].channels[].id"
type = "string"
description = "The Microsoft Teams ID of the channel, also in the channel's link in Microsoft Teams."

[[param]]
name = "attributes.routes[].channels[].name"
type = "string"
description = "The name of the channel."

[[param]]
name = "pagination.first"
type = "string"
description = "The URL of the first page. Read more about [pagination](https://betterstack.com/docs/errors/api/getting-api-token/#pagination)."

[[param]]
name = "pagination.last"
type = "string"
description = "The URL of the last page."

[[param]]
name = "pagination.prev"
type = "string or null"
description = "The URL of the previous page, or `null` on the first page."

[[param]]
name = "pagination.next"
type = "string or null"
description = "The URL of the next page, or `null` on the last page."
[/params]

#### Example cURL

```shell
[label Example]
curl --request GET \
  --url https://errors.betterstack.com/api/v1/microsoft-teams-integrations \
  --header "Authorization: Bearer $TOKEN"
```
