---
title: "POST /channels#operation=search"
method: POST
path: "/channels#operation=search"
---

# POST /channels#operation=search

`POST /channels#operation=search`

Allows the `ChimeBearer` to search channels by channel members. Users or bots can search across the channels that they belong to. Users in the `AppInstanceAdmin` role can search across all channels.

The `x-amz-chime-bearer` request header is mandatory. Use the ARN of the `AppInstanceUser` or `AppInstanceBot` that makes the API call as the value in the header.

This operation isn't supported for `AppInstanceUsers` with a large number of memberships.

## Query parameters

- `max-results` integer
- `next-token` string, password
- `operation` 'search', required

## Headers

- `x-amz-chime-bearer` string

## Request body

- object
  - `Fields` SearchField[], required — A list of the <code>Field</code> objects in the channel being searched.
    - `Key` 'MEMBERS', required — An <code>enum</code> value that indicates the key to search the channel on. <code>MEMBERS</code> allows you to search channels based on memberships. You can use it with the <code>EQUALS</code> operator to get channels whose memberships are equal to the specified values, and with the <code>INCLUDES</code> operator to get channels whose memberships include the specified values.
    - `Values` SearchFieldValue[], required — <p>The values that you want to search for, a list of strings. The values must be <code>AppInstanceUserArns</code> specified as a list of strings.</p> <note> <p>This operation isn't supported for <code>AppInstanceUsers</code> with a large number of memberships.</p> </note>
    - `Operator` 'EQUALS' | 'INCLUDES', required — The operator used to compare field values, currently <code>EQUALS</code> or <code>INCLUDES</code>. Use the <code>EQUALS</code> operator to find channels whose memberships equal the specified values. Use the <code>INCLUDES</code> operator to find channels whose memberships include the specified values.

## Response `200`

Success

- SearchChannelsResponse
  - `Channels` ChannelSummary[] — A list of the channels in the request.
    - `Name` string, password — The name of the channel.
    - `ChannelArn` string — The ARN of the channel.
    - `Mode` 'UNRESTRICTED' | 'RESTRICTED' — The mode of the channel.
    - `Privacy` 'PUBLIC' | 'PRIVATE' — The privacy setting of the channel.
    - `Metadata` string, password — The metadata of the channel.
    - `LastMessageTimestamp` string, date-time — The time at which the last persistent message visible to the caller in a channel was sent.
  - `NextToken` string, password — The token returned from previous API responses until the number of channels is reached.

## Other responses

- `480` — BadRequestException
- `481` — ForbiddenException
- `482` — UnauthorizedClientException
- `483` — ThrottledClientException
- `484` — ServiceUnavailableException
- `485` — ServiceFailureException

---

[API](https://skmtc.net/aws/apis/chime-sdk-messaging.md) · [All operations](https://skmtc.net/aws/apis/chime-sdk-messaging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/chime-sdk-messaging/versions/84b8f86073a0/schema)
