Create a Slack integration

Create a Slack integration for incidents. You'll get a link back to open in your browser and finish setting up the integration.

POST https://incidents.betterstack.com/api/v4/slack-integrations

Query parameters

team_id
string

Headers

Authorization
required string
202

Response body

{
  "data": {
    "id": "hD0Ms9nZ2Yd4mVq1pX7bL8cT3rF6wK5jA0eS9uG2iNy",
    "type": "integration_authorization",
    "attributes": {
      "integration_type": "slack",
      "status": "pending",
      "status_reason": null,
      "authorization_url": "https://uptime.betterstack.com/team/t123/integrations/slack/authorize?authorization_id=hD0Ms9nZ2Yd4mVq1pX7bL8cT3rF6wK5jA0eS9uG2iNy&product=uptime",
      "expires_at": "2026-11-24T16:30:00.000Z",
      "integration_id": null,
      "team_id": "t123"
    }
  }
}
401

Response body

{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
403

Response body

{
  "errors": "This API token is read-only and cannot be used for write operations."
}
503

Response body

{
  "errors": "Slack couldn't be connected. Please try again later."
}

Response attributes

id
string
type
string
integration_type
string
status
string
status_reason
string or null
authorization_url
string or null
expires_at
datetime
integration_id
string or null
team_id
string

Example cURL

Connect Slack
curl --request POST \
  --url https://incidents.betterstack.com/api/v4/slack-integrations \
  --header "Authorization: Bearer $TOKEN"