Google: Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — criteria
Gets a filter. For more information, see [Manage Gmail filters](https://developers.google.com/workspace/gmail/api/guides/filter_settings).: response body, field criteria. Complete fields and constraints for contract 2026-10-27.
API reference · Contract 2026-10-27
SDK schema: Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — criteria
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Message matching criteria. |
excludeChats | boolean | Optional | Whether the response should exclude chats. |
from | string | Optional | The sender’s display name or email address. |
hasAttachment | boolean | Optional | Whether the message has any attachment. |
negatedQuery | string | Optional | Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, `“from:someuser@example.com rfc822msgid: is:unread”`. |
query | string | Optional | Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, `“from:someuser@example.com rfc822msgid: is:unread”`. |
size | JSON | Optional | |
size (anyOf 1) | integer | Alternative | The size of the entire RFC822 message in bytes, including all headers and attachments. Format: int32 |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
sizeComparison | string | Optional | How the message size in bytes should be in relation to the size field. Known values: unspecified, smaller, larger |
subject | string | Optional | Case-insensitive phrase found in the message’s subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. |
to | string | Optional | The recipient’s display name or email address. Includes recipients in the “to”, “cc”, and “bcc” header fields. You can use simply the local part of the email address. For example, “example” and “example@” both match “example@example.com”. This field is case-insensitive. |