The response is a JSON Array of objects with the following fields:
id
string
The ID for the message. If a message is created with no ID, a random UUID-based ID will be automatically created for it.
authorID
string
The ID for the user that sent the message.
groupID
string
The ID for the group this message belongs to.
threadID
string
The ID for the thread this message is part of.
content
MessageContent
The content of the message.
This is an array of items. Each item can be one of the following:
MessageAssigneeNode
This is an object with the following fields:
Show property details
MessageBulletNode
This is an object with the following fields:
Show property details
MessageCodeNode
This is an object with the following fields:
Show property details
MessageLinkNode
This is an object with the following fields:
Show property details
MessageMentionNode
This is an object with the following fields:
Show property details
MessageNumberBulletNode
This is an object with the following fields:
Show property details
MessageParagraphNode
This is an object with the following fields:
Show property details
MessageQuoteNode
This is an object with the following fields:
Show property details
MessageTextNode
This is an object with the following fields:
Show property details
MessageTodoNode
This is an object with the following fields:
Show property details
MessageMarkdownNode
This is an object with the following fields:
Show property details
plaintext
string
A plaintext version of the structured message content.
url
string | null
A URL where the message can be seen. This determines where a user is sent when they click on a reference to this message, such as in a notification. If unset, it defaults to the thread's URL.
createdTimestamp
Date
The timestamp when this message was created. The default value is the current time.
deletedTimestamp
Date | null
The timestamp when this message was deleted, if it was. If unset, the message is not deleted.
updatedTimestamp
Date | null
The timestamp when this message was last edited, if it ever was. If unset, the message does not show as edited.
iconURL
string | null
The URL of the icon to show next to the message. This is only used for action_message messages; other messages show the avatar of the author. If an action_message does not have an icon set, no icon is shown.
translationKey
string | null
An optional translation key used for this message. This is useful for system-generated messages where you might want to translate or customize them at runtime. See the translations documentation for more information.
type
"action_message" | "user_message"
The type of message this is. A user_message is a message that the author sent. An action_message is a message about something that happened, such as the thread being resolved. The default value is user_message.
metadata
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
extraClassnames
string | null
A optional space separated list of classnames to add to the message.
attachments
MessageAttachment[]
The items attached to this message.
This is an array of items. Each item can be one of the following:
MessageFileAttachment
This is an object with the following fields:
Show property details
MessageAnnotationAttachment
This is an object with the following fields:
Show property details
MessageScreenshotAttachment
This is an object with the following fields:
Show property details
MessageLinkPreviewAttachment
This is an object with the following fields:
Show property details
reactions
Reaction[]
The reactions to this message.
This is an array of objects, each of which has the following fields:
Show property details
seenBy
string[]
A list of IDs of the users that have seen the message.
skipLinkPreviews
boolean
If set, Cord won't analyze links in the message to generate previews.
Pagination token. This is returned in the pagination object of a previous response.
filter
optional
ServerListMessageFilter
Messages will be matched against the filters specified. This is a partial match, which means any keys other than the ones you specify are ignored when checking for a match. Please note that because this is a query parameter in a REST API, this JSON object must be URI encoded before being sent.
The response is an object with the following fields:
id
string
The ID for the message. If a message is created with no ID, a random UUID-based ID will be automatically created for it.
authorID
string
The ID for the user that sent the message.
groupID
string
The ID for the group this message belongs to.
threadID
string
The ID for the thread this message is part of.
content
MessageContent
The content of the message.
This is an array of items. Each item can be one of the following:
MessageAssigneeNode
This is an object with the following fields:
Show property details
MessageBulletNode
This is an object with the following fields:
Show property details
MessageCodeNode
This is an object with the following fields:
Show property details
MessageLinkNode
This is an object with the following fields:
Show property details
MessageMentionNode
This is an object with the following fields:
Show property details
MessageNumberBulletNode
This is an object with the following fields:
Show property details
MessageParagraphNode
This is an object with the following fields:
Show property details
MessageQuoteNode
This is an object with the following fields:
Show property details
MessageTextNode
This is an object with the following fields:
Show property details
MessageTodoNode
This is an object with the following fields:
Show property details
MessageMarkdownNode
This is an object with the following fields:
Show property details
plaintext
string
A plaintext version of the structured message content.
url
string | null
A URL where the message can be seen. This determines where a user is sent when they click on a reference to this message, such as in a notification. If unset, it defaults to the thread's URL.
createdTimestamp
Date
The timestamp when this message was created. The default value is the current time.
deletedTimestamp
Date | null
The timestamp when this message was deleted, if it was. If unset, the message is not deleted.
updatedTimestamp
Date | null
The timestamp when this message was last edited, if it ever was. If unset, the message does not show as edited.
iconURL
string | null
The URL of the icon to show next to the message. This is only used for action_message messages; other messages show the avatar of the author. If an action_message does not have an icon set, no icon is shown.
translationKey
string | null
An optional translation key used for this message. This is useful for system-generated messages where you might want to translate or customize them at runtime. See the translations documentation for more information.
type
"action_message" | "user_message"
The type of message this is. A user_message is a message that the author sent. An action_message is a message about something that happened, such as the thread being resolved. The default value is user_message.
metadata
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
extraClassnames
string | null
A optional space separated list of classnames to add to the message.
attachments
MessageAttachment[]
The items attached to this message.
This is an array of items. Each item can be one of the following:
MessageFileAttachment
This is an object with the following fields:
Show property details
MessageAnnotationAttachment
This is an object with the following fields:
Show property details
MessageScreenshotAttachment
This is an object with the following fields:
Show property details
MessageLinkPreviewAttachment
This is an object with the following fields:
Show property details
reactions
Reaction[]
The reactions to this message.
This is an array of objects, each of which has the following fields:
Show property details
seenBy
string[]
A list of IDs of the users that have seen the message.
skipLinkPreviews
boolean
If set, Cord won't analyze links in the message to generate previews.
The reactions you want to add to this message. The default timestamp is the current time. Trying to create a reaction that already exists for a user does nothing. Doing the same as before with a timestamp will update the reaction with the new timestamp. The reaction users need to be an active member of the group that the message and thread belong to.
This is an array of objects, each of which has the following fields:
Show property details
addAttachments
optional
CreateFileAttachment[]
A list of attachments to add to the message. The same file cannot be attached to the same message multiple times.
This is an array of objects, each of which has the following fields:
Show property details
authorID
required
string
The ID for the user that sent the message.
content
required
MessageContent
The content of the message.
This is an array of items. Each item can be one of the following:
MessageAssigneeNode
This is an object with the following fields:
Show property details
MessageBulletNode
This is an object with the following fields:
Show property details
MessageCodeNode
This is an object with the following fields:
Show property details
MessageLinkNode
This is an object with the following fields:
Show property details
MessageMentionNode
This is an object with the following fields:
Show property details
MessageNumberBulletNode
This is an object with the following fields:
Show property details
MessageParagraphNode
This is an object with the following fields:
Show property details
MessageQuoteNode
This is an object with the following fields:
Show property details
MessageTextNode
This is an object with the following fields:
Show property details
MessageTodoNode
This is an object with the following fields:
Show property details
MessageMarkdownNode
This is an object with the following fields:
Show property details
type
optional
"action_message" | "user_message"
The type of message this is. A user_message is a message that the author sent. An action_message is a message about something that happened, such as the thread being resolved. The default value is user_message.
id
optional
string
The ID for the message. If a message is created with no ID, a random UUID-based ID will be automatically created for it.
createdTimestamp
optional
Date
The timestamp when this message was created. The default value is the current time.
iconURL
optional
string | null
The URL of the icon to show next to the message. This is only used for action_message messages; other messages show the avatar of the author. If an action_message does not have an icon set, no icon is shown.
metadata
optional
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
url
optional
string | null
A URL where the message can be seen. This determines where a user is sent when they click on a reference to this message, such as in a notification. If unset, it defaults to the thread's URL.
deletedTimestamp
optional
Date | null
The timestamp when this message was deleted, if it was. If unset, the message is not deleted.
updatedTimestamp
optional
Date | null
The timestamp when this message was last edited, if it ever was. If unset, the message does not show as edited.
translationKey
optional
string | null
An optional translation key used for this message. This is useful for system-generated messages where you might want to translate or customize them at runtime. See the translations documentation for more information.
extraClassnames
optional
string | null
A optional space separated list of classnames to add to the message.
skipLinkPreviews
optional
boolean
If set, Cord won't analyze links in the message to generate previews.
createThread
optional
Omit<ServerCreateThread, "id">
The parameters for creating a thread if the supplied thread doesn't exist yet. If the thread doesn't exist but createThread isn't provided, the call will generate an error. This value is ignored if the thread already exists.
Listed below are the fields of the request body to be added as part of the HTTP PUT request.
removeReactions
optional
ServerRemoveReactions[]
The reactions you want to remove from this message. Removing a reaction that does not exist will have no effect and will not return an error. An error is returned if a reaction is both added and deleted in the same request.
removeAttachments
optional
RemoveAttachment[]
The attachments you want to remove from this message. Removing an attachment that doesn't exist has no effect and won't return an error. Attempting to add and remove the same attachment in one request is an error.
This is an array of items. Each item can be one of the following:
RemoveLinkPreviewAttachment
This is an object with the following fields:
Show property details
RemoveFileAttachment
This is an object with the following fields:
Show property details
type
optional
"action_message" | "user_message"
The type of message this is. A user_message is a message that the author sent. An action_message is a message about something that happened, such as the thread being resolved. The default value is user_message.
id
optional
string
The ID for the message. If a message is created with no ID, a random UUID-based ID will be automatically created for it.
createdTimestamp
optional
Date
The timestamp when this message was created. The default value is the current time.
iconURL
optional
string | null
The URL of the icon to show next to the message. This is only used for action_message messages; other messages show the avatar of the author. If an action_message does not have an icon set, no icon is shown.
metadata
optional
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
url
optional
string | null
A URL where the message can be seen. This determines where a user is sent when they click on a reference to this message, such as in a notification. If unset, it defaults to the thread's URL.
authorID
optional
string
The ID for the user that sent the message.
content
optional
MessageContent
The content of the message.
This is an array of items. Each item can be one of the following:
MessageAssigneeNode
This is an object with the following fields:
Show property details
MessageBulletNode
This is an object with the following fields:
Show property details
MessageCodeNode
This is an object with the following fields:
Show property details
MessageLinkNode
This is an object with the following fields:
Show property details
MessageMentionNode
This is an object with the following fields:
Show property details
MessageNumberBulletNode
This is an object with the following fields:
Show property details
MessageParagraphNode
This is an object with the following fields:
Show property details
MessageQuoteNode
This is an object with the following fields:
Show property details
MessageTextNode
This is an object with the following fields:
Show property details
MessageTodoNode
This is an object with the following fields:
Show property details
MessageMarkdownNode
This is an object with the following fields:
Show property details
updatedTimestamp
optional
Date | null
The timestamp when this message was last edited, if it ever was. If unset, the message does not show as edited.
translationKey
optional
string | null
An optional translation key used for this message. This is useful for system-generated messages where you might want to translate or customize them at runtime. See the translations documentation for more information.
extraClassnames
optional
string | null
A optional space separated list of classnames to add to the message.
skipLinkPreviews
optional
boolean
If set, Cord won't analyze links in the message to generate previews.
addReactions
optional
ServerAddReactions[]
The reactions you want to add to this message. The default timestamp is the current time. Trying to create a reaction that already exists for a user does nothing. Doing the same as before with a timestamp will update the reaction with the new timestamp. The reaction users need to be an active member of the group that the message and thread belong to.
This is an array of objects, each of which has the following fields:
Show property details
addAttachments
optional
CreateFileAttachment[]
A list of attachments to add to the message. The same file cannot be attached to the same message multiple times.
This is an array of objects, each of which has the following fields:
Show property details
deleted
optional
boolean
Whether we want to mark this message as deleted. Setting this to true without providing a value for deletedTimestamp is equivalent to setting deletedTimestamp to current time and setting this to false is equivalent to setting deletedTimestamp to null.
deletedTimestamp
optional
Date | null
The timestamp when this message was deleted, if it was. If set to null, the message is not deleted. Deleting a message this way will only soft delete it, replacing the content of the message with a record of the deletion on the frontend. If you'd like to permanently delete it instead, use the delete message endpoint.