# Get a single Slack integration

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

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

[[path_param]]
name = "id"
description = "The ID of the Slack 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 Slack integration.'''
body = '''{
  "data": {
    "id": "188",
    "type": "slack_integration",
    "attributes": {
      "team_id": "t123456",
      "team_name": "My team",
      "applications": [
        { "application_id": 1234, "environments": ["production"] }
      ],
      "notifications": {
        "spikes": true,
        "spike_protection": true,
        "new_releases": true,
        "new_errors": true,
        "occurrence_milestones": true,
        "occurrence_threshold": false,
        "affected_users_threshold": true,
        "automatically_reopened": false
      },
      "occurrence_threshold_count": 10,
      "occurrence_threshold_interval": "minute",
      "affected_users_threshold_count": 50,
      "tag_filter": [
        { "tag": "level", "values": ["error", "fatal"] }
      ],
      "slack_team_name": "My Slack workspace",
      "slack_channel_name": "#errors",
      "post_updates": "thread_based",
      "broadcast_updates": true,
      "ai_sre_on_mention": true
    }
  }
}'''

[[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 Slack integration, the same as in the URL of its **Configure** page."

[[param]]
name = "type"
type = "string"
description = "Always `slack_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.applications"
type = "array of objects"
description = "The applications whose errors the integration handles. Empty means any application."

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

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

[[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.slack_team_name"
type = "string"
description = "The name of the connected Slack workspace. Read-only."

[[param]]
name = "attributes.slack_channel_name"
type = "string"
description = "The name of the connected Slack channel. Read-only."

[[param]]
name = "attributes.post_updates"
type = "string"
description = "`single_channel` posts every update to the channel, `thread_based` posts new errors to the channel and their updates in a thread."

[[param]]
name = "attributes.broadcast_updates"
type = "boolean"
description = "Whether important updates in a thread are also sent to the channel: resolved and re-opened errors, spikes and occurrence milestones. Applies when `post_updates` is `thread_based`."

[[param]]
name = "attributes.ai_sre_on_mention"
type = "boolean"
description = "Whether to start an AI SRE conversation when Better Stack is tagged."
[/params]

#### Example cURL

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