Skip to main content
POST
Create Message Channel

Authorizations

X-API-KEY
string
header
required

Body

application/json

Message channel to create

membershipType
enum<string>
required

MembershipType is the kind of channel to create.

Available options:
company,
individual,
group
Example:

"individual"

clientId
string

ClientID is the client id for an individual channel. Alternative to membershipEntityId.

Example:

"client_abc123"

companyId
string

CompanyID is the company id for a company channel, or to disambiguate a client that belongs to multiple companies.

Example:

"company_abc123"

memberIds
string[]

MemberIds are the client user ids to include. Required for group channels.

Example:
membershipEntityId
string

MembershipEntityId is the company id (company channel) or client id (individual channel) the channel is scoped to.

Example:

"client_abc123"

Response

OK

clientId
string

ClientID is the id of the client associated with an individual channel.

Example:

"client_abc123"

companyId
string

CompanyID is the id of the company associated with the channel.

Example:

"company_abc123"

createdAt
string<date-time>

CreatedAt is the time the channel was created.

Example:

"2023-01-01T00:00:00Z"

id
string<uuid>

ID is the unique identifier of the message channel.

Example:

"abc123"

lastMessageDate
string<date-time> | null

LastMessage is the time the most recent message was sent in the channel.

Example:

"2023-01-03T00:00:00Z"

lastRead
string<date-time>

LastRead is the time the viewer last read the channel. Populated alongside UnreadCount; omitted otherwise.

Example:

"2023-01-02T12:00:00Z"

memberIds
string[]

MemberIds are the user ids that belong to the channel.

Example:
membershipEntityId
string

MembershipEntityId is the id of the entity (company or client) the channel is scoped to.

Example:

"client_abc123"

membershipType
enum<string>

MembershipType describes whether the channel is scoped to a company, a single client, or an ad-hoc group.

Available options:
company,
individual,
group
Example:

"individual"

object
string

Object is the resource type discriminator, always "messageChannel".

Example:

"messageChannel"

unreadCount
integer

UnreadCount is the number of unread messages for the viewer. Populated by the /unread endpoint and by the list endpoint when includeUnread=true; omitted otherwise.

Example:

3

updatedAt
string<date-time>

UpdatedAt is the time the channel was last updated.

Example:

"2023-01-02T00:00:00Z"