通知未読数の取得

メソッド

GET

URL

https://typetalk.com/api/v7/notifications/status

スコープ

my

レスポンスの例

{
    "statuses": [
        {
            "unreads": {
                "myTopicIds": [],
                "otherTopicIds": [],
                "dmTopicIds": []
            },
            "userStatus": {
                "id": 129,
                "accountId": 2488,
                "spaceId": 29,
                "emoji": ":spiral_note_pad:",
                "message": "ミーティング中",
                "clearAt": "2019-09-09T02:58:00Z",
                "isNotificationDisabled": true,
                "createdAt": "2019-09-03T01:37:34Z",
                "updatedAt": "2019-09-09T02:28:00Z"
            },
            "access": {
                "unopened": 0
            },
            "like": {
                "receive": {
                    "hasUnread": false,
                    "readLikeId": 18919
                }
            },
            "mySpace": {
                "space": {
                    "key": "XXXXXX",
                    "name": "Nulab Inc",
                    "enabled": true,
                    "imageUrl": "https://apps.nulab.com/spaces/XXXXXX/photo/large"
                },
                "myRole": "ADMIN",
                "isPaymentAdmin": true,
                "invitableRoles": [
                    "ADMIN",
                    "USER",
                    "GUEST"
                ],
                "myPlan": {
                    "plan": {
                        "key": "typetalk.standard25",
                        "name": "スタンダード 25 ユーザー",
                        "limitNumberOfUsers": 25,
                        "limitNumberOfAllowedAddresses": 25,
                        "limitTotalAttachmentSize": 268435456000
                    },
                    "enabled": true,
                    "trial": null,
                    "numberOfUsers": 5,
                    "numberOfAllowedAddresses": 0,
                    "totalAttachmentSize": 14356,
                    "createdAt": "2016-01-19T09:29:10Z",
                    "updatedAt": "2019-08-28T08:19:49Z"
                }
            }
        }
    ],
    "notificationSettings": {
        "doNotDisturb": {
            "scheduled": {
                "enabled": false,
                "start": "22:00",
                "end": "07:00"
            }
        },
        "favoriteTopicMobile": false
    }
}

レスポンスのフォーマットは全てJSONです。GETメソッドはETagに対応しているので、If-None-Match ヘッダを付けて送ると、変更がない場合は304を返します。日付のフォーマットは ISO 8601 で、UTC です。 (例 : 2014-01-09T06:20:08Z )