Skip to main content
PATCH
/
dm_members
/
{id}
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 dmMember = await client.dmMembers.update('id');

console.log(dmMember.id);
{
  "id": "<string>",
  "user_id": "<string>",
  "channel_id": "<string>",
  "status": "requested",
  "last_viewed_at": "123.45",
  "notification_preference": "all"
}

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 ***************************

Path Parameters

id
string
required

The unique identifier of the DM channel member to update.

Body

application/json

Parameters for UpdateDmMember

notification_preference
enum<string> | null

The notification setting for this member, controlling how they receive alerts for new messages in this channel.

Available options:
all,
mentions,
none
status
enum<string> | null

The membership status for this member in the DM channel.

Available options:
requested,
accepted,
hidden,
closed,
archived

Response

A successful response

A user's membership record in a messaging channel, including notification preferences and read state.

id
string
required

The unique identifier for the entity

user_id
string
required

The unique identifier of the user who holds this channel membership.

channel_id
string
required

The unique identifier of the messaging channel this membership belongs to.

status
enum<string>
required

The current state of this membership: requested, accepted, hidden, closed, or archived.

Available options:
requested,
accepted,
hidden,
closed,
archived
last_viewed_at
string | null
required

The timestamp when this member last viewed the channel, as a Unix timestamp in milliseconds. Null if the member has never viewed the channel.

Example:

"123.45"

notification_preference
enum<string>
required

The notification level for this channel: all, mentions, or none.

Available options:
all,
mentions,
none