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.

The business API lets you manage your Scrubbe workspace: onboarding new team members via invite links, configuring workspace settings, and setting up the Incident Management System (IMS) with notification preferences, SLA rules, and escalation policies. Business endpoints live under /api/v1/business; IMS configuration endpoints live under /api/v1/ims.

Business endpoints

POST /business/decode-invite

Public. Decode an invite token to retrieve metadata (invitee email, assigned role, workspace name) before the user accepts. Use this to pre-fill a registration or acceptance form.
token
string
required
The invite token from the invitation email or link.
{
  "success": true,
  "message": "Invite decoded.",
  "data": {
    "email": "teammate@example.com",
    "role": "ENGINEER",
    "businessName": "Acme Corp",
    "expiresAt": "2025-06-15T00:00:00Z"
  }
}

POST /business/accept-invite

Public. Accept a workspace invitation. If the invitee already has a Scrubbe account, this links the invite to their existing account; otherwise, a new account is created.
token
string
required
The invite token from the invitation email.
password
string
Required if creating a new account during acceptance.
firstName
string
Required for new account creation.
lastName
string
Required for new account creation.

PUT /business/setup

Protected. Complete initial workspace configuration after registration. Requires Authorization: Bearer <accessToken>.
businessName
string
required
The display name for the workspace.
industry
string
The industry or sector for the workspace.
size
string
Team size range. Example: "11-50".
timezone
string
IANA timezone string for the workspace. Example: "America/New_York".

GET /business/get_members

Protected. Retrieve all members of the authenticated user’s workspace.
{
  "success": true,
  "message": "Members retrieved.",
  "data": [
    {
      "id": "usr_01HX...",
      "email": "teammate@example.com",
      "firstName": "Sam",
      "lastName": "Rivera",
      "role": "ENGINEER",
      "level": "Senior",
      "accessPermissions": ["incidents", "postmortems"],
      "status": "ACTIVE"
    }
  ]
}

POST /business/send-invite

Protected. Send a workspace invitation to a new team member. The invitee receives an email with a link containing the invite token.
email
string
required
Email address of the person to invite.
role
string
required
Role to assign. One of: ADMIN, ENGINEER, VIEWER.
accessPermissions
string[]
required
Features the invitee will have access to. Example: ["incidents", "postmortems"].
level
string
Seniority or team level. Example: "Senior".
curl --request POST \
  --url "https://your-api-domain.com/api/v1/business/send-invite" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --data '{
    "email": "teammate@example.com",
    "role": "ENGINEER",
    "accessPermissions": ["incidents", "postmortems"],
    "level": "Senior"
  }'
{
  "success": true,
  "message": "Invitation sent successfully.",
  "data": {
    "inviteId": "inv_01HX...",
    "email": "teammate@example.com",
    "expiresAt": "2025-06-15T00:00:00Z"
  }
}
Invitations expire after 7 days. You can re-send an invite to the same email address after the previous one expires or if it was never accepted.

IMS configuration endpoints

The Incident Management System (IMS) controls notification routing, SLA enforcement, escalation behaviour, and timezone settings for your workspace. All IMS endpoints require Authorization: Bearer <accessToken> and live under /api/v1/ims.

POST /ims/setup

Perform the initial IMS configuration for the workspace. Called once during onboarding.
alertEmail
string
required
Email address that receives incident alert notifications.
slackChannel
string
Slack channel name or ID for incident notifications. Example: "#incidents".
slaEnabled
boolean
default:"false"
Whether SLA tracking and breach alerts are active.
autoEscalate
boolean
default:"false"
Automatically escalate incidents that breach SLA thresholds.
notifyOnCreate
boolean
default:"true"
Send notifications when a new incident is created.
notifyOnResolve
boolean
default:"true"
Send notifications when an incident is resolved.
timezone
string
required
IANA timezone string for SLA calculations and scheduled reports. Example: "Europe/London".

GET /ims/config

Retrieve the current IMS configuration for the workspace.
{
  "success": true,
  "message": "IMS configuration retrieved.",
  "data": {
    "alertEmail": "oncall@example.com",
    "slackChannel": "#incidents",
    "slaEnabled": true,
    "autoEscalate": false,
    "notifyOnCreate": true,
    "notifyOnResolve": true,
    "timezone": "America/New_York"
  }
}

PUT /ims/config

Update one or more IMS configuration fields. Only the fields you include are modified.
alertEmail
string
Updated alert email address.
slackChannel
string
Updated Slack channel.
slaEnabled
boolean
Enable or disable SLA tracking.
autoEscalate
boolean
Enable or disable automatic escalation.
notifyOnCreate
boolean
Toggle creation notifications.
notifyOnResolve
boolean
Toggle resolution notifications.
timezone
string
Updated IANA timezone string.
All SLA calculations and scheduled digest emails use the timezone value from your IMS config. Update this if your team moves to a different region.