---
description: Reference for verified Slack HTTP ingress from @flue/slack.
title: Slack Channel API | Flue
image: https://flueframework.com/docs/og4.jpg
---

# Slack Channel API

Last updated Jun 13, 2026 [ View as Markdown](https://flueframework.com/docs/api/slack-channel/index.md) 

Import from `@flue/slack`.

## `createSlackChannel()`

```
function createSlackChannel<E extends Env = Env>(options: SlackChannelOptions<E>): SlackChannel<E>;
```

Creates one stateless Slack channel. At least one handler is required.

## `SlackChannelOptions`

```
interface SlackChannelOptions<E extends Env = Env> {
  signingSecret: string;
  bodyLimit?: number;
  events?(input: { c: Context<E>; payload: SlackEventsApiPayload }): SlackHandlerResult;
  interactions?(input: { c: Context<E>; payload: SlackInteractionPayload }): SlackHandlerResult;
  commands?(input: { c: Context<E>; payload: SlackSlashCommandPayload }): SlackHandlerResult;
}
```

| Field         | Description                                                 |
| ------------- | ----------------------------------------------------------- |
| signingSecret | Secret used to verify Slack request signatures.             |
| bodyLimit     | Maximum request body in bytes. Defaults to 1 MiB.           |
| events        | Events API handler. Omission removes POST /events.          |
| interactions  | Interactivity handler. Omission removes POST /interactions. |
| commands      | Slash-command handler. Omission removes POST /commands.     |

URL verification is handled internally. Other authenticated deliveries reach the configured handler with their provider identity intact. Workspace and enterprise authorization is application policy.

## Events API types

```
type SlackEventsApiPayload = SlackEventCallbackPayload | SlackAppRateLimitedPayload;

interface SlackEventCallbackPayload {
  token: string;
  team_id: string;
  enterprise_id?: string | null;
  context_team_id?: string;
  context_enterprise_id?: string | null;
  api_app_id: string;
  event: SlackEvent;
  type: 'event_callback';
  event_id: string;
  event_time: number;
  event_context?: string;
  is_ext_shared_channel?: boolean;
  authorizations?: SlackAuthorization[];
}
```

`SlackEvent` is re-exported from the official `@slack/types` package. Use`payload.type` to narrow the outer delivery and `payload.event.type` or`payload.event.subtype` to narrow the provider event. Retry headers remain available through `c.req.header(...)`.

## Interaction types

```
type SlackInteractionPayload =
  | SlackBlockActionsPayload
  | SlackViewSubmissionPayload
  | SlackViewClosedPayload
  | SlackShortcutPayload
  | SlackMessageActionPayload
  | SlackBlockSuggestionPayload;
```

These local types preserve Slack’s current HTTP interaction field names and nesting. Authenticated future and legacy interaction types are forwarded at runtime even when the installed type version does not include their discriminant. Applications using a legacy surface can supply a local provider-shaped type.

## `SlackSlashCommandPayload`

Provider-native URL-encoded slash-command fields, including:

```
interface SlackSlashCommandPayload {
  command: string;
  text: string;
  response_url: string;
  trigger_id: string;
  user_id: string;
  team_id: string;
  channel_id: string;
  api_app_id: string;
  user_name?: string;
  team_domain?: string;
  channel_name?: string;
  enterprise_id?: string;
  enterprise_name?: string;
  is_enterprise_install?: string;
  [key: string]: unknown;
}
```

## Handler results

```
type SlackHandlerResult = void | JsonValue | Response | Promise<void | JsonValue | Response>;
```

Returning nothing produces an empty `200`. JSON-compatible values become JSON Thrown errors flow through normal Hono error handling.

## `SlackChannel`

```
interface SlackChannel<E extends Env = Env> {
  readonly routes: readonly ChannelRoute<E>[];
  conversationKey(ref: SlackThreadRef): string;
  parseConversationKey(id: string): SlackThreadRef;
}

interface SlackThreadRef {
  teamId: string;
  channelId: string;
  threadTs: string;
}
```

Configured routes are relative to the discovered channel namespace. For`channels/slack.ts`, they are served beneath `/channels/slack` relative to the`flue()` mount.

Conversation keys are canonical identifiers, not authorization capabilities.

## Errors

* `InvalidSlackConversationKeyError`
* `InvalidSlackInputError`, with structured `field`

The channel does not deduplicate Events API retries. See[Slack](https://flueframework.com/docs/ecosystem/channels/slack/) for provider setup and composition with the Slack Web API.

## Docs Navigation

Current page: [Slack Channel API](https://flueframework.com/docs/api/slack-channel/)

### Sections

* [Guide](https://flueframework.com/docs/getting-started/quickstart/)
* [Reference](https://flueframework.com/docs/api/agent-api/)
* [CLI](https://flueframework.com/docs/cli/overview/)
* [SDK](https://flueframework.com/docs/sdk/overview/)
* [Ecosystem](https://flueframework.com/docs/ecosystem/)

### Runtime

* [ Configuration ](https://flueframework.com/docs/reference/configuration/)
* [ Errors Reference ](https://flueframework.com/docs/api/errors-reference/)
* [ Agent API ](https://flueframework.com/docs/api/agent-api/)
* [ Provider API ](https://flueframework.com/docs/api/provider-api/)
* [ Routing API ](https://flueframework.com/docs/api/routing-api/)
* [ GitHub Channel ](https://flueframework.com/docs/api/github-channel/)
* [ Stripe Channel ](https://flueframework.com/docs/api/stripe-channel/)
* [ Notion Channel ](https://flueframework.com/docs/api/notion-channel/)
* [ Resend Channel ](https://flueframework.com/docs/api/resend-channel/)
* [ Shopify Channel ](https://flueframework.com/docs/api/shopify-channel/)
* [ Intercom Channel ](https://flueframework.com/docs/api/intercom-channel/)
* [ Zendesk Channel ](https://flueframework.com/docs/api/zendesk-channel/)
* [ Salesforce Marketing Cloud Channel ](https://flueframework.com/docs/api/salesforce-marketing-cloud-channel/)
* [ Slack Channel ](https://flueframework.com/docs/api/slack-channel/)
* [ Discord Channel ](https://flueframework.com/docs/api/discord-channel/)
* [ Teams Channel ](https://flueframework.com/docs/api/teams-channel/)
* [ Google Chat Channel ](https://flueframework.com/docs/api/google-chat-channel/)
* [ Linear Channel ](https://flueframework.com/docs/api/linear-channel/)
* [ Telegram Channel ](https://flueframework.com/docs/api/telegram-channel/)
* [ WhatsApp Channel ](https://flueframework.com/docs/api/whatsapp-channel/)
* [ Twilio Channel ](https://flueframework.com/docs/api/twilio-channel/)
* [ Messenger Channel ](https://flueframework.com/docs/api/messenger-channel/)
* [ Streaming Protocol ](https://flueframework.com/docs/api/streaming-protocol/)
* [ Events Reference ](https://flueframework.com/docs/api/events-reference/)

### Advanced

* [ Sandbox Adapter API ](https://flueframework.com/docs/api/sandbox-api/)
* [ Data Persistence API ](https://flueframework.com/docs/api/data-persistence-api/)