Skip to content

Google: 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

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, field body. Complete fields and constraints for contract 2026-10-27.

API reference · Contract 2026-10-27

SDK schema: 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

FieldTypePresenceDescription and constraints
$objectRootResource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread.
actionModelOptionalExpand 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.
criteriaModelOptionalExpand 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.
idstringOptionalThe 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

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.