> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Configure Slack integration settings for your team

## Slack channels

The Slack integration allows you to manage which channels Thena can access and monitor. Channels are organized into two categories:

> [tab] Available channels
>
> These are public channels in your Slack workspace that Thena can see but hasn't been added to yet. You can:
>
> * View all accessible public channels
>
> * Add Thena to channels directly
>
> * Configure channel settings before adding
>
> * Filter channels by name or purpose
>
> > [!NOTE]
> >
> > Channel listing is paginated with 20 channels per page. Use the pagination controls to navigate through all available channels.

> [tab] Configured channels
>
> These are channels (both public and private) where Thena is already added and active. You can:
>
> * View all channels where Thena is present
> * Manage channel settings
> * Remove Thena from channels
> * View channel statistics and activity

> [!WARNING]
>
> For private channels, the Thena Slack app must be manually added via Slack. Due to Slack API limitations, Thena cannot automatically access or join private channels.

### Channel types

> [accordion] Customer channel
>
> Channels where you interact directly with customers. These channels typically:
>
> * Connect with external organizations
> * Handle customer support inquiries
> * Manage customer communications
> * Track customer-specific issues

> [accordion] Internal helpdesk
>
> Internal support channels for your organization. These channels:
>
> * Handle employee support requests
> * Process access requests
> * Support internal operations
> * Eg: Manage internal IT issues

> [accordion] Triage channel
>
> Channels dedicated to issue prioritization and routing. These channels:
>
> * Sort and categorize incoming issues
> * Assign tickets to appropriate teams
> * Monitor SLA compliance
> * Coordinate emergency responses

> [accordion] Alerts and automations
>
> System and automation channels that:
>
> * Receive system alerts and notifications
> * Monitor automated processes
> * Track integration events
> * Log automated actions

## Ticket creation settings

Configure how tickets are created from Slack messages and conversations.

### Conversation grouping window

Group messages within a specified time window (in minutes) to create a single ticket. This helps consolidate related messages into a single ticket rather than creating multiple tickets for an ongoing conversation.

Default: 2 minutes

> [accordion] New messages in channel
>
> When a new message is posted in a channel:
>
> * If no ticket exists in the last 2 minutes: Creates a new ticket
> * If a ticket exists within 2 minutes: Adds message to existing ticket
> * If multiple tickets exist: Adds to the most recent ticket
>
> Example:
>
> ```
> 10:00:00 AM Customer A: "Hi, I need help"
> 10:01:30 AM Customer A: "With my account"
> 10:01:45 AM Customer A: "I can't login"
> 10:02:15 AM Customer A: "And also having issues with signup"
> ```
>
> First three messages are grouped into one ticket since they're within 2 minutes.
> The last message creates a new ticket as it's outside the 2-minute window.

> [accordion] Thread messages
>
> Messages in a thread are handled differently:
>
> * All messages in a thread are always grouped together, regardless of time window
> * If a ticket exists for the parent message: All thread replies are added to that ticket
> * If a new thread is created within the grouping window of another conversation: A new ticket is created
>
> Example 1 - Customer initiated:
>
> ```
> 10:00:00 AM Customer A: "Having issues with login" (Message 1)
> 10:01:45 AM Customer A: "Screen keeps freezing" (Message 2)
> 10:01:50 AM Support: Creates thread on Message 1: "Can you share more details?"
> 10:01:55 AM Customer A: Replies in thread: "Using Chrome browser"
> ```
>
> Result:
>
> * All messages are grouped into one ticket since they're within the 2-minute window
> * Thread messages are included in the same ticket as they're part of the conversation
> * This shows how related messages and their threads are kept together when within the time window
>
> Example 2 - Vendor initiated:
>
> ```
> 11:00:00 AM Support: "@Customer-A Your license is expiring soon" (Message 1)
> 11:00:30 AM Customer A: Replies in thread: "Thanks, when exactly?"
> 11:00:45 AM Support: Replies in thread: "End of this month"
> 11:01:15 AM Customer A: Posts in channel: "Also having trouble with API keys"
> ```
>
> Result:
>
> * When customer replies at 11:00:30 AM, a ticket is created
> * Since all messages are within the 2-minute window, they are grouped into the same ticket
> * This includes both the thread messages and the new channel message at 11:01:15 AM
>
> Example:
>
> ```
> 10:00 AM Customer A: "Having issues with API" (Parent message)
>   10:45 AM Customer A: "Still not working" (Thread reply)
>   11:30 AM Customer A: "Any updates?" (Thread reply)
> ```
>
> All thread messages are grouped together even though they exceed 2 minutes.

> [accordion] Multiple conversations
>
> When different customers message in the same channel:
>
> * Each customer's messages are grouped separately
> * Time window applies independently to each customer
> * Thread ownership is preserved
>
> Example:
>
> ```
> 10:00 AM Customer A: "Need help with login"
> 10:15 AM Customer B: "Having API issues"
> 10:20 AM Customer A: "Still waiting"
> ```
>
> Creates two tickets:
>
> 1. Customer A's messages (10:00, 10:20)
> 2. Customer B's message (10:15)

> [accordion] Cross-thread scenarios
>
> When messages span multiple threads:
>
> * Each thread is treated independently
> * Messages outside threads follow the time window rule
> * New threads can create new tickets
>
> Example:
>
> ```
> 10:00 AM Customer A: "Issue 1" (Thread 1)
>   10:30 AM Customer A: "More details" (In Thread 1)
> 10:45 AM Customer A: "Issue 2" (New message)
>   11:00 AM Customer A: "Details" (Thread 2)
> ```
>
> Creates two tickets:
>
> 1. Thread 1 messages
> 2. New message and Thread 2 (since > 2 mins from Thread 1)

> [!NOTE]
>
> The conversation grouping window helps maintain context and reduce ticket fragmentation while ensuring separate issues are tracked independently. You can adjust the window duration based on your team's needs.

### Automatic ticket creation

When enabled, Thena automatically creates tickets for new conversations in configured channels. This ensures no customer inquiry goes untracked.

### Slash commands

Enable the `/ticket` command in your Slack workspace. This allows team members to manually create tickets using a structured command interface.

### @Thena tag

Allow creating tickets by tagging @Thena in messages. When enabled, team members can create tickets by mentioning @Thena in a message or thread.

### Forms

Optionally require users to fill out predefined forms when creating tickets. This ensures consistent information gathering for different types of requests.

* Multiple forms can be selected and their order can be specified
* When multiple forms are selected, users will see a dropdown menu to choose the appropriate form
* Forms will be presented in the specified order in the dropdown menu
* This allows for different types of requests to be handled with their specific information requirements

## Slack groups configuration

Map Slack user groups to Thena sub-teams to enable automatic ticket routing when a Slack group is tagged in a message. When a user mentions a Slack group (e.g., @engineering) in the initial message that creates a ticket, the ticket will be automatically assigned to the corresponding Thena sub-team.

> [!NOTE]
>
> Note:
>
> * Slack group routing only works when the group is mentioned in the initial message that creates the ticket. Mentioning a Slack group in subsequent thread messages will not change the ticket assignment.
> * If a Slack group is mentioned in the initial message, the ticket will be assigned to the mapped sub-team regardless of other routing rules, taking priority over platform routing logic.

You can:

* Get all available Slack user groups in your workspace
* Map Slack groups to Thena sub-teams
* Get existing mappings between Slack groups and sub-teams

Refer to the [API endpoints](#slack-groups) section for details on managing Slack group mappings.

## Notifications and triage

Configure how ticket notifications are distributed across your Slack channels through default triage channels and conditional routing rules.

### Default triage channels

Default triage channels receive notifications for all new tickets unless overridden by triage rules. You can configure multiple default channels where:

* New ticket alerts are sent automatically
* Team members can triage tickets by assigning them to appropriate handlers
* Ticket details like urgency, priority, and request information are readily available

Refer to the [API endpoints](#triage-rules-2) section for managing triage rules and channels.

### Triage rules

Triage rules allow you to route specific tickets to different channels based on ticket properties. Each rule consists of:

1. **Rule name**: A descriptive name for the rule
2. **Status**: Enabled or disabled
3. **Conditions**: Criteria that trigger the rule
4. **Target channels**: Channels that receive notifications when conditions are met

#### Condition structure

Each condition has four components:

1. **Category**: Select either:
   * Ticket: For ticket-related properties
   * Account: For account-related properties

2. **Field**: Available fields depend on the selected category
   * Ticket fields: priority, urgency, type, etc.
   * Account fields: health, status, tier, etc.
   * Custom fields: Any custom fields defined for tickets or accounts are also available

3. **Operator**: Select from the following comparison operators:
   * Equals: Exact match
   * In list: Value exists in a list
   * Greater than or equal: Value is greater than or equal to
   * Less than or equal: Value is less than or equal to
   * Matches regex: Value matches a regular expression pattern
   * Starts with: Value begins with a specific string
   * Ends with: Value ends with a specific string
   * Contains: Value contains a specific string

4. **Value**: The exact value to match against. Format should match the operator type (e.g., comma-separated values for 'In list', regex pattern for 'Matches regex')

#### Multiple conditions

You can combine multiple conditions using:

* **AND conditions**: All conditions must be true
* **OR conditions**: Any condition can be true

> [!NOTE]
>
> If a triage rule matches, notifications are sent ONLY to the target channels specified in that rule, not to the default channels. To include default channels, add them explicitly as target channels in your rule.

#### Rule evaluation

When multiple rules are configured:

1. All rules are evaluated
2. If multiple rules match the conditions, the notification will be sent to the target channels of all matching rules
3. This allows you to set up multiple routing rules that can work together to ensure the right teams are notified

#### Examples

Refer to the [API endpoints](#triage-rules-2) section for details on creating and managing triage rules through our API.

> [accordion] High priority ticket triage
>
> **Rule name**: High Priority Routing
>
> **Conditions**:
>
> * Category: Ticket
> * Field: Priority
> * Operator: Equals
> * Value: HIGH
>
> **Target channels**: #urgent-triage, #platform-triage
>
> This rule ensures all high priority tickets are immediately visible to teams monitoring urgent issues.

> [accordion] Critical account health triage
>
> **Rule name**: Critical Account Health
>
> **Conditions**:
>
> * Category: Account
> * Field: Health
> * Operator: Equals
> * Value: RED
>
> **Target channels**: #customer-success-triage, #account-alerts
>
> Routes notifications for accounts with critical health status to dedicated customer success channels.

> [accordion] Complex routing example
>
> **Rule name**: Enterprise Urgent Issues
>
> **AND Conditions**:
>
> * Condition 1:
>   * Category: Account
>   * Field: Tier
>   * Operator: Equals
>   * Value: ENTERPRISE
> * Condition 2:
>   * Category: Ticket
>   * Field: Priority
>   * Operator: Equals
>   * Value: HIGH
>
> **OR Conditions**:
>
> * Condition 1:
>   * Category: Ticket
>   * Field: Type
>   * Operator: Equals
>   * Value: OUTAGE
>
> **Target channels**: #enterprise-support, #platform-triage, #urgent-triage
>
> This rule routes either high-priority tickets from enterprise accounts OR outage tickets to multiple support channels.

## AI features

Configure AI-powered features to enhance ticket creation and management. Each feature uses customizable prompts that you can tailor to your business needs.

### AI models

Select from our supported AI models to power your automation:

* **Grok-2**: XS AI flagship conversational model
* **Claude 3.7 Sonnet**: Anthropic's advanced reasoning model with state-of-the-art capabilities

> [!NOTE]
>
> Some models support deep thinking mode for more thorough analysis. This option will be available in the model settings if supported.

### AI features

#### Ticket detection

Automatically identifies when a conversation requires a support ticket.

**Default prompt:**

```
Analyze the following conversation and determine if it requires a support ticket. Consider factors like: explicit requests for help, reported issues, or questions that need tracking.
```

#### Title generation

Creates concise, informative ticket titles following a standardized format.

**Default prompt:**

```
TITLE_GENERATION:
Generate a precise, informative title for this support ticket using the format: 
"[Type] [Product] - [Core Issue]" 

NOTE: Wrap the title and product around in angular brackets like this: <title> <product> Core issue with no brackets

Where:
- [Type] is one of: Bug, Feature, Question, Security, Performance, Other
- [Product] identifies the specific product component
- [Core Issue] summarizes the key problem or request in 5-9 words

Example good titles:
- "Bug: API Authentication - Token refresh fails after password change"
- "Feature: Analytics Dashboard - Add export to CSV functionality"
- "Question: Webhook Integration - Payload format documentation"

Keep total length under 70 characters. Prioritize clarity and specificity.
```

#### Description generation

Creates structured, comprehensive ticket descriptions.

**Default prompt:**

```markdown theme={null}
Create a comprehensive support ticket description structured in the following format:

## Overview
[Concise 1-2 sentence summary of the core issue]

## Environment
- Product version: [Extract if mentioned]
- Browser/OS/Device: [Extract if mentioned]
- Account information: [Customer ID or account type if provided]
- Date first observed: [When the issue started]

## Technical Details
[Include specific error messages, API responses, status codes, or behavior anomalies. Quote exact error text when available.]

## Reproduction Steps
1. [Clear, numbered steps to reproduce the issue]
2. [Use placeholders if steps are not explicitly stated]
3. [Include expected vs. actual outcomes]

## Customer Impact
[Describe severity, business impact, affected users, and any workarounds attempted]

## Customer Expectation
[Clearly state what resolution the customer is seeking]

## Attachments
[List any logs, screenshots, or other files mentioned in the conversation]

Format using markdown for readability. Prioritize accuracy over completeness - use "Not specified" rather than assuming details not provided in the conversation.
```

#### Sentiment analysis

Evaluates the tone and emotional context of conversations.

**Default prompt:**

```
Analyze the tone and sentiment of this conversation. Consider factors like: urgency, frustration level, satisfaction, and overall mood.
```

#### Urgency detection

Assesses the priority level of support requests.

**Default prompt:**

```json theme={null}
Analyze the following support conversation to determine the urgency level of the customer's issue. 
Consider factors like business impact, time sensitivity, number of affected users, and severity of the problem.
Return a JSON response with the following fields:
{
  "urgency": string, // The detected urgency level
  "confidence": number, // Your confidence in this assessment (0-1)
  "businessImpact": "low|medium|high", // How much this impacts the customer's business operations
  "timeSensitivity": "low|medium|high", // How time-sensitive this issue is
  "affectedUsersCount": number|"unknown", // Estimated number of users affected
  "severityLevel": "low|medium|high" // The overall severity of the issue
}
If specific urgency levels are provided in the prompt, use one of those. Otherwise, use "low", "medium", or "high".
```

#### Custom fields auto-fill

Extracts relevant information to populate custom ticket fields.

**Default prompt:**

```
Extract relevant information to populate custom ticket fields. Look for: environment details, affected systems, steps to reproduce, and any specific requirements.
```

### Customizing prompts

All default prompts can be customized to better match your organization's needs:

1. View the current prompt for any AI feature
2. Edit the prompt to include specific requirements or formatting
3. Save changes to update the AI behavior

> [!NOTE]
>
> Prompt changes will affect all future ticket processing. Test changes thoroughly before applying them to production environments.

***

## API endpoints

> [!NOTE]
>
> These APIs are part of the Slack app in the Apps Framework and require:
>
> * Authentication using the API Key specific to your Slack app installation (not the platform's auth token)
> * Base URL from the API references section, which varies by environment (development, staging, production)

### Team settings

#### Get team settings

Get the current ticket creation settings for a team.

**Path**: `/v1/slack/settings/teams/{teamId}`\
**Method**: `GET`

Headers:

```json theme={null}
{
  "x-auth-token": "YOUR_SLACK_APP_API_KEY",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID"
}
```

Response:

```json theme={null}
{
  "aiModel": "grok-2",
  "requireForm": false,
  "aiMaxTokens": 1000,
  "aiTemperature": 0.5,
  "slashCommands": true,
  "ticketCommand": true,
  "automaticTickets": true,
  "conversationWindow": 30,
  "thenaBotTaggingEnabled": true,
  "aiEnableExtendedThinking": false,
  "createdAt": "2025-02-28T13:58:03.091Z",
  "updatedAt": "2025-02-28T13:58:03.091Z",
  "platformTeamId": "TRRSALL1S3"
}
```

**Response object** `object`

**Properties**

**aiModel** `string`

The AI model to use for processing

**requireForm** `boolean`

Whether forms are required for ticket creation

**aiMaxTokens** `number`

Maximum tokens for AI responses

**aiTemperature** `number`

AI response creativity (0.0 - 1.0)

**slashCommands** `boolean`

Whether slash commands are enabled

**ticketCommand** `boolean`

Whether the /ticket command is enabled

**automaticTickets** `boolean`

Whether automatic ticket creation is enabled

**conversationWindow** `number`

Time window for grouping messages (minutes)

**thenaBotTaggingEnabled** `boolean`

Whether @Thena tagging is enabled

**aiEnableExtendedThinking** `boolean`

Whether extended AI analysis is enabled

#### Update team settings

**Path**: `/v1/slack/settings/teams/{teamId}`\
**Method**: `PUT`

Update the configuration settings for a specific Slack team.

**Request body** `object`

**Properties**

**aiModel** `string`

The AI model to use (e.g., "grok-2")

**requireForm** `boolean`

Whether to require form submission for ticket creation

**aiMaxTokens** `number`

Maximum tokens for AI responses (default: 1000)

**aiTemperature** `number`

AI response temperature (0.0 - 1.0)

**slashCommands** `boolean`

Enable or disable slash commands

**ticketCommand** `boolean`

Enable or disable the /ticket command

**automaticTickets** `boolean`

Enable or disable automatic ticket creation

**conversationWindow** `number`

Time window in minutes for grouping conversations

**thenaBotTaggingEnabled** `boolean`

Enable or disable @Thena bot tagging

**aiEnableExtendedThinking** `boolean`

Enable or disable extended thinking mode for AI

Headers:

```json theme={null}
{
  "x-auth-token": "YOUR_AUTH_TOKEN",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID",
  "content-type": "application/json"
}
```

Example Request:

```bash theme={null}
curl 'https://thena-slack.thena.tools/v1/slack/settings/teams/TRRSALL1S3' \
  -X 'PUT' \
  -H 'content-type: application/json' \
  -H 'x-auth-token: YOUR_AUTH_TOKEN' \
  -H 'x-slack-id: T05SWT4V29H' \
  --data-raw '{
    "aiModel": "grok-2",
    "requireForm": false,
    "aiMaxTokens": 1000,
    "aiTemperature": 0.5,
    "slashCommands": true,
    "ticketCommand": true,
    "automaticTickets": true,
    "conversationWindow": 2,
    "thenaBotTaggingEnabled": true,
    "aiEnableExtendedThinking": false
  }'
```

Response:

```json theme={null}
{
  "success": true
}
```

### Triage rules

#### List triage rules

**Path**: `/v1/slack/triage/{teamId}`\
**Method**: `GET`

Retrieve all triage rules configured for your workspace.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```

Response:

```json theme={null}
{
    "ok": true,
    "data": [
        {
            "id": "10",
            "isEnabled": true,
            "isDefault": true,
            "triageRules": null,
            "createdAt": "2025-03-09T09:58:35.162Z",
            "updatedAt": "2025-03-09T09:58:35.162Z",
            "deletedAt": null,
            "triageChannels": [
                {
                    "id": "307",
                    "name": "prod-triage-platform",
                    "channelId": "C08FMAH5S68",
                    "channelType": "triage_channel",
                    "isArchived": false,
                    "isPrivate": false
                }
            ]
        }
    ]
}
```

#### Create triage rule

**Path**: `/v1/slack/triage/{teamId}`\
**Method**: `POST`

Create a new triage rule with specified conditions and target channels.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID",
    "Content-Type": "application/json"
}
```

Request body:

```json theme={null}
{
    "isDefault": false,
    "triageRules": {
        "AND": [
            {
                "category": "ticket",
                "field": "priority.name",
                "operator": "equals",
                "value": "Urgent"
            },
            {
                "category": "ticket",
                "field": "status.name",
                "operator": "equals",
                "value": "Open"
            }
        ],
        "OR": []
    },
    "channelIds": ["C08EYRV9D5L"]
}
```

#### Update triage rule

**Path**: `/v1/slack/triage/{ruleId}`\
**Method**: `PATCH`

Update an existing triage rule. The request body follows the same format as the create endpoint.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID",
    "Content-Type": "application/json"
}
```

#### Delete triage rule

**Path**: `/v1/slack/triage/{ruleId}`\
**Method**: `DELETE`

Delete an existing triage rule.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```

### Slack groups

#### List Slack groups

**Path**: `/v1/slack/settings/teams/{teamId}/groups`\
**Method**: `GET`

Retrieve all available Slack user groups in your workspace.

Headers:

```json theme={null}
{
    "content-type": "application/json",
    "x-workspace-id": "YOUR_WORKSPACE_ID",
    "x-source-key": "YOUR_SOURCE_KEY"
}
```

Response:

```json theme={null}
{
    "data": [
        {
            "id": "2",
            "slackGroupId": "S06FMU9Q605",
            "slackHandle": "engineering",
            "description": "Engineering team",
            "isExternal": false,
            "usersCount": 1,
            "users": ["U05TL0FENRE"],
            "createdAt": "2025-02-28T13:57:51.783Z",
            "updatedAt": "2025-02-28T13:57:51.783Z",
            "deletedAt": null,
            "slackDeletedAt": null
        }
    ],
    "ok": true
}
```

#### List mapped groups

**Path**: `/v1/slack/settings/teams/{teamId}/groups/mapped`\
**Method**: `GET`

Retrieve all Slack groups that are currently mapped to Thena sub-teams.

Headers:

```json theme={null}
{
    "content-type": "application/json",
    "x-workspace-id": "YOUR_WORKSPACE_ID",
    "x-source-key": "YOUR_SOURCE_KEY"
}
```

#### Map Slack group to sub-team

**Path**: `/v1/slack/settings/teams/{teamId}/groups`\
**Method**: `PATCH`

Create a mapping between a Slack user group and a Thena sub-team.

Headers:

```json theme={null}
{
    "content-type": "application/json",
    "x-workspace-id": "YOUR_WORKSPACE_ID",
    "x-source-key": "YOUR_SOURCE_KEY"
}
```

Request body:

```json theme={null}
{
    "slackSubGroupId": "2",
    "platformSubGroupId": "TXX0OHHM7M"
}
```

Response:

```json theme={null}
{
    "ok": true
}
```

### Channel management

#### List channels

Get a list of available or configured channels in your Slack workspace.

**Path**: `/v1/slack/channel`\
**Method**: `GET`

Query parameters:

**Query parameters** `object`

**Properties**

**page** `number` *required*

Page number for pagination (starts at 1)

**limit** `number` *required*

Number of items per page (default: 20)

**availabilityType** `string` *required*

Filter by channel availability ('available' or 'configured')

**showPrivateChannels** `boolean`

Include private channels in results

**showExternalChannels** `boolean`

Include shared channels from other workspaces

Headers:

```json theme={null}
{
  "x-auth-token": "YOUR_SLACK_APP_API_KEY",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID"
}
```

Response:

```json theme={null}
{
  "data": [
    {
      "id": "307",
      "name": "prod-triage-platform",
      "channelId": "C08FMAH5S68",
      "slackCreatedAt": "1740752435",
      "isBotActive": false,
      "isBotJoined": false,
      "channelType": "not_setup",
      "isArchived": false,
      "isPrivate": false,
      "isShared": false,
      "sharedTeamIds": null,
      "guestAreCustomers": false,
      "platformDump": {
        "accounts": []
      },
      "createdAt": "2025-02-28T14:20:37.262Z",
      "updatedAt": "2025-02-28T14:20:37.262Z",
      "slackDeletedAt": null,
      "lastBotLeftAt": null,
      "deletedAt": null,
      "teamId": "T05SWT4V29H",
      "teams": []
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 128,
    "totalPages": 7
  }
}
```

**Response object** `object`

**Data properties**

**id** `string`

Internal channel identifier

**name** `string`

Channel name

**channelId** `string`

Slack channel identifier

**isBotActive** `boolean`

Whether Thena is actively monitoring this channel

**isBotJoined** `boolean`

Whether Thena has joined the channel

**channelType** `string`

Channel configuration status

**isArchived** `boolean`

Whether the channel is archived

**isPrivate** `boolean`

Whether the channel is private

**isShared** `boolean`

Whether the channel is shared with external workspaces

**teams** `array`

Teams that have access to this channel

**Meta properties**

**page** `number`

Current page number

**limit** `number`

Items per page

**total** `number`

Total number of items

**totalPages** `number`

Total number of pages

### Map channels

Configure channel type and team mapping for one or more Slack channels.

**Path**: `/v1/slack/teams/map-channels`\
**Method**: `POST`

Request body:

```json theme={null}
{
  "teamId": "string",
  "channelIds": ["string"],
  "channelType": "customer_channel" | "internal_helpdesk" | "triage_channel" | "automation_channel"
}
```

**Request body** `object`

**Properties**

**teamId** `string` *required*

The ID of the team to map channels to

**channelIds** `array` *required*

Array of Slack channel IDs to configure

**channelType** `string` *required*

Type of channel. One of:

* customer\_channel
* internal\_helpdesk
* triage\_channel
* automation\_channel

Headers:

```json theme={null}
{
  "x-auth-token": "YOUR_SLACK_APP_API_KEY",
  "x-slack-id": "YOUR_SLACK_WORKSPACE_ID",
  "content-type": "application/json"
}
```

> [!NOTE]
>
> The channel type specified in the request should match one of the channel types described in the [Channel types](#channel-types) section above.

### AI features

#### List all prompts

**Path**: `/v1/prompts`\
**Method**: `GET`

Retrieve all AI prompts configured for your organization.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```

#### Get prompt by ID

**Path**: `/v1/prompts/{promptId}`\
**Method**: `GET`

Retrieve a specific prompt configuration.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```

#### Create prompt

**Path**: `/v1/prompts`\
**Method**: `POST`

Create a new set of AI prompts.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```

Request body:

```json theme={null}
{
    "name": "Customer Service Prompts",
    "prompts": {
        "ticket_detection": "Analyze the following conversation...",
        "sentiment_analysis": "Analyze the sentiment of the following...",
        "urgency_detection": "Analyze the following support conversation...",
        "custom_fields": "Extract key information..."
    },
    "platformTeamId": "YOUR_TEAM_ID"
}
```

#### Update prompt

**Path**: `/v1/prompts/{promptId}`\
**Method**: `PUT`

Update an existing prompt configuration.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```

Request body:

```json theme={null}
{
    "name": "Updated Customer Service Prompts",
    "prompts": {
        "ticket_detection": "Updated prompt content...",
        "sentiment_analysis": "Updated sentiment analysis...",
        "urgency_detection": "Updated urgency detection...",
        "custom_fields": "Updated custom fields..."
    },
    "isEnabled": true
}
```

#### Delete prompt

**Path**: `/v1/prompts/{promptId}`\
**Method**: `DELETE`

Soft delete a prompt configuration.

Headers:

```json theme={null}
{
    "x-auth-token": "YOUR_AUTH_TOKEN",
    "x-slack-id": "YOUR_SLACK_TEAM_ID"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.