Slack

sfp server API reference for Slack: 6 endpoints.

GET/sfp/api/slack/workspace

Response Body

application/json

curl -X GET "https://example.com/sfp/api/slack/workspace"
{  "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": "admin@example.com",  "has_bot_token": true,  "has_app_token": true,  "has_signing_secret": true}
POST/sfp/api/slack/workspace

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/sfp/api/slack/workspace" \  -H "Content-Type: application/json" \  -d '{    "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"  }'
{  "success": true,  "workspace": {    "id": "123e4567-e89b-12d3-a456-426614174000",    "team_id": "T1234567890",    "team_name": "My Company Workspace"  }}
PATCH/sfp/api/slack/workspace

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/sfp/api/slack/workspace" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "workspace": {    "id": "123e4567-e89b-12d3-a456-426614174000",    "team_id": "T1234567890",    "team_name": "My Company Workspace"  }}
DELETE/sfp/api/slack/workspace

Query Parameters

teamId?string

Specific team ID to delete

Response Body

application/json

curl -X DELETE "https://example.com/sfp/api/slack/workspace"
{  "success": true,  "message": "Workspace configuration deleted"}
GET/sfp/api/slack/test

Response Body

application/json

curl -X GET "https://example.com/sfp/api/slack/test"
{  "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"}
GET/sfp/api/slack/workspaces

Query Parameters

activeOnly?boolean

Show only active workspaces

Response Body

application/json

curl -X GET "https://example.com/sfp/api/slack/workspaces"
[  {    "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": "admin@example.com",    "has_bot_token": true,    "has_app_token": true,    "has_signing_secret": true  }]