Marketplace API / Types

PostChatMessageInput

Input

A message to post in a channel.

input PostChatMessageInput

Input fields

FieldTypeDescription
chatChannelIdID!The channel to post in.
idempotencyKeyString!1 to 200 characters. The CHAT_MESSAGE realtime event returns it as clientMessageUuid.
mediaIdIDOne image: the asset of a READY upload that the caller created with purpose CHAT_IMAGE. A message may have an image and no text.
mentionEveryoneBooleanNotifies every channel member. Needs viewer.canMentionEveryone on the channel. Default: false.
mentionedUserIds[ID!]The users whose mention spans appear in text. A user blocked in either direction is dropped and the span becomes @username. An unknown user gives UserNotFoundError. 1 to 100 unique IDs when present.
productIds[ID!]1 to 10 unique listings that the caller can see. An unknown listing gives ProductNotFoundError.
replyToMessageIdIDA message in the same channel that is not deleted.
textStringHTML. The server removes markup that is not allowed, such as <script>. A mention is <span class="mention">@{userId}</span>, where userId is the user's User.id value. The server stores the span with the raw user ID, and ChatMessage.text returns the stored form. A link is <a class="link" href="...">. Null for an attachment-only message. Text that is empty after trimming counts as null. A message without text and without an attachment is a thrown VALIDATION_ERROR.