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.
organizationID
string
The ID for the organization this message belongs to.
threadID
string
The ID for the thread this message is part of.
content
MessageContent
The content of the message.
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.
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
array
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:
type
"file"
The type of this attachment, which is always file for file attachments.
id
string
The ID of the file.
name
string
The name of the file.
url
string
The URL that a user can use to download the file. This is a signed URL that will expire after 24 hours.
mimeType
string
The MIME type of the file.
size
number
The size of the file, in bytes.
uploadStatus
"uploaded" | "uploading" | "failed" | "cancelled"
The status of the file upload. uploading means that the user has not yet completed uploading the file, uploaded means the file is successfully uploaded, failed means the upload encountered an error, and cancelled means the user cancelled the upload before it was finished.
MessageAnnotationAttachment
This is an object with the following fields:
type
"annotation"
The type of this attachment, which is always annotation for annotation attachments.
screenshot
UploadedFile
The screenshot attached to the annotation.
This is an object with the following fields:
id
string
The ID of the file.
name
string
The name of the file.
url
string
The URL that a user can use to download the file. This is a signed URL that will expire after 24 hours.
mimeType
string
The MIME type of the file.
size
number
The size of the file, in bytes.
uploadStatus
"uploaded" | "uploading" | "failed" | "cancelled"
The status of the file upload. uploading means that the user has not yet completed uploading the file, uploaded means the file is successfully uploaded, failed means the upload encountered an error, and cancelled means the user cancelled the upload before it was finished.
textContent
string | null
(Optional) The text that was selected when creating the annotation.
reactions
Reaction[]
The reactions to this message.
This is an array of objects, each of which has the following fields:
reaction
string
The emoji reaction.
userID
string
The ID of the user who reacted to the message.
timestamp
Date
The timestamp of when the reaction was created.
seenBy
string[]
A list of IDs of the users that have seen the message.
This endpoint returns information about all messages in the application. Most of the times, fetching messages for a specific thread should be preferred.
The response is a JSON Array of objects with the following fields:
messages
CoreMessageData[]
Page containing messages.
This is an array of objects, each of which has 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.
organizationID
string
The ID for the organization this message belongs to.
threadID
string
The ID for the thread this message is part of.
content
MessageContent
The content of the message.
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.
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
array
The items attached to this message.
reactions
Reaction[]
The reactions to this message.
seenBy
string[]
A list of IDs of the users that have seen the message.
pagination
PaginationDetails
Data related to cursor-based pagination.
This is an object with the following fields:
token
string | null
The token to use to get the next page of results. If empty, there are no more results.
total
number
Total number of results. Might be bigger than the number of results returned on the query. Useful to display a "total" counter.
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.
organizationID
string
The ID for the organization this message belongs to.
threadID
string
The ID for the thread this message is part of.
content
MessageContent
The content of the message.
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.
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
array
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:
type
"file"
The type of this attachment, which is always file for file attachments.
id
string
The ID of the file.
name
string
The name of the file.
url
string
The URL that a user can use to download the file. This is a signed URL that will expire after 24 hours.
mimeType
string
The MIME type of the file.
size
number
The size of the file, in bytes.
uploadStatus
"uploaded" | "uploading" | "failed" | "cancelled"
The status of the file upload. uploading means that the user has not yet completed uploading the file, uploaded means the file is successfully uploaded, failed means the upload encountered an error, and cancelled means the user cancelled the upload before it was finished.
MessageAnnotationAttachment
This is an object with the following fields:
type
"annotation"
The type of this attachment, which is always annotation for annotation attachments.
screenshot
UploadedFile
The screenshot attached to the annotation.
This is an object with the following fields:
id
string
The ID of the file.
name
string
The name of the file.
url
string
The URL that a user can use to download the file. This is a signed URL that will expire after 24 hours.
mimeType
string
The MIME type of the file.
size
number
The size of the file, in bytes.
uploadStatus
"uploaded" | "uploading" | "failed" | "cancelled"
The status of the file upload. uploading means that the user has not yet completed uploading the file, uploaded means the file is successfully uploaded, failed means the upload encountered an error, and cancelled means the user cancelled the upload before it was finished.
textContent
string | null
(Optional) The text that was selected when creating the annotation.
reactions
Reaction[]
The reactions to this message.
This is an array of objects, each of which has the following fields:
reaction
string
The emoji reaction.
userID
string
The ID of the user who reacted to the message.
timestamp
Date
The timestamp of when the reaction was created.
seenBy
string[]
A list of IDs of the users that have seen the message.
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 org that the message and thread belong to.
addAttachments
optional
CreateFileAttachment[]
The attachments to add to this message.
This is an array of objects, each of which has the following fields:
type
optional
"file"
id
optional
string
authorID
required
string
The ID for the user that sent the message.
content
required
MessageContent
The content of the 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.
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.
createdTimestamp
optional
Date
The timestamp when this message was created. The default value is the current time.
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.
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.
extraClassnames
optional
string | null
A optional space separated list of classnames to add to the message.
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.
This is an object with the following fields:
name
required
string
The name of the thread. This is shown to users when the thread is referenced, such as in notifications. This should generally be something like the page title.
metadata
optional
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.
url
required
string
A URL where the thread can be seen. This determines where a user is sent when they click on a reference to this thread, such as in a notification, or if they click on a reference to a message in the thread and the message doesn't have its own URL.
organizationID
required
string
The organization ID this thread is in.
extraClassnames
optional
string | null
An optional space separated list of classnames to add to the thread.
Whether the thread is resolved. Setting this to true is equivalent to setting resolvedTimestamp to the current time, and setting this to false is equivalent to setting resolvedTimestamp to null.
subscribers
optional
string[]
All of the users who are subscribed to this thread.
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
RemoveFileAttachment[]
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 objects, each of which has the following fields:
type
optional
"file"
id
optional
string
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.
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.
createdTimestamp
optional
Date
The timestamp when this message was created. The default value is the current time.
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.
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.
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.
extraClassnames
optional
string | null
A optional space separated list of classnames to add to the message.
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 org that the message and thread belong to.
addAttachments
optional
CreateFileAttachment[]
The attachments to add to this message.
This is an array of objects, each of which has the following fields:
type
optional
"file"
id
optional
string
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.