insertMessage Mutation
Sends a message or comment to a Hive chat, action, note, goal, project, opportunity, or notification.
Requires target-container access; participant-created direct messages require workspace access.
For an existing container, pass containerId and containerType. For a new direct message, omit
containerId and pass workspaceId, participants, and containerType: group. Participants must be
active workspace members, external members, or system admins, never stubs. Prefer bodyMarkdown
and omit body; body wins when both are supplied. To notify, put the 17-character user ID in
mentions and <@USER_ID> in bodyMarkdown; plain @name or @userId does not notify. To mention a
whole group chat, put GROUP:
Arguments
#
_id
Optional client-generated message ID; the server generates one when omitted. Resending your own message ID to the same container returns that stored message instead of creating a duplicate
containerId
Existing container ID; omit only when creating or finding a direct message from participants
containerType = "group"
Message container type. Specify explicitly with containerId. Supported here: action, group, note, goal, project, opportunity, notification
participants = []
Direct-message participant IDs; each must be an eligible active workspace participant with a non-stub account
mentions = []
17-char user IDs to notify, or GROUP:
automated
bodyMarkdown
Markdown message body; converted to Slate HTML before storage; preferred for agent-authored content when body is omitted
color
isNoteJsonComment
replyToMessageId
Original comment the caller can read on the same action; omitted for ordinary comments
mentionType
Space-separated action notification categories: ACTION, PROJECT, PROJECT_OWNER; recipient IDs still come from mentions
isPrivate
userMentionsByGroup = []
User IDs to notify because their group was mentioned; pass expanded member IDs, not group IDs (mention a group chat with GROUP:
senderFirstName
Custom sender display name (overrides default user name when sending as an identity)
senderPicture
Custom sender profile picture URL (overrides default user avatar when sending as an identity)
onBehalfOfUserId
If Buzz is authoring the comment on behalf of a human, store that human's user id
Response
#
Returns Message !.
Example
#
insertLink
insertNewsCategory