Messages

All available operations for listing and editing messages


Looking for the message data format?

Check out the how-to guide for examples of the Cord message data format

List all messages in a thread #

This endpoint returns information about all messages in a thread.

HTTP Request #

HTTP:
GET https://api.cord.com/v1/threads/<ID>/messages
cURL:
curl "https://api.cord.com/v1/threads/<threadID>/messages" \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord thread get-messages <THREAD_ID>
GET https://api.cord.com/v1/threads/<ID>/messages
Copy

Request Body #

This REST endpoint has no request body.


Query Parameters #

This endpoint can take the following options:


sortDirection
optional
"ascending" | "descending"
Return messages in ascending or descending order of creation timestamp. 'descending' is the default.

Response #

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.

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
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
    "uploading" | "uploaded" | "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 | null
    The screenshot attached to the annotation, if any.

    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
    "uploading" | "uploaded" | "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.

    locationData
    string | null
    The opaque location data generated by Cord. This field may or may not be set, depending on how the annotation was created. The value will be an opaque string that can be passed to stringToViewportCoordinates.

    customData
    CustomAnnotationData | null
    The custom location data for this annotation. This will only be set if you're using the Annotations API to customize your annotation locations.

    This is an object with the following fields:


    location
    Location
    The custom location you produced for this annotation at annotation capture time.

    coordsRelativeToTarget
    object
    The offset of the annotation relative to the element identified by location, in pixels, at the time the annotation was captured. The location and coordsRelativeToTarget will be supplied to the Annotations API render handler in order to position the annotation.

    This is an object with the following fields:


    x
    number

    y
    number

    label
    string | null
    Your custom user-visible label for the annotation, if any.

    textContent
    string | null
    The text that was selected when creating the annotation, if any.
  • MessageScreenshotAttachment

    This is an object with the following fields:


    type
    "screenshot"
    The type of this attachment, which is always screenshot for screenshot attachments.

    screenshot
    UploadedFile
    The screenshot attached to the message. Screenshots are attached via screenshotOptions.captureWhen API.

    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
    "uploading" | "uploaded" | "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.
  • MessageLinkPreviewAttachment

    This is an object with the following fields:


    type
    "link_preview"
    The type of this attachment, which is always link_preview for file link previews.

    url
    string
    The url from which the preview was generated.

    imageURL
    string | null
    URL of the image to show in the link preview. It is usually specified in the meta or og tags of the page.

    title
    string | null
    Title for the link preview. Sometimes it's the page title, sometimes it is specified in meta or og tags.

    description
    string | null
    Description for the link preview. Generated from the url provided from meta or og tags in the page.

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.

skipLinkPreviews
boolean
If set, Cord won't analyze links in the message to generate previews.

List all messages #

This endpoint returns information about all messages in the application. Most of the times, fetching messages for a specific thread should be preferred.

HTTP Request #

HTTP:
GET https://api.cord.com/v1/messages
cURL:
curl "https://api.cord.com/v1/messages" \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord message ls
GET https://api.cord.com/v1/messages
Copy

Request Body #

This REST endpoint has no request body.


Query Parameters #

This endpoint can take the following options:


limit
optional
number
Number of messages to return. Defaults to 1000.

token
optional
string
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.

This is an object with the following fields:


metadata
optional
EntityMetadata
Arbitrary key-value pairs of data associated with the message.

location
optional
string
The location of the thread containing the message.

authorID
optional
string
If provided, will return messages created by this author.

Response #

The response is an object 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.

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.

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
array
The items attached to this message.

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.

skipLinkPreviews
boolean
If set, Cord won't analyze links in the message to generate previews.

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.

Get a message #

This endpoint returns information about a single message.

HTTP Request #

HTTP:
GET https://api.cord.com/v1/threads/<threadID>/messages/<messageID>
cURL:
curl "https://api.cord.com/v1/threads/<threadID>/messages/<messageID>" \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord message get <ID>
GET https://api.cord.com/v1/threads/<threadID>/messages/<messageID>
Copy

Request Body #

This REST endpoint has no request body.

Response #

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.

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
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
    "uploading" | "uploaded" | "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 | null
    The screenshot attached to the annotation, if any.

    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
    "uploading" | "uploaded" | "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.

    locationData
    string | null
    The opaque location data generated by Cord. This field may or may not be set, depending on how the annotation was created. The value will be an opaque string that can be passed to stringToViewportCoordinates.

    customData
    CustomAnnotationData | null
    The custom location data for this annotation. This will only be set if you're using the Annotations API to customize your annotation locations.

    This is an object with the following fields:


    location
    Location
    The custom location you produced for this annotation at annotation capture time.

    coordsRelativeToTarget
    object
    The offset of the annotation relative to the element identified by location, in pixels, at the time the annotation was captured. The location and coordsRelativeToTarget will be supplied to the Annotations API render handler in order to position the annotation.

    This is an object with the following fields:


    x
    number

    y
    number

    label
    string | null
    Your custom user-visible label for the annotation, if any.

    textContent
    string | null
    The text that was selected when creating the annotation, if any.
  • MessageScreenshotAttachment

    This is an object with the following fields:


    type
    "screenshot"
    The type of this attachment, which is always screenshot for screenshot attachments.

    screenshot
    UploadedFile
    The screenshot attached to the message. Screenshots are attached via screenshotOptions.captureWhen API.

    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
    "uploading" | "uploaded" | "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.
  • MessageLinkPreviewAttachment

    This is an object with the following fields:


    type
    "link_preview"
    The type of this attachment, which is always link_preview for file link previews.

    url
    string
    The url from which the preview was generated.

    imageURL
    string | null
    URL of the image to show in the link preview. It is usually specified in the meta or og tags of the page.

    title
    string | null
    Title for the link preview. Sometimes it's the page title, sometimes it is specified in meta or og tags.

    description
    string | null
    Description for the link preview. Generated from the url provided from meta or og tags in the page.

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.

skipLinkPreviews
boolean
If set, Cord won't analyze links in the message to generate previews.

Create a message #

This endpoint adds a new message to a thread.

HTTP Request #

HTTP:
POST https://api.cord.com/v1/threads/<ID>/messages
cURL:
curl "https://api.cord.com/v1/threads/<threadID>/messages" \
  -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'\
  -H 'Content-Type: application/json' 
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord message create [ID]
POST https://api.cord.com/v1/threads/<ID>/messages
Copy

Request Body #


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:


reaction
required
string
The emoji reaction.

userID
required
string
The ID of the user who reacted to the message.

timestamp
optional
Date
The timestamp of when the reaction was created.

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:


type
required
"file"
The type of attachment. This is file for file attachments.

id
required
string
The ID of the file to attach. This must have been previously uploaded via the file API.

authorID
required
string
The ID for the user that sent the message.

content
required
MessageContent
The content of the message.

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.

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.

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.

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.

groupID
required
string
The group ID this thread is in.

extraClassnames
optional
string | null
An optional space separated list of classnames to add to the thread.

location
required
Location
The location of this thread.

addSubscribers
optional
string[]
A list of subscribers to add to this thread.

Example Request #

cURL:
curl "https://api.cord.com/v1/threads/xyz456/messages" \
  -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  --json '{
    "id": "abc123",
    "authorID": "user123",
    "content": [{
      "type": "p",
      "children": [
        {
          "type": "mention",
          "user": { "id": "user456" },
          "children": [{"text": "@Zoidberg"}]
        },
        {
          "text": " Can you take a look at this?"
        }
      ]
    }]
  }'
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord message create abc123 --thread-id=xyz456 --author-id=user123 
--content='[{
  "type": "p",
  "children": [
    {
      "type": "mention",
      "user": { "id": "user456" },
      "children": [{ "text": "@Fry" }]
    },
    {
      "text": "Can you take a look at this?"
    }
  ]}]'
curl "https://api.cord.com/v1/threads/xyz456/messages" \
  -X POST \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  --json '{
    "id": "abc123",
    "authorID": "user123",
    "content": [{
      "type": "p",
      "children": [
        {
          "type": "mention",
          "user": { "id": "user456" },
          "children": [{"text": "@Zoidberg"}]
        },
        {
          "text": " Can you take a look at this?"
        }
      ]
    }]
  }'
Copy

Response #

If successful, the response will be:

JSON:
{
  "success": true,
  "message": "Message created.",
  "messageID": "abc123"
}
{
  "success": true,
  "message": "Message created.",
  "messageID": "abc123"
}
Copy

Update a message #

Use this endpoint to update an existing message.

HTTP Request #

HTTP:
PUT https://api.cord.com/v1/threads/<threadID>/messages/<messageID>
cURL:
curl "https://api.cord.com/v1/threads/<threadID>/messages/<messageID>" \
  -X PUT \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'\
  -H 'Content-Type: application/json' 
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord message update <ID>
PUT https://api.cord.com/v1/threads/<threadID>/messages/<messageID>
Copy

Request Body #

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
required
"file"
The type of attachment to remove. This is file for file attachments.

id
required
string
The ID of the file attachment to remove.

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.

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.

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:


reaction
required
string
The emoji reaction.

userID
required
string
The ID of the user who reacted to the message.

timestamp
optional
Date
The timestamp of when the reaction was created.

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:


type
required
"file"
The type of attachment. This is file for file attachments.

id
required
string
The ID of the file to attach. This must have been previously uploaded via the file API.

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.

Response #

If successful, the response will be:

JSON:
{
  "success": true,
  "message": "✅ You successfully updated message abc123"
}
{
  "success": true,
  "message": "✅ You successfully updated message abc123"
}
Copy

Delete a message #

This endpoint deletes a message.

HTTP Request #

HTTP:
DELETE https://api.cord.com/v1/threads/<threadID>/messages/<messageID>
cURL:
curl "https://api.cord.com/v1/threads/<threadID>/messages/<messageID>" \
  -X DELETE \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'
CLI:
# you can install @cord-sdk/cli for a simpler experience
cord message delete <ID>
DELETE https://api.cord.com/v1/threads/<threadID>/messages/<messageID>
Copy

Request Body #

This REST endpoint has no request body.

Response #

If successful, the response will be:

JSON:
{
  "success": true,
  "message": "💀 You successfully deleted message abc123"
}
{
  "success": true,
  "message": "💀 You successfully deleted message abc123"
}
Copy

Ask Cordy