GET/users/{userId}/mail/filters

Gets a list of registered filters.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

mail
mail.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/users/{userId}/mail/filters

Path Parameters

ParameterTypeDescription
userId string 

Member ID (must be URL-encoded)

  • User ID
  • Login ID (email)
  • Me

required
example : me 

Query Parameters

ParameterTypeDescription
query string 

Search term


example : keyword 
count integer 

Number of pages


default : 30
minimum : 5
maximum : 200
example : 30
format : int32 
cursor string 

Cursor value for pagination


example : JlIBsfJogXpzDGY8OscZziqZpYqCAu3RbZbaFzBb1od6lWQtSdPUd2FIdCuaGgu8DA== 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
filters array (AutomaticSort) 

Filter information


minItems : 0
uniqueItems : true 
responseMetaData object (responseMetaData) 

Response metadata

 

AutomaticSort

PropertyTypeDescription
filterId integer 

Filter ID


minimum : 0
format : int64
readOnly : true 
from string 

Sender's email address (filter by)


minLength : 1 
toCc string 

To- or cc-recipient's email address (filter by)


minLength : 1 
to string 

To-recipient's email address (filter by)


minLength : 1 
cc string 

Cc-recipient's email address (filter by)


minLength : 1 
subject string 

Subject (filter by)


minLength : 2
maxLength : 180 
body string 

Body (filter by)


minLength : 2 
hasAttach boolean 

Indicates whether the message has an attachment (filter by).


default : false 
isReplyFromMe boolean 

Indicates whether the message is a reply to my message (filter by).


default : false 
isCalendarMail boolean 

Indicates whether the message is an appointment from Calendar (filter by).


default : false 
folderId integer 

Folder ID (action)


minimum : 0
format : int32 
highlightColor string 

Highlight color in RGB (action)


minLength : 1 
useForwardEmail boolean 

Indicates whether to forward filtered messages (action).


default : false 
forwardEmail string 

Forward to (action)


format : email 
isMoveFolder boolean 

Indicates whether to move filtered messages to a specified folder (action).


default : false 
isRead boolean 

Indicates whether to mark filtered messages as Read (action).


default : false 
isColor boolean 

Indicates whether to highlight filtered messages with color (action).


default : false 
isImportant boolean 

Indicates whether to mark filtered messages as Important (action).


default : false 
isDelete boolean 

Indicates whether to trash filtered messages (action).


default : false 
isApplyExistingMails boolean 

Indicates whether to filter the existing messages as well (action).


default : false 

responseMetaData

PropertyTypeDescription
nextCursor string 

Cursor value for pagination

 

Response Example

example

1{2  "filters": [3    {4      "filterId": 529,5      "folderId": 0,6      "from": "admin@example.com",7      "toCc": "tocc@example.com",8      "to": "to@example.com",9      "cc": "cc@example.com",10      "subject": "subject",11      "body": "body",12      "hasAttach": false,13      "highlightColor": "#ffffff",14      "isForwardEmail": false,15      "isMoveFolder": false,16      "isRead": false,17      "isColor": false,18      "isReplyFromMe": false,19      "isCalendarMail": false,20      "isImportant": true,21      "isDelete": false,22      "isApplyExistingMails": false23    }24  ],25  "responseMetaData": {26    "nextCursor": "3"27  }28}