Skip to main content
GET
/
support_channels
JavaScript
import Whopsdk from 'whopsdk';

const client = new Whopsdk({
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const supportChannelListResponse of client.supportChannels.list({
  company_id: 'biz_xxxxxxxxxxxxxx',
})) {
  console.log(supportChannelListResponse.id);
}
{
  "data": [
    {
      "id": "<string>",
      "company_id": "<string>",
      "custom_name": "<string>",
      "customer_user": {
        "id": "user_xxxxxxxxxxxxx",
        "name": "<string>",
        "username": "<string>"
      },
      "resolved_at": 1701406800
    }
  ],
  "page_info": {
    "end_cursor": "<string>",
    "start_cursor": "<string>",
    "has_next_page": true,
    "has_previous_page": true
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Query Parameters

after
string | null

Returns the elements in the list that come after the specified cursor.

before
string | null

Returns the elements in the list that come before the specified cursor.

first
integer | null

Returns the first n elements from the list.

Example:

42

last
integer | null

Returns the last n elements from the list.

Example:

42

company_id
string
required

The ID of the company to list chat channels for

Example:

"biz_xxxxxxxxxxxxxx"

open
boolean | null

Filter for tickets where customer sent the last message (needs response) AND not resolved. Set to true to only return open channels, false to only return resolved channels.

direction
enum<string> | null

The direction to sort the channels by The direction of the sort.

Available options:
asc,
desc
order
enum<string> | null

The field to order the channels by Sort options for message channels

Available options:
created_at,
last_post_sent_at

Response

A successful response

The connection type for DmsFeed.

data
array | null
required

A list of nodes.

page_info
object
required

Information to aid in pagination.

I