# Get a single Microsoft Teams integration

Returns a single Microsoft Teams integration with the settings of its **Configure** page.

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

[[path_param]]
name = "id"
description = "The ID of the Microsoft Teams integration, the number in the URL of its **Configure** page."
required = true
type = "string"

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

[responses]
[[response]]
status = 200
description = '''Returns the requested Microsoft Teams integration.'''
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" }
          ]
        }
      ]
    }
  }
}'''

[[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"
}'''

[[response]]
status = 404
description = '''Not Found'''
body = '''{
  "errors": "Resource with the provided ID was not found"
}'''
[/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."
[/params]

#### Example cURL

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