---
title: "GET /api/guilds/{guild_id}/messages/search/"
method: GET
path: "/api/guilds/{guild_id}/messages/search/"
tags: ["api"]
---

# GET /api/guilds/{guild_id}/messages/search/

`GET /api/guilds/{guild_id}/messages/search/`

## Path parameters

- `guild_id` string, required

## Response `200`

- GuildMessagesSearchResponse
  - `messages` GuildMessagesSearchMessage[], required
    - `id` string, required
    - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 255, required
    - `content` string
    - `channel_id` string, required
    - `author` PublicUser, required
      - `id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
      - `premium_since` string, date-time, required
      - `avatar` string
      - `banner` string
      - `bio` string, required
      - `theme_colors` integer[]
      - `pronouns` string
      - `username` string, required
      - `discriminator` string, required
      - `public_flags` integer, required
      - `accent_color` integer
      - `bot` boolean, required
      - `premium_type` integer, required
      - `badge_ids` string[]
      - `avatar_decoration_data` AvatarDecorationData
        - `asset` string, required
        - `sku_id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
        - `expires_at` string, nullable, required
      - `display_name_styles` DisplayNameStyle
        - `font_id` integer, required
        - `effect_id` integer, required
        - `colors` integer[], required
      - `collectibles` Collectibles
        - `nameplate` NameplateData, required
          - `asset` string, required
          - `sku_id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
          - `label` string, required
          - `palette` string, required
          - `expires_at` integer, nullable, required
      - `primary_guild` PrimaryGuild
        - `identity_enabled` boolean, nullable, required
        - `identity_guild_id` string, nullable, required
        - `tag` string, nullable, required
        - `badge` string, nullable, required
    - `attachments` PublicAttachment[], required
      - `filename` string, required
      - `size` integer, required
      - `height` integer
      - `width` integer
      - `content_type` string
      - `url` string, required
      - `proxy_url` string, required
    - `embeds` Embed[], required
      - `title` string
      - `type` 'article' | 'gifv' | 'image' | 'link' | 'poll_result' | 'rich' | 'video'
      - `description` string
      - `url` string
      - `timestamp` string, date-time
      - `color` integer
      - `footer` object
        - `text` string, required
        - `icon_url` string
        - `proxy_icon_url` string
      - `image` EmbedImage
        - `url` string
        - `proxy_url` string
        - `height` integer
        - `width` integer
      - `thumbnail` EmbedImage
        - `url` string
        - `proxy_url` string
        - `height` integer
        - `width` integer
      - `video` EmbedImage
        - `url` string
        - `proxy_url` string
        - `height` integer
        - `width` integer
      - `provider` object
        - `name` string
        - `url` string
      - `author` object
        - `name` string
        - `url` string
        - `icon_url` string
        - `proxy_icon_url` string
      - `fields` object[]
        - `name` string, required
        - `value` string, required
        - `inline` boolean
    - `mentions` PublicUser[], required
      - `id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
      - `premium_since` string, date-time, required
      - `avatar` string
      - `banner` string
      - `bio` string, required
      - `theme_colors` integer[]
      - `pronouns` string
      - `username` string, required
      - `discriminator` string, required
      - `public_flags` integer, required
      - `accent_color` integer
      - `bot` boolean, required
      - `premium_type` integer, required
      - `badge_ids` string[]
      - `avatar_decoration_data` AvatarDecorationData
        - `asset` string, required
        - `sku_id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
        - `expires_at` string, nullable, required
      - `display_name_styles` DisplayNameStyle
        - `font_id` integer, required
        - `effect_id` integer, required
        - `colors` integer[], required
      - `collectibles` Collectibles
        - `nameplate` NameplateData, required
          - `asset` string, required
          - `sku_id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
          - `label` string, required
          - `palette` string, required
          - `expires_at` integer, nullable, required
      - `primary_guild` PrimaryGuild
        - `identity_enabled` boolean, nullable, required
        - `identity_guild_id` string, nullable, required
        - `tag` string, nullable, required
        - `badge` string, nullable, required
    - `mention_roles` RoleResponse[], required
      - `id` string, required — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
      - `name` string, required
      - `description` string, nullable, required
      - `color` integer, required
      - `colors` RoleColors, required
        - `primary_color` integer, required
        - `secondary_color` integer
        - `tertiary_color` integer
      - `hoist` boolean, required
      - `icon` string, nullable
      - `unicode_emoji` string, nullable
      - `position` integer, required
      - `permissions` string, required
      - `managed` boolean, required
      - `mentionable` boolean, required
      - `flags` integer
      - `tags` RoleTags
        - `bot_id` string — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
        - `integration_id` string — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
        - `subscription_listing_id` string — A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z ``` If we have a snowflake '266241948824764416' we can represent it as binary: 64 22 17 12 0 000000111011000111100001101001000101000000 00001 00000 000000000000 number of ms since Discord epoch worker pid increment ```
        - `premium_subscriber` boolean, nullable
        - `available_for_purchase` boolean, nullable
        - `guild_connections` boolean, nullable
    - `pinned` boolean, required
    - `mention_everyone` boolean
    - `tts` boolean, required
    - `timestamp` string, required
    - `edited_timestamp` string, nullable, required
    - `flags` integer, required
    - `components` BaseMessageComponents[], required
      - union
        - SectionComponent
          - `type` 9, required
          - `components` TextDisplayComponent[], required
            - `type` 10, required
            - `content` string, required
            - `id` integer
          - `accessory` union, required
            - ThumbnailComponent
              - …
            - ButtonComponent
              - …
          - `id` integer
        - TextDisplayComponent
          - `type` 10, required
          - `content` string, required
          - `id` integer
        - MediaGalleryComponent
          - `type` 12, required
          - `items` object[], required
            - `media` UnfurledMediaItem, required
              - …
            - `description` string
            - `spoiler` boolean
          - `id` integer
        - FileComponent
          - `type` 13, required
          - `file` UnfurledMediaItem, required
            - `id` string
            - `url` string, required
            - `proxy_url` string
            - `height` integer
            - `width` integer
            - `flags` integer
            - `content_type` string
            - `content_scan_metadata` unknown
            - `placeholder_version` integer
            - `placeholder` string
            - `loading_state` integer
            - `attachment_id` string
          - `spoiler` boolean, required
          - `name` string, required
          - `size` integer, required
          - `id` integer
        - SeperatorComponent
          - `type` 14, required
          - `divider` boolean
          - `spacing` 1 | 2
          - `id` integer
        - ActionRowComponent
          - `type` 1, required
          - `components` union[], required
            - union
              - …
          - `id` integer
        - ContainerComponent
          - `type` 17, required
          - `components` union[], required
            - union
              - …
          - `accent_color` integer
          - `spoiler` boolean
          - `id` integer
    - `poll` Poll, required
      - `question` PollMedia, required
        - `text` string
        - `emoji` union
          - object
            - `id` string
            - `name` string, required
            - `animated` boolean
          - object
            - `id` string, required
            - `name` string
            - `animated` boolean
      - `answers` PollAnswer[], required
        - `answer_id` integer
        - `poll_media` PollMedia, required
          - `text` string
          - `emoji` union
            - object
              - …
            - object
              - …
      - `expiry` string, date-time, required
      - `allow_multiselect` boolean, required
      - `results` PollResult
        - `is_finalized` boolean, required
        - `answer_counts` PollAnswerCount[], required
          - `id` string, required
          - `count` integer, required
          - `me_voted` boolean, required
    - `hit` true, required
  - `total_results` integer, required

## Other responses

- `403`
- `422`

---

[API](https://skmtc.net/spacebarchat/apis/spacebar-server.md) · [All operations](https://skmtc.net/spacebarchat/apis/spacebar-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spacebarchat/spacebar-server/versions/034b4e879932/schema)
