Slack Configuration

Get current Slack workspace configuration

get
Responses
200

Workspace configuration retrieved

application/json
get
GET /sfp/api/slack/workspace HTTP/1.1
Host: 
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "team_id": "T1234567890",
  "team_name": "My Company Workspace",
  "app_id": "A01234567890",
  "app_name": "SFP Bot",
  "bot_user_id": "U01234567890",
  "is_active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "created_by": "[email protected]",
  "has_bot_token": true,
  "has_app_token": true,
  "has_signing_secret": true
}

Create or update Slack workspace configuration

post
Body
team_idstringRequired

Slack workspace/team ID (starts with T)

Example: T1234567890Pattern: ^T[A-Z0-9]+$
team_namestringRequired

Name of the Slack workspace

Example: My Company Workspace
bot_tokenstringRequired

Bot User OAuth Token (starts with xoxb-)

Example: xoxb-EXAMPLE-TOKEN-DO-NOT-USEPattern: ^xoxb-
app_tokenstringRequired

App-Level Token for Socket Mode (starts with xapp-)

Example: xapp-EXAMPLE-APP-TOKEN-DO-NOT-USEPattern: ^xapp-
signing_secretstringRequired

Slack app signing secret for request verification

Example: EXAMPLE_SIGNING_SECRET_DO_NOT_USE
app_idstringOptional

Slack app ID

Example: A01234567890
app_namestringOptional

Display name of the Slack app

Example: SFP Bot
bot_user_idstringOptional

Bot user ID in the workspace

Example: U01234567890
Responses
201

Workspace configuration saved

application/json
post
POST /sfp/api/slack/workspace HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 279

{
  "team_id": "T1234567890",
  "team_name": "My Company Workspace",
  "bot_token": "xoxb-EXAMPLE-TOKEN-DO-NOT-USE",
  "app_token": "xapp-EXAMPLE-APP-TOKEN-DO-NOT-USE",
  "signing_secret": "EXAMPLE_SIGNING_SECRET_DO_NOT_USE",
  "app_id": "A01234567890",
  "app_name": "SFP Bot",
  "bot_user_id": "U01234567890"
}
{
  "success": true,
  "workspace": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "team_id": "T1234567890",
    "team_name": "My Company Workspace"
  }
}

Delete Slack workspace configuration

delete
Query parameters
teamIdstringOptional

Specific team ID to delete

Responses
200

Workspace configuration deleted

application/json
delete
DELETE /sfp/api/slack/workspace HTTP/1.1
Host: 
Accept: */*
{
  "success": true,
  "message": "Workspace configuration deleted"
}

Update Slack workspace configuration

patch
Body
team_namestringOptional

Name of the Slack workspace

Example: My Company Workspace
bot_tokenstringOptional

Bot User OAuth Token (starts with xoxb-)

Example: xoxb-EXAMPLE-TOKEN-DO-NOT-USEPattern: ^xoxb-
app_tokenstringOptional

App-Level Token for Socket Mode (starts with xapp-)

Example: xapp-EXAMPLE-APP-TOKEN-DO-NOT-USEPattern: ^xapp-
signing_secretstringOptional

Slack app signing secret for request verification

Example: EXAMPLE_SIGNING_SECRET_DO_NOT_USE
Responses
200

Workspace configuration updated

application/json
patch
PATCH /sfp/api/slack/workspace HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "team_name": "My Company Workspace",
  "bot_token": "xoxb-EXAMPLE-TOKEN-DO-NOT-USE",
  "app_token": "xapp-EXAMPLE-APP-TOKEN-DO-NOT-USE",
  "signing_secret": "EXAMPLE_SIGNING_SECRET_DO_NOT_USE"
}
{
  "success": true,
  "workspace": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "team_id": "T1234567890",
    "team_name": "My Company Workspace"
  }
}

Test Slack bot connection

get
Responses
200

Connection test successful

application/json
get
GET /sfp/api/slack/test HTTP/1.1
Host: 
Accept: */*
{
  "success": true,
  "message": "Successfully connected to Slack workspace \"My Company Workspace\"",
  "details": {
    "workspace_name": "My Company Workspace",
    "bot_name": "SFP Bot",
    "bot_id": "U01234567890"
  },
  "error": "Invalid bot token"
}

List all Slack workspaces

get
Query parameters
activeOnlybooleanOptional

Show only active workspaces

Responses
200

List of workspaces

application/json
get
GET /sfp/api/slack/workspaces HTTP/1.1
Host: 
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "team_id": "T1234567890",
    "team_name": "My Company Workspace",
    "app_id": "A01234567890",
    "app_name": "SFP Bot",
    "bot_user_id": "U01234567890",
    "is_active": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "created_by": "[email protected]",
    "has_bot_token": true,
    "has_app_token": true,
    "has_signing_secret": true
  }
]