GET/users/{userId}/mail/mailfolders/{folderId}/children

Gets the messages in a specified folder.

Caution

  • This API operation does not get the messages in Tracking. For tracking, see the status of each email message.

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/mailfolders/{folderId}/children

Path Parameters

ParameterTypeDescription
userId string 

Member ID (must be URL-encoded)

  • User ID
  • Login ID (email)
  • Me

required
example : me 
folderId string 

Folder ID


required
example : 1 

Query Parameters

ParameterTypeDescription
count integer 

Number of pages


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

Cursor value for pagination


example : JlIBsfJogXpzDGY8OscZziqZpYqCAu3RbZbaFzBb1od6lWQtSdPUd2FIdCuaGgu8DA== 
searchFilterType string 

Search filter type

  • all: All messages (default)
  • mark: Important messages
  • attach: Messages with attachments
  • tome: Messages sent to me

default : all
Allowed values : all, mark, attach, tome
example : all 
isUnread boolean 

Indicates whether to get only unread messages (default: false)


default : false
example : false 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
mails array (object) 

Email messages information


required
uniqueItems : true 
unreadCount number 

Number of unread messages


required 
folderName string 

Folder name


required
minLength : 1
maxLength : 250 
listCount integer 

Number of messages in the list


required
format : int64 
totalCount integer 

Number of messages in the folder


required
format : int64 
responseMetaData object (responseMetaData) 

Response metadata

 

object

PropertyTypeDescription
mailId integer 

Message ID


required
format : int64 
folderId integer 

Folder ID


required
format : int32 
status string 

Message status

  • Unread: Unread message
  • Read: Read message

required
minLength : 1 
from object (from) 

Email information

 
to array (MailAddress) 

To


minItems : 1
uniqueItems : true 
subject string 

Subject


required
minLength : 1 
receivedTime string 

Received time


required
example : 2021-07-16T19:20:30+09:00 
sentTime string 

Sent time


required
example : 2021-07-16T19:20:30+09:00 
size integer 

Message size


required
format : int64 
isImportant boolean 

Indicates whether the message is important (the red exclamation mark is added to the message's subject).


required 
securityLevel string 

Security level of the message

  • General: General
  • Restricted: Restricted
  • Confidential: Confidential
  • Non-business: Non-business

required 
useForwarding boolean 

Indicates whether to allow forwarding.

  • true: Allow
  • false: Not allow

required 
attachCount integer 

Number of attachments


required
format : int32 

from

PropertyTypeDescription
name string 

Email name

 
email string 

Email address (RFC822 format)


required
minLength : 1 

MailAddress

PropertyTypeDescription
name string 

Email name

 
email string 

Email address (RFC822 format)


required
minLength : 1 

responseMetaData

PropertyTypeDescription
nextCursor string 

Cursor value for pagination

 

Response Example

example

1{2  "mails": [3    {4      "mailId": 76289,5      "folderId": 1,6      "status": "Read",7      "from": {8        "name": "admin",9        "email": "admin@example.com"10      },11      "to": [12        {13          "name": "Aaron Wisozk",14          "email": "clovis.spinka9@example.com"15        }16      ],17      "subject": "test",18      "receivedTime": "2022-10-27T00:02:01+09:00",19      "sentTime": "2022-10-27T00:02:01+09:00",20      "size": 1406,21      "isImportant": true,22      "securityLevel": "General",23      "useForwarding": true,24      "attachCount": 025    },26    {27      "mailId": 76288,28      "folderId": 1,29      "status": "Read",30      "from": {31        "name": "admin",32        "email": "admin@example.com"33      },34      "to": [35        {36          "name": "nvmail043",37          "email": "nvmail043@example.com"38        }39      ],40      "subject": "test",41      "receivedTime": "2022-10-27T00:02:01+09:00",42      "sentTime": "2022-10-27T00:02:01+09:00",43      "size": 1246,44      "isImportant": true,45      "securityLevel": "General",46      "useForwarding": true,47      "attachCount": 048    }49  ],50  "unreadCount": 15354,51  "folderName": "All mailbox",52  "listCount": 2,53  "totalCount": 123,54  "responseMetaData": {55    "nextCursor": "3"56  }57}

HTTP 204

No Content

HTTP 500

Internal Server Error