v2

latestOpenAPI 3.0.0AGPLv32026-07-26125148364.7 KB
Messaging

Search for Messages

This route searches for messages within the given parameters.

post/channels/{target}/search

Path parameters

targetstring required

Request body

querystring nullable

Full-text search query

See MongoDB documentation for more information.

pinnedboolean nullable

Whether to only search for pinned messages, cannot be sent with query.

limitinteger nullable

Maximum number of messages to fetch

beforestring nullable

Message id before which messages should be fetched

afterstring nullable

Message id after which messages should be fetched

include_usersboolean nullable

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"
  }
]