Get the Number of Unread Messages

    Gets the number of unread messages.

    This API is used to get the number of unread messages in the mailboxes selected in Settings > New mail notification/Reminder > Set notification target and number of new mail display. The default value is the number of unread messages in All mailbox.

    API Type

    Service API

    Request URL

    https://apis.worksmobile.com/r/{API ID}/mail/v2/getMailCount

    HTTP Method

    GET (Content-Type: application/x-www-form-urlencoded; charset=UTF-8)

    Request

    No parameters.

    Request Example

    https://apis.worksmobile.com/r/{API ID}/mail/v2/getMailCount
    

    Response

    It returns HTTP status 200 with response data in JSON format if the API call is successful.

    Property Type Required Description
    count Long Y Number of unread messages.
    It is normal if the value is greater than or equal to 0.

    Response Example

    {"count":1376}
    

    Error

    It returns an error code and message with HTTP status when the API call fails.

    Property Type Description
    code String Error Code
    message String Error Message
    HTTP Status Error Code Description
    500 SYSTEM_ERROR Internal server error
    Error Example
    {
        "code": "SYSTEM_ERROR",
        "message": "internal error",
        "domain": "mail"
    }