v8

OpenAPI 3.1.02026-08-033623795.0 MB
Dm channels

Create dm channel

Create a new DM channel between two or more users, optionally scoped to a specific company. Returns the existing channel if one already exists.

post/dm_channels

Request body

company_idstring nullable

The unique identifier of the company to scope this DM channel to. When set, the channel is visible only within that company context.

custom_namestring nullable

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

with_user_idsstring[] required

The list of user identifiers to include in the DM channel. Each entry can be an email, username, or user ID (e.g. 'user_xxxxx').

Example request

{
  "company_id": "biz_xxxxxxxxxxxxxx"
}

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"
}