# List all Slack integrations

Lists the Slack 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/slack-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 Slack integrations.'''
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
      }
    }
  ],
  "pagination": {
    "first": "https://errors.betterstack.com/api/v1/slack-integrations?page=1",
    "last": "https://errors.betterstack.com/api/v1/slack-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 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."

[[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/slack-integrations \
  --header "Authorization: Bearer $TOKEN"
```
