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

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

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": "<string>",
  "customer_user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "<string>",
    "username": "<string>"
  },
  "resolved_at": 1701406800,
  "last_message_at": 1701406800
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Parameters for CreateSupportChatForUser

company_id
string
required

The ID of the company to create the support chat in

Example:

"biz_xxxxxxxxxxxxxx"

user_id
string
required

The ID of the user to create the support chat for

Example:

"user_xxxxxxxxxxxxx"

Response

A successful response

Represents a DM channel

id
string
required

The unique identifier for the entity

company_id
string | null
required

The bot ID if this is a support chat

custom_name
string | null
required

The custom name of the DM channel, if any

customer_user
object | null
required

The customer user if this is a support chat

resolved_at
integer | null
required

When the support ticket was resolved (null if unresolved)

Example:

1701406800

last_message_at
integer | null
required

When the last message was sent

Example:

1701406800

I