Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.scrubbe.com/llms.txt

Use this file to discover all available pages before exploring further.

Scrubbe integrations connect your existing toolchain to the incident management pipeline. Each integration follows the same general pattern: initiate an OAuth flow or supply credentials, handle the provider callback, and optionally register a webhook for real-time event delivery. All endpoints require Authorization: Bearer <accessToken> unless noted, and live under /api/v1/integrations.

Slack

POST /integrations/slack/connect

Initiate the Slack OAuth flow. Returns a redirect URL that takes the user to Slack’s authorization page.
{
  "success": true,
  "message": "Slack OAuth URL generated.",
  "data": {
    "authUrl": "https://slack.com/oauth/v2/authorize?client_id=..."
  }
}

GET /integrations/slack/oauth/callback

OAuth callback. Slack redirects to this URL after the user grants access. Exchanges the authorization code for a workspace token and stores the integration.
code
string
required
Authorization code provided by Slack.
state
string
required
CSRF state token returned by Slack to verify the request origin.
This endpoint is called automatically by Slack during the OAuth redirect. You do not need to call it directly from your application code.

POST /integrations/slack/webhook

Register or update the Slack webhook endpoint used for receiving notifications from Scrubbe in a Slack channel.
webhookUrl
string
required
The Slack Incoming Webhook URL.
channel
string
Override the default channel from the webhook URL. Example: "#incidents".

GitHub

POST /integrations/github/connect

Initiate the GitHub OAuth App flow. Returns the GitHub authorization URL.
{
  "success": true,
  "message": "GitHub OAuth URL generated.",
  "data": {
    "authUrl": "https://github.com/login/oauth/authorize?client_id=..."
  }
}

GET /integrations/github/callbacks/github

OAuth callback. GitHub redirects here after the user authorizes the app. Completes token exchange and stores the integration.
code
string
required
Authorization code from GitHub.
state
string
required
State token for CSRF verification.

POST /integrations/github/webhook

Register a GitHub webhook so Scrubbe receives push, pull request, and deployment events.
repoFullName
string
required
The repository to watch. Example: "acme/api-service".
events
string[]
GitHub event types to subscribe to. Defaults to ["push", "pull_request", "deployment_status"].

GET /integrations/github/repos

List all GitHub repositories accessible with the connected GitHub account.
{
  "success": true,
  "message": "Repositories retrieved.",
  "data": [
    {
      "id": 123456,
      "fullName": "acme/api-service",
      "defaultBranch": "main",
      "private": true
    }
  ]
}

GitLab

POST /integrations/gitlab/connect

Initiate the GitLab OAuth flow.
{
  "success": true,
  "message": "GitLab OAuth URL generated.",
  "data": {
    "authUrl": "https://gitlab.com/oauth/authorize?client_id=..."
  }
}

GET /integrations/gitlab/callback

OAuth callback. GitLab redirects here to complete the authorization flow.
code
string
required
Authorization code from GitLab.
state
string
required
State token for CSRF verification.

POST /integrations/gitlab/webhook

Register a GitLab webhook for push, merge request, and pipeline events.
projectId
string
required
The GitLab project ID or path. Example: "42" or "acme/api-service".
events
string[]
GitLab event types to subscribe to. Defaults to ["push", "merge_requests", "pipeline"].

GET /integrations/gitlab/projects

List all GitLab projects accessible with the connected account.
{
  "success": true,
  "message": "Projects retrieved.",
  "data": [
    {
      "id": "42",
      "name": "api-service",
      "pathWithNamespace": "acme/api-service",
      "defaultBranch": "main"
    }
  ]
}

Google Meet

POST /integrations/google/meet/connect

Initiate the Google OAuth flow to enable automatic Google Meet link generation for incident war rooms.
{
  "success": true,
  "message": "Google OAuth URL generated.",
  "data": {
    "authUrl": "https://accounts.google.com/o/oauth2/v2/auth?..."
  }
}

GET /integrations/google/meet/oauth/callback

OAuth callback. Google redirects here after authorization to complete the token exchange.
code
string
required
Authorization code from Google.
state
string
required
State token for CSRF verification.

SMS and WhatsApp

POST /integrations/sms/connect

Connect an SMS provider to enable text message alerts for on-call engineers.
phoneNumber
string
required
E.164 formatted phone number to receive SMS alerts. Example: "+14155552671".
provider
string
SMS provider to use. Example: "twilio".

POST /integrations/whatsapp/connect

Connect a WhatsApp number for incident notifications.
phoneNumber
string
required
E.164 formatted WhatsApp number. Example: "+14155552671".
The WhatsApp number must be registered with the Scrubbe business account in the WhatsApp Business API before connecting.

List integrations

GET /integrations/:userId

List all active integrations for a given user.
userId
string
required
The ID of the user whose integrations to retrieve.
{
  "success": true,
  "message": "Integrations retrieved.",
  "data": [
    {
      "id": "int_01HX...",
      "type": "SLACK",
      "status": "ACTIVE",
      "connectedAt": "2025-03-10T08:00:00Z"
    },
    {
      "id": "int_02HX...",
      "type": "GITHUB",
      "status": "ACTIVE",
      "connectedAt": "2025-04-01T12:30:00Z"
    }
  ]
}
data[].type
string
Integration type. One of: SLACK, GITHUB, GITLAB, GOOGLE_MEET, SMS, WHATSAPP.
data[].status
string
Connection status. One of: ACTIVE, DISCONNECTED, ERROR.