Messages
Messages are the individual comments inside a thread. Use these endpoints to add a message to a thread, edit a message, or delete one. Authenticate with an exchange token (embedded feedback) or a workspace- or organization-scoped API key (server-to-server) — see the Authentication overview.
Create message
POST /api/v2/threads/:threadId/messages
Add a message to a thread.
curl "https://api.markup.io/api/v2/threads/bf1e1045-8868-4b2e-afcd-9585d3f373fb/messages" \
-X POST \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" \
--data '{}'{
"data": {
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"scopes": [
"some string"
],
"assignedRoleSlugs": [
"some string"
],
"threadId": "some threadId",
"message": "some message",
"messageJson": {},
"user": {
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"name": "some name",
"guest": true
},
"userMetaData": {},
"attachments": [
{
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"messageId": "some messageId",
"url": "some url",
"etag": "some etag",
"mimeType": "some mimeType",
"originalFilename": "some originalFilename",
"filesize": 123
}
],
"loomVideos": [
{
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"messageId": "some messageId",
"title": "some title",
"sharedUrl": "some sharedUrl",
"width": 123,
"height": 123
}
],
"content": "some content",
"mentionIds": [
"some string"
],
"read": true
}
}Response Body - MessageResponsePublicWithReadState
Request Path Params ThreadIdRequestParam
| Option | Type | |
|---|---|---|
| threadId | string |
Request Body CreateMessageBodyPublic
| Option | Type | |
|---|---|---|
| content optional | string | |
| mentionIds optional | string[] | |
| message optional | Delta | |
| attachments optional | MessageRequestAttachment[] | |
| loomVideos optional | LoomVideoRequest[] |
Update message
PATCH /api/v2/messages/:id
Edit the content of an existing message.
curl "https://api.markup.io/api/v2/messages/056ebb8c-12e6-44d7-9746-7544962cc716" \
-X PATCH \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" \
--data '{}'{
"data": {
"message": {
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"scopes": [
"some string"
],
"assignedRoleSlugs": [
"some string"
],
"threadId": "some threadId",
"message": "some message",
"messageJson": {},
"user": {
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"name": "some name",
"guest": true
},
"userMetaData": {},
"attachments": [
{
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"messageId": "some messageId",
"url": "some url",
"etag": "some etag",
"mimeType": "some mimeType",
"originalFilename": "some originalFilename",
"filesize": 123
}
],
"loomVideos": [
{
"id": "some id",
"createdAt": {},
"modifiedAt": {},
"messageId": "some messageId",
"title": "some title",
"sharedUrl": "some sharedUrl",
"width": 123,
"height": 123
}
],
"content": "some content",
"mentionIds": [
"some string"
],
"read": true
}
}
}Response Body EditMessageResponsePublic
| Option | Type | |
|---|---|---|
| message |
Request Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
Request Body UpdateMessageBodyPublic
| Option | Type | |
|---|---|---|
| content optional | string | |
| mentionIds optional | string[] | |
| message optional | Delta | |
| attachments optional | MessageRequestAttachment[] | |
| loomVideos optional | LoomVideoRequest[] | |
| priority optional | number |
Mark message as read
POST /api/v2/messages/:id/read
Mark a single message as read for the authenticated user. Read state is per user: with an
exchange token it is recorded against the end user the token identifies, and with an API key it is recorded
against the key’s API user. This does not mark the enclosing thread as read: a thread reports read: true
only once it has itself been marked through POST /api/v2/threads/:id/read and every message in it is read,
so marking each message individually is not equivalent to marking the thread. Returns 204 with no body.
curl "https://api.markup.io/api/v2/messages/07569538-7c3e-47f8-8b4b-14ab5c9d02e2/read" \
-X POST \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" 204 No ContentRequest Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
Delete message
DELETE /api/v2/messages/:id
Delete a message from its thread.
curl "https://api.markup.io/api/v2/messages/0c1c3c6c-85dc-4b5e-af85-823ccf65baa7" \
-X DELETE \
-H "Authorization: Bearer <API-KEY-SECRET>" \
-H "Markup-API-Version: 2023-02-22" \
-H "Content-Type: application/json" 204 No ContentRequest Path Params IdRequestParam
| Option | Type | |
|---|---|---|
| id | string |
Related types
LoomVideoResponse
| Option | Type | |
|---|---|---|
| id | string | |
| createdAt | Unix_Timestamp_Utc_Milliseconds | |
| modifiedAt | Unix_Timestamp_Utc_Milliseconds | |
| messageId | string | |
| title | string | |
| sharedUrl | string | |
| width | number | |
| height | number |
AuthorUserResponse
| Option | Type | |
|---|---|---|
| id | string | |
| createdAt | Unix_Timestamp_Utc_Milliseconds | |
| modifiedAt | Unix_Timestamp_Utc_Milliseconds | |
| name | string | |
| guest | boolean |
IUserResourceMetaData
| Option | Type | |
|---|---|---|
| lastSeenAt | number |
MessageResponsePublicWithReadState
| Option | Type | |
|---|---|---|
| id | string | |
| createdAt | Unix_Timestamp_Utc_Milliseconds | |
| modifiedAt | Unix_Timestamp_Utc_Milliseconds | |
| scopes | string[] | |
| assignedRoleSlugs | string[] | |
| threadId | string | |
| message | string | |
| messageJson | Delta | |
| user | ||
| userMetaData | ||
| attachments | MessageAttachmentResponse[] | |
| loomVideos | LoomVideoResponse[] | |
| content | string | |
| mentionIds | string[] | |
| read | boolean | True when the caller has seen this message since it last changed. Always true here: writing a message records the caller's read. |