Google: Gmail users settings filters schemas
6 Google schemas with complete fields and constraints.
← Gmail users settings filters operations · All schemas
Creates a filter. Note: you can only create a maximum of 1,000 filters For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread. |
action | Model | Optional | Expand Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — action Action that the filter performs. |
criteria | Model | Optional | Expand Creates a filter. Note: you can only create a maximum of 1,000 filters For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — request body — body criteria Matching criteria for the filter. |
id | string | Optional | The server assigned ID of the filter. |
Referenced models: Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — action, Creates a filter. Note: you can only create a maximum of 1,000 filters For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — request body — body criteria
Creates a filter. Note: you can only create a maximum of 1,000 filters For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — request body — 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 | integer | Optional | The size of the entire RFC822 message in bytes, including all headers and attachments. Format: int32 |
sizeComparison | string | Optional | How the message size in bytes should be in relation to the size field. One of: 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. |
Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread. |
action | Model | Optional | Expand Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — action Action that the filter performs. |
criteria | Model | Optional | Expand Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — criteria Matching criteria for the filter. |
id | string | Optional | The server assigned ID of the filter. |
Referenced models: Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body — action, 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 — action
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A set of actions to perform on a message. |
addLabelIds | array | Optional | List of labels to add to the message. |
addLabelIds[] | string | Each item | |
forward | string | Optional | Email address that the message should be forwarded to. This effectively redirects the message to the address specified in this field, maintaining the original sender in the "From" field. |
removeLabelIds | array | Optional | List of labels to remove from the message. |
removeLabelIds[] | string | Each item |
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. |
Lists the message filters of a Gmail user For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response for the ListFilters method. |
filter | array | Optional | List of a user's filters. |
filter[] | Model | Each item | Expand Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body |
Referenced models: Gets a filter For more information, see Manage Gmail filters (https: developers google com workspace gmail api guides filter settings) — response body