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 membershipEntityId is a convenience property for individual and company message channels that allows you to easily identify the source entity for that message channel (without having to e.g. search through the memberIds).

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.

membershipEntityId string
The id of the entity (client or company) that is the source of this message channel. Based on membershipType this value will represent the id of different resources.

membershipTypemembershipEntityId
individualThe value represents a client.
companyThe values represents a company.
groupThe value is empty.

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",
    "memberIds": [
        "b22a34db-f6ba-40cb-a415-c112d4c853d8",
        "1dbb3e36-af70-4f41-89e6-6ddf9e2c62b5",
        "5c65898e-ce60-4668-b7c8-901a124d046b"
    ],
    "lastMessageDate": "2023-06-26T20:13:53.700046Z"
}