Get message list

Prev Next

Available in Classic and VPC

Get the list of messages in a channel.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /v1/api/messages/{channelId}

Request headers

For information about the headers common to all Ncloud Chat APIs, see Ncloud Chat request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
channelId String Required Channel ID

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
filter String Required Filtering criteria
  • Filters by some fields in the response body.
  • Filters only full matches.
  • Enter an empty value {} if there is no criteria.
  • Example: {"sender.name":"{Sender name}"}, {"content":"{Part of the content}"}
sort String Optional Sort by
  • Enter in the form of {Criteria:Method}.
    • Criteria: String type fields in the response body.
    • Method: -1 | 1
      • -1: Descending.
      • 1: Ascending.
  • e.g., {"created_at":"-1"}: Descending by creation date and time.
option String Optional Additional options: Option
  • e.g., {"offset":0,"per_page":20}: Display the first 20 items.

Option

The following describes Option.

Field Type Required Description
offset Number Optional Query start offset
  • 0-N
per_page Number Optional Number of items per page
  • 1-100

Request example

The request example is as follows:

curl --location --request GET 'https://dashboard-api.ncloudchat.naverncp.com/v1/api/messages/4073efd6-****-****-****-cc4550fed7b7
?filter=%7B%22content%22%3A%22messa%22%7D
&sort=%7B%22created_at%22%3A%22-1%22%7D
&option=%7B%22offset%22%3A0%2C%22per_page%22%3A20%7D' \
--header 'x-api-key: {API Key}' \
--header 'x-project-id: {Project ID}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
id String - Message ID
message_id String - Message ID
channel_id String - Channel ID
sort_id String - Delivery date and time
  • Unix timestamp format
message_type String - Message type
  • text | file
sender Object - Sender information
sender.id String - Sender ID
sender.name String - Sender name
sender.profile String - Sender profile image
admin Object - Admin information
admin.id String - Admin ID
admin.name String - Admin name
admin.profile String - Admin profile image
attachment_filenames Object - Attachment information
attachment_filenames.name String - Attachment name
attachment_filenames.size Number - Attachment size (byte)
attachment_filenames.type String - Attachment type
attachment_filenames.url String - Attachment URL
has String - Attachment special item classification (default: "")
  • Example: link, image, video, file
embed_providers String - Provider of attachment embed special item
embed_type String - Type of embed special item (default "")
isExpress Boolean - Express message status
  • true | false (default)
    • true: Express message
    • false: General message
link_hostnames String - Link host name
  • If has is link
mentions Array - Mention information (default: [])
mentions_everyone Boolean - Whether to mention all
  • true | false (default)
    • true: All
    • false: Not all
content String - Message content
sended_at String - Message delivery date and time
  • ISO 8601 format
created_at String - Message creation date and time
  • ISO 8601 format

Response status codes

For information about the HTTP status codes common to all Ncloud Chat APIs, see Common Ncloud Chat response status codes.

Response example

The response example is as follows:

[
    {
        "id": "6836b8**********7d65352a",
        "message_id": "6836b8**********7d65352a",
        "channel_id": "4073efd6-****-****-****-cc4550fed7b7",
        "sort_id": "1748416572780",
        "message_type": "text",
        "sender": {
            "id": "radevjs",
            "name": "radevjs",
            "profile": ""
        },
        "admin": {
            "id": "",
            "name": "",
            "profile": ""
        },
        "attachment_filenames": {
            "name": "",
            "size": 0,
            "type": "text",
            "url": ""
        },
        "has": "",
        "embed_providers": "",
        "embed_type": "",
        "isExpress": false,
        "link_hostnames": "",
        "mentions": [],
        "mentions_everyone": "false",
        "content": "message04",
        "sended_at": "2025-05-28T16:16:12+09:00",
        "created_at": "2025-05-28T16:16:12+09:00"
    },
    ...
]