Skip to main content
POST
/
support_channels
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const supportChannel = await client.supportChannels.create({
  company_id: 'biz_xxxxxxxxxxxxxx',
  user_id: 'user_xxxxxxxxxxxxx',
});

console.log(supportChannel.id);
{
  "id": "<string>",
  "company_id": "<string>",
  "custom_name": "Project Alpha Team",
  "customer_user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "resolved_at": "2023-12-01T05:00:00.401Z",
  "last_message_at": "2023-12-01T05:00:00.401Z"
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Body

application/json

Parameters for CreateSupportChatForUser

company_id
string
required

The unique identifier of the company to create the support channel in.

Example:

"biz_xxxxxxxxxxxxxx"

user_id
string
required

The user ID (e.g. 'user_xxxxx') or username of the customer to open a support channel for.

Example:

"user_xxxxxxxxxxxxx"

Response

A successful response

A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.

id
string
required

The unique identifier for the entity

company_id
string | null
required

The unique identifier of the company associated with this channel. Null if this is not a support or company-scoped conversation.

custom_name
string | null
required

A custom display name assigned to this channel by the user. Null if no custom name has been set.

Example:

"Project Alpha Team"

customer_user
object
required

The customer who initiated this support conversation. Null if this is not a support chat.

resolved_at
string<date-time> | null
required

The timestamp when the linked support ticket was marked as resolved. Null if unresolved or not a support chat.

Example:

"2023-12-01T05:00:00.401Z"

last_message_at
string<date-time> | null
required

The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.

Example:

"2023-12-01T05:00:00.401Z"