Skip to main content

CHANNEL API Reference

Module Information

Service Files:

  • Private: service/private/channel.js
  • Public: service/channel.js

Available Services: 26 Documented Services: 26


channel.acknowledge

Mark a specific channel message as read/acknowledged by the current user. Broadcasts the updated message state to all other participants in the hub via WebSocket, excluding the sender's socket.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.acknowledge

Parameters

ParameterTypeRequiredDefaultDescription
message_idstringNo-ID of the message to acknowledge
socket_idstringYes-Caller's WebSocket socket ID. Used to exclude the caller from the broadcast recipients.

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.acknowledge_ticket

Mark a support ticket message as read/acknowledged. Broadcasts the acknowledgement to all support domain members and to the current user's own sockets.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.acknowledge_ticket

Parameters

ParameterTypeRequiredDefaultDescription
message_idstringNo-ID of the ticket message to acknowledge
ticket_idstringYes-ID of the ticket that contains the message

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.clear_notifications

Clear all channel notifications for the current user. Broadcasts an empty payload to the user's sockets and clears the notification records in the database.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/channel.clear_notifications

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.delete

Delete one or more channel messages. Supports two deletion modes: me (hide from the current user only) or all (delete for all participants, restricted to message author). Broadcasts deletions to hub participants and cleans up any attached files from the file system.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.delete

Parameters

ParameterTypeRequiredDefaultDescription
optionstringYes-Deletion scope. Must be me (hide for current user only) or all (delete for all, author only).
messagesarrayYes-Array of message IDs to delete

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_OPTION400option is not me or all, or option is all but current user is not the message author
INVALID_MESSAGES404One or more provided message IDs do not exist

channel.enter

Public channel entry point. Accepts an optional message payload and echoes it back. Used for DMZ or guest-level channel access.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/channel.enter

Parameters

ParameterTypeRequiredDefaultDescription
messagestringNo-Optional message content. Defaults to empty string.

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Possible Errors

Error codes not documented


channel.list_tickets

List support tickets for the current user with optional status filter, pagination, and ticket ID search. Retrieves tickets from the user's sharebox (wicket) hub.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.list_tickets

Parameters

ParameterTypeRequiredDefaultDescription
statusarrayNo-Array of status values to filter by. Defaults to new.
pagenumberNo-Page number for pagination (default: 1)
ticket_idstringNo-Optional ticket ID to search for a specific ticket within the results

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.live_message

Public live message endpoint. Accepts an optional message payload and echoes it back. Used for real-time guest or DMZ channel interactions.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/channel.live_message

Parameters

ParameterTypeRequiredDefaultDescription
messagestringNo-Optional message content. Defaults to empty string.

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Possible Errors

Error codes not documented


channel.messages

Retrieve paginated channel messages for the current hub. Enriches each message with author contact information, thread context for replies, and broadcasts an acknowledge signal to all other hub participants.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.messages

Parameters

ParameterTypeRequiredDefaultDescription
orderstringNo-Sort order for messages. asc for oldest first, desc for newest first. Defaults to asc.
pagenumberNo-Page number for pagination (default: 1)

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.entityobjectAuthor contact information from shareroom_contact_get procedure. For messages by the current user, contains only id.
items.threadobjectThread context object if the message is a reply (only present when thread_id is set)

Possible Errors

Error codes not documented


channel.notify

Retrieve channel notification data for the current user. Alias for notify_chat.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/channel.notify

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.post

Post a new message to the current hub channel. Supports text messages, threaded replies, and file attachments. Moves attachment files to the appropriate sharebox directory and broadcasts the new message to all hub participants except the sender.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.post

Parameters

ParameterTypeRequiredDefaultDescription
messagestringNo-Text content of the message. Defaults to empty string. Single quotes are automatically escaped.
thread_idstringNo-Message ID of the parent message to reply to. Creates a threaded reply when provided.
attachmentarrayNo-Array of file node IDs to attach to the message. Files are moved to the message directory in the sharebox hub.
nidstringNo-Folder node ID for folder-scoped posts. Scopes the message to that folder and enables folder_attachment promotion.
folder_attachmentarrayNo-Subset of attachment: staged device uploads to move into the folder identified by nid on send. Each node must sit in the hub chat staging directory, be owned by the caller, and the caller must hold write permission on the destination folder; otherwise the node is kept as a regular sbox-only attachment.
socket_idstringYes-Caller's WebSocket socket ID. Used to exclude the caller from the broadcast recipients.
echoIdstringNo-Client-side echo identifier for optimistic UI updates

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Possible Errors

Error codes not documented


channel.post_ticket

Post a reply message to an existing support ticket. Supports threaded replies and file attachments. Broadcasts the new message to the ticket owner and all support domain members.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.post_ticket

Parameters

ParameterTypeRequiredDefaultDescription
ticket_idstringYes-ID of the ticket to post a reply to
messagestringNo-Text content of the reply. Defaults to empty string.
thread_idstringNo-Message ID of the parent message to reply to within the ticket thread
attachmentarrayNo-Array of file node IDs to attach to the ticket reply
echoIdstringNo-Client-side echo identifier for optimistic UI updates

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_TICKET404No ticket found with the given ticket_id

channel.read

Mark all messages in a channel as read up to a given message ID for the current user.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.read

Parameters

ParameterTypeRequiredDefaultDescription
idstringNo-Message ID up to which all messages are marked as read via channel_read_messages procedure

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.send_ticket

Create a new support ticket with an initial message. Optionally includes file attachments, category tags, affected areas, and recurrence flag. Automatically sends an auto-reply, broadcasts to the ticket owner and all support domain members.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.send_ticket

Parameters

ParameterTypeRequiredDefaultDescription
messagestringYes-Initial ticket message content. Single quotes are automatically escaped.
categoryarrayYes-Array of category tags for the ticket (e.g. tech, design, enhancement, notunderstand)
attachmentarrayNo-Array of file node IDs to attach to the ticket. Defaults to empty array.
wherearrayNo-Array of platform area identifiers where the issue occurred (e.g. desktop, chat, teamroom). Defaults to empty array.
alltimenumberNo-Flag indicating if the issue is recurring. Defaults to 0.
echoIdstringNo-Client-side echo identifier for optimistic UI updates

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Possible Errors

Error codes not documented


channel.show_ticket

Retrieve the full message thread for a support ticket including author contact enrichment, metadata parsing, category and location display labels, and thread context for replies. Broadcasts acknowledgement signals to support members for newly read messages.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.show_ticket

Parameters

ParameterTypeRequiredDefaultDescription
ticket_idstringYes-ID of the ticket whose messages to retrieve
pagenumberNo-Page number for pagination (default: 1)

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.entityobjectAuthor contact information from shareroom_contact_get procedure
items.metadataobjectParsed message metadata including category_display and where_display label arrays for ticket messages
items.threadobjectThread context object if the message is a reply

Possible Errors

Error codes not documented


channel.to_read

Get the number of unread message pages for the current user in the channel. Alias for pages_to_read.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.to_read

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented


channel.update_ticket

Update the metadata (e.g. status) of an existing support ticket. Restricted to users belonging to the configured support domain. Broadcasts the updated ticket to the ticket owner and all support domain members.

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (8)

Endpoint:

https://hostname/-/svc/channel.update_ticket

Parameters

ParameterTypeRequiredDefaultDescription
ticket_idstringYes-ID of the ticket to update
statusstringNo-New status value to set on the ticket metadata

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error CodeHTTP StatusDescription
INVALID_DOMAIN403Current user does not belong to the configured support domain
INVALID_TICKET404No ticket found with the given ticket_id

channel.write

Post a new message to a share hub channel. Intended for use in DMZ (share hub) context where the author may be an anonymous guest identified via yp.dmz_user. Requires chat permission (read + write combined, value 6). Supports threaded replies and file attachments. Broadcasts the new message to all hub participants except the sender.

PropertyValue
ScopeHub (requires hub context)
PermissionChat (6)

Endpoint:

https://hostname/-/svc/channel.write

Parameters

ParameterTypeRequiredDefaultDescription
message_idstringYes-Client-generated unique message ID (16-char hex). Must be unique across the channel table.
messagestringNo-Text content of the message. Defaults to empty string.
thread_idstringNo-Message ID of the parent message to reply to. Creates a threaded reply when provided.
attachmentarrayNo-Array of file node IDs to attach to the message.
is_forwardnumberNo-Forward flag. Set to 1 if this message is forwarded from another source. Defaults to 0.
socket_idstringYes-Caller's WebSocket socket ID. Used to exclude the caller from the broadcast recipients.
echoIdstringNo-Client-side echo identifier for optimistic UI updates.

Returns

FieldTypeDescription
typeany-
docany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_PARAM400message_id or socket_id is missing

channel.list_notifications

Retrieve paginated notification list for the current user aggregated across all their hubs. Supports filtering by type (all, mention, share) and an unread-only toggle. Iterates all active hubs owned by the current user, calls channel_list_notifications per hub, merges and sorts results by ctime DESC. Returns only messages where the current user is in the delivered recipients list, excluding own messages and soft-deleted messages.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.list_notifications

Parameters

ParameterTypeRequiredDefaultDescription
typestringNo-Notification filter type. Accepted values: all (default) — all activity directed at current user; mention — messages where current user's ID is in mention_ids; share — forwarded messages (is_forward = 1) or messages with file attachments.
unread_onlynumberNo-Set to 1 to return only unread notifications (current user not yet in seen). Defaults to 0 (return all).
pagenumberNo-Page number for pagination (default: 1).

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.sys_idnumberMessage sequence ID
items.author_idstringID of the message author
items.messagestringMessage text content
items.message_idstringUnique message identifier
items.thread_idstringParent message ID if this is a reply
items.is_forwardnumber1 if message is forwarded, 0 otherwise
items.attachmentstringJSON-encoded attachment array, null if none
items.is_attachmentnumber1 if message has attachments, 0 otherwise
items.mention_idsarrayArray of user IDs mentioned in this message, null if none
items.ctimenumberUnix timestamp when the message was posted
items.firstnamestringAuthor first name (from yp.drumate) or display name (from yp.dmz_user for anonymous guests)
items.lastnamestringAuthor last name, empty string for anonymous guests
items.fullnamestringAuthor full name
items.is_readnumber1 if current user has seen this message, 0 if unread

Possible Errors

Error codes not documented


channel.bookmark_add

Pin a notification message for quick access. Bookmarks live in the caller's drumate DB so any authenticated user with read access to the hub may bookmark a message they can see.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.bookmark_add

Parameters

ParameterTypeRequiredDefaultDescription
message_idstringYes-Unique message ID to bookmark (from channel table)
hub_idstringYes-Hub ID where the message lives

Returns

FieldTypeDescription
idnumberBookmark record ID
message_idstringBookmarked message ID
hub_idstringHub the message belongs to
ctimenumberBookmark creation timestamp

channel.bookmark_remove

Unpin a previously bookmarked notification. Per-user storage, requires only read access to the hub.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.bookmark_remove

Parameters

ParameterTypeRequiredDefaultDescription
message_idstringYes-Unique message ID to remove from bookmarks

Returns

FieldTypeDescription
affectednumberNumber of rows deleted (0 or 1)

channel.bookmark_list

Get paginated list of bookmarked notifications for the current user. Per-user storage, requires read access only.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.bookmark_list

Parameters

ParameterTypeRequiredDefaultDescription
pagenumber (min: 1)No1Page number for pagination

Returns

FieldTypeDescription
itemsarray<object>Bookmarked notifications sorted by ctime DESC
items[].message_idstring-
items[].hub_idstring-
items[].ctimenumber-

channel.dm_init

Get or create a 1-on-1 DM conversation hub with a specific user

PropertyValue
ScopeHub (requires hub context)
PermissionOwner (32)

Endpoint:

https://hostname/-/svc/channel.dm_init

Parameters

ParameterTypeRequiredDefaultDescription
recipient_idstringYes-UID of the user to start a DM conversation with

Returns

FieldTypeDescription
hub_idstringDM hub ID
home_idstringDM hub home directory node ID
db_namestringDM hub database name
is_newnumber1 if newly created, 0 if existing

channel.list_conversations

List all DM conversations for the current user, sorted by last message time DESC

PropertyValue
ScopeHub (requires hub context)
PermissionOwner (32)

Endpoint:

https://hostname/-/svc/channel.list_conversations

Parameters

ParameterTypeRequiredDefaultDescription
pagenumber (min: 1)No1Page number (20 conversations per page)

Returns

FieldTypeDescription
itemsarray<object>DM conversation list sorted by last_message_time DESC
items[].hub_idstring-
items[].other_uidstringUID of the other party
items[].other_userobjectOther user profile (name, avatar)
items[].last_messagestringLast message preview (max 100 chars), or '[File]' for attachments
items[].last_message_timenumberUnix timestamp of last message
items[].unread_countnumberNumber of unread messages from other party

channel.list_by_file

Get all channel messages in the current hub that have a specific file attached. Powers the See Chat Threads feature from the file context menu. Searches the attachment JSON array for the given file_nid.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.list_by_file

Parameters

ParameterTypeRequiredDefaultDescription
file_nidstringYes-Media node ID of the file to search for in message attachment arrays

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.sys_idnumberAuto-incremented message sequence ID
items.author_idstringUID of the message author
items.messagestringMessage text content
items.message_idstringUnique message identifier
items.thread_idstringParent message ID if this is a reply, null otherwise
items.attachmentstringJSON array of attached file nids
items.is_forwardnumber1 if message is forwarded, 0 otherwise
items.mention_idsarrayArray of user IDs mentioned in this message
items.statusstringMessage status: active
items.ctimenumberUnix timestamp when the message was posted
items.metadatastringAdditional message metadata JSON, null if not set

channel.list_thread_by_file

Get all channel messages in the current hub that either attach the file OR mention it inline as @Filename in the message body. Powers See Chat Threads with mention indexing. Server merges channel_list_by_file (attachment hits) and channel_search (mention pattern hits), dedupes by message_id, sorts ctime DESC.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.list_thread_by_file

Parameters

ParameterTypeRequiredDefaultDescription
file_nidstringYes-Media node ID to find in attachment array OR mention pattern mention:hub_id:file_nid

Returns

FieldTypeDescription
typeany-
docany-
itemsobject-
items.sys_idnumberAuto-incremented message sequence ID
items.author_idstringUID of the message author
items.messagestringMessage text content
items.message_idstringUnique message identifier
items.thread_idstringParent message ID if this is a reply, null otherwise
items.attachmentstringJSON array of attached file nids
items.is_forwardnumber1 if message is forwarded, 0 otherwise
items.mention_idsarrayArray of user IDs mentioned in this message
items.statusstringMessage status: active
items.ctimenumberUnix timestamp when the message was posted
items.metadatastringAdditional message metadata JSON, null if not set

channel.typing

Broadcast an ephemeral typing indicator to all other hub participants over WebSocket. Nothing is persisted; the indicator is rendered transiently in the recipient's chat widget.

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/channel.typing

Parameters

ParameterTypeRequiredDefaultDescription
statenumberNo-1 = typing, 0 = stopped. Defaults to 1.
socket_idstringYes-Caller's WebSocket socket ID. Used to exclude the caller from the broadcast recipients.

Returns

FieldTypeDescription
typeany-
docany-

Possible Errors

Error codes not documented