Message Channels

This resource represents a channel where Messages can be sent between Internal Users and Clients.

Messages sent in a channel are only accessible to the members of that channel.

Based on whether your default channels are set to clients or companies, every new client (or every new company) in your portal will have a "Welcome Channel" created for them in the Messages app by default (this can also be disabled globally in the Messages App settings). Other message channels must be created manually, either in the UI or via this API.

Based on the membershipType of a message channel, the client members are either pre-determined or fluid. An individual message channel is with a single client; a company message channel contains all clients associated with the corresponding company.

On the other hand, a group message channel has a fluid list of clients within a company (it could potentially have one, several, or even all clients within the company). The members of a group message channel can be added or removed via the UI.

The clientId and companyId properties allow you to easily identify the source entity for a message channel (without having to e.g. search through the memberIds). Only individual channels will have a clientId. The companyId for individual channels indicates which company of the client this channel belongs to.

Properties

id string
The unique identifier for this item. Note: Not all id properties will be in UUID format.

createdAt string
The date this item was created in RFC3339 format.

object string
The object type of this resource.

membershipType string
The type of membership that this channel is associated with. Can be one of individual, group or company.

ValueDescription
individualThis channel contains a single client user.
groupThis channel contains multiple client users. All clients users in a group must belong to the same company.
companyThis channel contains all clients that are associated with a company. When a client is assigned to a company, they will be added to this channel. When a client is deleted or unassigned from a company, they will be removed from this channel.

clientId string

The client this channel belongs to. This is only set for channels when membershipType is individual.

companyId string

Which company this channel belongs to.

membershipEntityId string

Deprecated. Use clientId and companyId instead.

memberIds array of strings
The user IDs associated with this particular channel. These will always be UUIDs of the members of the channel, including clients and internal users.

lastMessageDate string
The timestamp of when the last message was sent in this channel. If no messages have been sent in this channel, the value is null.

{
    "id": "s6v9eziejrrmad40vf3vgp",
    "object": "messageChannel",
    "createdAt": "2022-08-07T15:04:23.024217Z",
    "updatedAt": "2022-08-07T15:12:05.024217Z",
    "membershipType": "company",
  	"membershipEntityId": "a6fcd58b-fc40-46e1-ab49-219ec8162a6b",
	  "companyId": "a6fcd58b-fc40-46e1-ab49-219ec8162a6b",
    "memberIds": [
        "b22a34db-f6ba-40cb-a415-c112d4c853d8",
        "1dbb3e36-af70-4f41-89e6-6ddf9e2c62b5",
        "5c65898e-ce60-4668-b7c8-901a124d046b"
    ],
    "lastMessageDate": "2023-06-26T20:13:53.700046Z"
}