# Slack

## GET /sfp/api/slack/workspace

> Get current Slack workspace configuration

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{},"schemas":{"WorkspaceResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the workspace configuration"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"team_name":{"type":"string","description":"Name of the Slack workspace"},"app_id":{"type":"string","description":"Slack app ID"},"app_name":{"type":"string","description":"Display name of the Slack app"},"bot_user_id":{"type":"string","description":"Bot user ID in the workspace"},"is_active":{"type":"boolean","description":"Whether the workspace configuration is active"},"created_at":{"type":"string","description":"When the workspace was configured"},"updated_at":{"type":"string","description":"When the workspace was last updated"},"created_by":{"type":"string","description":"Email of the user who configured the workspace"},"has_bot_token":{"type":"boolean","description":"Whether a bot token is configured (token value not exposed)"},"has_app_token":{"type":"boolean","description":"Whether an app token is configured (token value not exposed)"},"has_signing_secret":{"type":"boolean","description":"Whether a signing secret is configured (value not exposed)"}},"required":["id","team_id","team_name","app_id","app_name","bot_user_id","is_active","created_at","updated_at","created_by","has_bot_token","has_app_token","has_signing_secret"]}}},"paths":{"/sfp/api/slack/workspace":{"get":{"operationId":"SlackConfigController_getWorkspace","summary":"Get current Slack workspace configuration","parameters":[],"responses":{"200":{"description":"Workspace configuration retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponseDto"}}}},"403":{"description":"Forbidden - Requires role: member, owner, application"},"404":{"description":"No workspace configured"}},"tags":["Slack"]}}}}
```

## POST /sfp/api/slack/workspace

> Create or update Slack workspace configuration

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{},"schemas":{"CreateWorkspaceDto":{"type":"object","properties":{"team_id":{"type":"string","description":"Slack workspace/team ID (starts with T)","pattern":"^T[A-Z0-9]+$"},"team_name":{"type":"string","description":"Name of the Slack workspace"},"bot_token":{"type":"string","description":"Bot User OAuth Token (starts with xoxb-)","pattern":"^xoxb-"},"app_token":{"type":"string","description":"App-Level Token for Socket Mode (starts with xapp-)","pattern":"^xapp-"},"signing_secret":{"type":"string","description":"Slack app signing secret for request verification"},"app_id":{"type":"string","description":"Slack app ID"},"app_name":{"type":"string","description":"Display name of the Slack app"},"bot_user_id":{"type":"string","description":"Bot user ID in the workspace"}},"required":["team_id","team_name","bot_token","app_token","signing_secret"]},"CreateWorkspaceResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"workspace":{"type":"object","description":"Basic workspace information","properties":{"id":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"}}}},"required":["success","workspace"]}}},"paths":{"/sfp/api/slack/workspace":{"post":{"operationId":"SlackConfigController_createOrUpdateWorkspace","summary":"Create or update Slack workspace configuration","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceDto"}}}},"responses":{"201":{"description":"Workspace configuration saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceResponseDto"}}}},"400":{"description":"Invalid configuration"},"403":{"description":"Forbidden - Requires role: owner, application"}},"tags":["Slack"]}}}}
```

## DELETE /sfp/api/slack/workspace

> Delete Slack workspace configuration

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{},"schemas":{"DeleteWorkspaceResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"string","description":"Confirmation message"}},"required":["success","message"]}}},"paths":{"/sfp/api/slack/workspace":{"delete":{"operationId":"SlackConfigController_deleteWorkspace","summary":"Delete Slack workspace configuration","parameters":[{"name":"teamId","required":false,"in":"query","description":"Specific team ID to delete","schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace configuration deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWorkspaceResponseDto"}}}},"403":{"description":"Forbidden - Requires role: owner, application"},"404":{"description":"No workspace configured"}},"tags":["Slack"]}}}}
```

## PATCH /sfp/api/slack/workspace

> Update Slack workspace configuration

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{},"schemas":{"UpdateWorkspaceDto":{"type":"object","properties":{"team_name":{"type":"string","description":"Name of the Slack workspace"},"bot_token":{"type":"string","description":"Bot User OAuth Token (starts with xoxb-)","pattern":"^xoxb-"},"app_token":{"type":"string","description":"App-Level Token for Socket Mode (starts with xapp-)","pattern":"^xapp-"},"signing_secret":{"type":"string","description":"Slack app signing secret for request verification"}}},"CreateWorkspaceResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"workspace":{"type":"object","description":"Basic workspace information","properties":{"id":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"}}}},"required":["success","workspace"]}}},"paths":{"/sfp/api/slack/workspace":{"patch":{"operationId":"SlackConfigController_updateWorkspace","summary":"Update Slack workspace configuration","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceDto"}}}},"responses":{"200":{"description":"Workspace configuration updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceResponseDto"}}}},"403":{"description":"Forbidden - Requires role: owner, application"},"404":{"description":"No workspace configured"}},"tags":["Slack"]}}}}
```

## GET /sfp/api/slack/test

> Test Slack bot connection

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{},"schemas":{"TestConnectionResponseDto":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the connection test was successful"},"message":{"type":"string","description":"Human-readable message about the test result"},"details":{"type":"object","description":"Details about the connection test","properties":{"workspace_name":{"type":"string"},"bot_name":{"type":"string"},"bot_id":{"type":"string"}}},"error":{"type":"string","description":"Error message if the test failed"}},"required":["success","message"]}}},"paths":{"/sfp/api/slack/test":{"get":{"operationId":"SlackConfigController_testConnection","summary":"Test Slack bot connection","parameters":[],"responses":{"200":{"description":"Connection test successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionResponseDto"}}}},"403":{"description":"Forbidden - Requires role: member, owner, application"},"503":{"description":"Connection test failed"}},"tags":["Slack"]}}}}
```

## GET /sfp/api/slack/workspaces

> List all Slack workspaces

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.9.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{},"schemas":{"WorkspaceResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the workspace configuration"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"team_name":{"type":"string","description":"Name of the Slack workspace"},"app_id":{"type":"string","description":"Slack app ID"},"app_name":{"type":"string","description":"Display name of the Slack app"},"bot_user_id":{"type":"string","description":"Bot user ID in the workspace"},"is_active":{"type":"boolean","description":"Whether the workspace configuration is active"},"created_at":{"type":"string","description":"When the workspace was configured"},"updated_at":{"type":"string","description":"When the workspace was last updated"},"created_by":{"type":"string","description":"Email of the user who configured the workspace"},"has_bot_token":{"type":"boolean","description":"Whether a bot token is configured (token value not exposed)"},"has_app_token":{"type":"boolean","description":"Whether an app token is configured (token value not exposed)"},"has_signing_secret":{"type":"boolean","description":"Whether a signing secret is configured (value not exposed)"}},"required":["id","team_id","team_name","app_id","app_name","bot_user_id","is_active","created_at","updated_at","created_by","has_bot_token","has_app_token","has_signing_secret"]}}},"paths":{"/sfp/api/slack/workspaces":{"get":{"operationId":"SlackConfigController_listWorkspaces","summary":"List all Slack workspaces","parameters":[{"name":"activeOnly","required":false,"in":"query","description":"Show only active workspaces","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceResponseDto"}}}}},"403":{"description":"Forbidden - Requires role: owner, application"}},"tags":["Slack"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp-server/api-reference/slack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
