v2

latestOpenAPI 3.0.0AGPLv32026-07-26125148364.7 KB
Messaging

Fetch Messages

Fetch multiple messages.

get/channels/{target}/messages

Path parameters

targetstring required

Query parameters

limitinteger nullable

Maximum number of messages to fetch

For fetching nearby messages, this is `(limit + 2)`.

Maximum number of messages to fetch

For fetching nearby messages, this is `(limit + 2)`.

beforestring nullable

Message id before which messages should be fetched

Message id before which messages should be fetched

afterstring nullable

Message id after which messages should be fetched

Message id after which messages should be fetched

'Relevance'

Sort by the most relevant messages

OR
'Latest'

Sort by the newest messages first

OR
'Oldest'

Sort by the oldest messages first

Message sort direction

nearbystring nullable

Message id to search around

Specifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.

Message id to search around

Specifying 'nearby' ignores 'before', 'after' and 'sort'. It will also take half of limit rounded as the limits to each side. It also fetches the message ID specified.

include_usersboolean nullable

Whether to include user (and member, if server channel) objects

Whether to include user (and member, if server channel) objects

Response

OR

Example response

[
  {
    "member": {
      "joined_at": "1970-01-01T00:00:00Z",
      "timeout": "1970-01-01T00:00:00Z"
    },
    "system": {
      "finished_at": "1970-01-01T00:00:00Z"
    },
    "edited": "1970-01-01T00:00:00Z"
  }
]