Channel
A Channel is a place Messages flow, such as a chat channel, a Mailbox, or an SMS number.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
medium | string | required | The platform type, such as email, sms, or chat. |
organization | Organization | The outside Organization the Channel is shared with; its new Messages open Conversations for that Customer. | |
external | boolean | True when people from another Organization post in it, as in a channel two companies share. | |
areaCode | string | For an sms Channel, the phone area code its number is drawn from, such as 512. | |
number | string | For an sms Channel, its phone number in international form, assigned when it is created. |
Object
{
"$id": "https: //api.sb/ routewise.dev/ channels/ channel_1",
"$type": "Channel",
"medium": "email",
"organization": "organization_1",
"external": true,
"areaCode": "Example area code",
"number": "Example number"
}Relationships
- A Channel hosts many Threads: a Channel holds Threads.
hosts, inversehostedIn. - A Channel has many Messages: every Message flows through one Channel.
messages, inversepostedIn.
Verbs
createCreates a Channel.POST /{namespace}/channelsgetReturns one Channel by id.GET /{namespace}/channels/{id}listReturns Channels, newest first, one page at a time.GET /{namespace}/channelsupdateChanges the given properties of a Channel.PATCH /{namespace}/channels/{id}deleteDeletes a Channel; its history is kept.DELETE /{namespace}/channels/{id}
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Channel.create | Yes | Yes | Yes | No |
Channel.get | Yes | Yes | Yes | Yes |
Channel.list | Yes | Yes | Yes | Yes |
Channel.update | Yes | Yes | Yes | No |
Channel.delete | Yes | Yes | Yes | No |
Call it
Add a channel to LedgerLark.Example
A tutoring marketplace runs three Channels: the help@ Mailbox, one chat channel per family and its tutor, and an SMS number for session reminders.