Gmail API
  1. users
Gmail API
  • users
    • /gmail/v1/users/{userId}/drafts
      GET
    • /gmail/v1/users/{userId}/drafts
      POST
    • /gmail/v1/users/{userId}/drafts/send
      POST
    • /gmail/v1/users/{userId}/drafts/{id}
      DELETE
    • /gmail/v1/users/{userId}/drafts/{id}
      GET
    • /gmail/v1/users/{userId}/drafts/{id}
      PUT
    • /gmail/v1/users/{userId}/history
      GET
    • /gmail/v1/users/{userId}/labels
      GET
    • /gmail/v1/users/{userId}/labels
      POST
    • /gmail/v1/users/{userId}/labels/{id}
      DELETE
    • /gmail/v1/users/{userId}/labels/{id}
      GET
    • /gmail/v1/users/{userId}/labels/{id}
      PATCH
    • /gmail/v1/users/{userId}/labels/{id}
      PUT
    • /gmail/v1/users/{userId}/messages
      GET
    • /gmail/v1/users/{userId}/messages
      POST
    • /gmail/v1/users/{userId}/messages/batchDelete
      POST
    • /gmail/v1/users/{userId}/messages/batchModify
      POST
    • /gmail/v1/users/{userId}/messages/import
      POST
    • /gmail/v1/users/{userId}/messages/send
      POST
    • /gmail/v1/users/{userId}/messages/{id}
      DELETE
    • /gmail/v1/users/{userId}/messages/{id}
      GET
    • /gmail/v1/users/{userId}/messages/{id}/modify
      POST
    • /gmail/v1/users/{userId}/messages/{id}/trash
      POST
    • /gmail/v1/users/{userId}/messages/{id}/untrash
      POST
    • /gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}
      GET
    • /gmail/v1/users/{userId}/profile
      GET
    • /gmail/v1/users/{userId}/settings/autoForwarding
      GET
    • /gmail/v1/users/{userId}/settings/autoForwarding
      PUT
    • /gmail/v1/users/{userId}/settings/cse/identities
      GET
    • /gmail/v1/users/{userId}/settings/cse/identities
      POST
    • /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}
      DELETE
    • /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}
      GET
    • /gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}
      PATCH
    • /gmail/v1/users/{userId}/settings/cse/keypairs
      GET
    • /gmail/v1/users/{userId}/settings/cse/keypairs
      POST
    • /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}
      GET
    • /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable
      POST
    • /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable
      POST
    • /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate
      POST
    • /gmail/v1/users/{userId}/settings/delegates
      GET
    • /gmail/v1/users/{userId}/settings/delegates
      POST
    • /gmail/v1/users/{userId}/settings/delegates/{delegateEmail}
      DELETE
    • /gmail/v1/users/{userId}/settings/delegates/{delegateEmail}
      GET
    • /gmail/v1/users/{userId}/settings/filters
      GET
    • /gmail/v1/users/{userId}/settings/filters
      POST
    • /gmail/v1/users/{userId}/settings/filters/{id}
      DELETE
    • /gmail/v1/users/{userId}/settings/filters/{id}
      GET
    • /gmail/v1/users/{userId}/settings/forwardingAddresses
      GET
    • /gmail/v1/users/{userId}/settings/forwardingAddresses
      POST
    • /gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}
      DELETE
    • /gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}
      GET
    • /gmail/v1/users/{userId}/settings/imap
      GET
    • /gmail/v1/users/{userId}/settings/imap
      PUT
    • /gmail/v1/users/{userId}/settings/language
      GET
    • /gmail/v1/users/{userId}/settings/language
      PUT
    • /gmail/v1/users/{userId}/settings/pop
      GET
    • /gmail/v1/users/{userId}/settings/pop
      PUT
    • /gmail/v1/users/{userId}/settings/sendAs
      GET
    • /gmail/v1/users/{userId}/settings/sendAs
      POST
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}
      DELETE
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}
      GET
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}
      PATCH
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}
      PUT
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo
      GET
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo
      POST
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}
      DELETE
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}
      GET
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault
      POST
    • /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify
      POST
    • /gmail/v1/users/{userId}/settings/vacation
      GET
    • /gmail/v1/users/{userId}/settings/vacation
      PUT
    • /gmail/v1/users/{userId}/stop
      POST
    • /gmail/v1/users/{userId}/threads
      GET
    • /gmail/v1/users/{userId}/threads/{id}
      DELETE
    • /gmail/v1/users/{userId}/threads/{id}
      GET
    • /gmail/v1/users/{userId}/threads/{id}/modify
      POST
    • /gmail/v1/users/{userId}/threads/{id}/trash
      POST
    • /gmail/v1/users/{userId}/threads/{id}/untrash
      POST
    • /gmail/v1/users/{userId}/watch
      POST
  1. users

/gmail/v1/users/{userId}/settings/filters/{id}

GET
/gmail/v1/users/{userId}/settings/filters/{id}
users
Gets a filter.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://gmail.googleapis.com//gmail/v1/users//settings/filters/'
Response Response Example
{
  "action": {
    "addLabelIds": [
      "string"
    ],
    "forward": "string",
    "removeLabelIds": [
      "string"
    ]
  },
  "criteria": {
    "excludeChats": true,
    "from": "string",
    "hasAttachment": true,
    "negatedQuery": "string",
    "query": "string",
    "size": 0,
    "sizeComparison": "unspecified",
    "subject": "string",
    "to": "string"
  },
  "id": "string"
}

Request

Path Params
userId
string 
required
User's email address. The special value "me" can be used to indicate the authenticated user.
id
string 
required
The ID of the filter to be fetched.

Responses

🟢200Successful response
application/json
Body
Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread.
action
object (FilterAction) 
optional
Action that the filter performs.
addLabelIds
array[string]
optional
List of labels to add to the message.
forward
string 
optional
Email address that the message should be forwarded to.
removeLabelIds
array[string]
optional
List of labels to remove from the message.
criteria
object (FilterCriteria) 
optional
Matching criteria for the filter.
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 <int32>
optional
The size of the entire RFC822 message in bytes, including all headers and attachments.
sizeComparison
enum<string> 
optional
How the message size in bytes should be in relation to the size field.
Allowed values:
unspecifiedsmallerlarger
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@gmail.com". This field is case-insensitive.
id
string 
optional
The server assigned ID of the filter.
Modified at 2023-08-15 05:40:23
Previous
/gmail/v1/users/{userId}/settings/filters/{id}
Next
/gmail/v1/users/{userId}/settings/forwardingAddresses
Built with