v9

OpenAPI 3.1.02026-08-043703845.2 MB
Dm channels

Update dm channel

Update the settings of an existing DM channel, such as its display name. Only an admin of the channel can perform this action.

Required permissions:

  • dms:channel:manage
patch/dm_channels/{id}

Path parameters

idstring required

The unique identifier of the DM channel to update.

Request body

custom_namestring nullable

A new custom display name for the DM channel. For example, 'Project Discussion'.

Response

A successful response

created_atstring required

The time the entity was created (in milliseconds since Unix epoch)

idstring required

The unique identifier for the entity

last_message_atstring date-time nullable required

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

namestring nullable required

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

Example response

{
  "created_at": "123.45",
  "last_message_at": "2023-12-01T05:00:00.401Z",
  "name": "Project Alpha Team"
}