| Key | Value Type | Description |
|---|
| deviceId | String | device ID |
| deviceName | String | device name |
| deviceType | String | device type. Kata Friends |
| Key | Value Type | Description |
|---|
| deviceId | String | device ID |
| deviceType | String | device type. Kata Friends |
| version | String | the current firmware version, e.g. V6.3 |
| battery | Integer | the current battery level, 0-100 |
| onlineStatus | String | the connection status. online or offline |
| mode | String | current mode. Normal, Standby, or Sleep |
| status | String | current status. Strolling, Welcoming Home, Wake-up Call, Sleeping, Playing, or Returning |
| childLock | String | child lock state. on or off |
| hospitalized | Integer | service state. 0, normal; 1, repair; 2, maintenance; 3, cleaning |
| deviceType | commandType | Command | command parameter | Description |
|---|
| Kata Friends | command | mode | Normal, Standby, or Sleep | set mode |
| Kata Friends | command | childLock | on or off | set child lock state |
| Kata Friends | command | backHome | default | return home |
| Kata Friends | command | pictureTaking | on or off | set album photo-taking switch |
| Kata Friends | command | snapshots | on or off | set random snapshot switch |
| Kata Friends | command | talk | on or off | set talk feature switch |
GET /v1.1/devices/{deviceId}/diary?startTimestamp={startTimestamp}&endTimestamp={endTimestamp}
Available for: SwitchBot Kata Friends
Gets event diaries, AI text diaries, and AI comic diaries generated by a Kata Friends device within a specified time window.
| Parameter | Type | Required | Description |
|---|
| deviceId | String | Yes | device ID |
| Parameter | Type | Required | Description |
|---|
| startTimestamp | Integer | Yes | start time in Unix milliseconds |
| endTimestamp | Integer | Yes | end time in Unix milliseconds |
The time range is a half-open interval, [startTimestamp, endTimestamp). The maximum time window is 31 days.
The body object contains the following properties,
| Key Name | Value Type | Description |
|---|
| deviceId | String | device ID |
| deviceType | String | device type. Kata Friends |
| diary | Array | event diary records |
| diary[].event | Integer | event type |
| diary[].timestamp | Integer | event time in Unix milliseconds |
| diary[].detail | String | event detail payload |
| diaryAI | Array | AI text diary records |
| diaryAI[].title | String | diary title |
| diaryAI[].date | String | device local date, for example 2026-05-30 |
| diaryAI[].diary | String | diary text |
| diaryAI[].timestamp | Integer | diary time in Unix milliseconds |
| comicDiaryAI | Array | AI comic diary records |
| comicDiaryAI[].title | String | comic diary title |
| comicDiaryAI[].date | String | device local date, for example 2026-05-30 |
| comicDiaryAI[].diary | String | comic diary text |
| comicDiaryAI[].comicKey | String | comic image storage key |
| comicDiaryAI[].thumbnailKey | String | comic thumbnail storage key |
| comicDiaryAI[].timestamp | Integer | comic diary time in Unix milliseconds |
{
"statusCode": 100,
"message": "success",
"body": {
"deviceId": "FFFFFFFFFFF",
"deviceType": "Kata Friends",
"diary": [
{
"event": 10,
"timestamp": 1780068000000,
"detail": "{\"photo_prefix\":\"Thing_u/example/photo.jpg\"}"
}
],
"diaryAI": [
{
"title": "Morning diary",
"date": "2026-05-30",
"diary": "Kata greeted the user and started the day.",
"timestamp": 1780068000000
}
],
"comicDiaryAI": [
{
"title": "Morning comic",
"date": "2026-05-30",
"diary": "Kata created a comic diary for the morning.",
"comicKey": "Thing_u/example/comic.png",
"thumbnailKey": "Thing_u/example/comic_thumb.png",
"timestamp": 1780068000000
}
]
}
}
Refer to Standard HTTP Error Codes for error handling.
GET /v1.1/devices/FFFFFFFFFFFF/diary?startTimestamp=1780012800000&endTimestamp=1780099200000 HTTP/1.1
Host: api.switch-bot.com
Authorization: <token>
sign: <signature>
nonce: <nonce>
t: <timestamp>
| Key Name | Value Type | Description |
|---|
| eventType | String | the type of events |
| eventVersion | String | the current event version |
| context | Object | the detail info of the event |
| deviceId | String | device ID |
| deviceType | String | the type of the device |
| version | String | the current firmware version |
| battery | Integer | the current battery level, 0-100 |
| onlineStatus | String | the connection status. online or offline |
| mode | String | current mode. Normal, Standby, or Sleep |
| status | String | current status |
| childLock | String | child lock state. on or off |
| hospitalized | Integer | service state. 0, normal; 1, repair; 2, maintenance; 3, cleaning |
{
"eventType": "changeReport",
"eventVersion": "1",
"context": {
"deviceId": "FFFFFFFFFFF",
"deviceType": "Kata Friends",
"version": "V6.3",
"battery": 100,
"onlineStatus": "online",
"mode": "Sleep",
"status": "Playing",
"childLock": "on",
"hospitalized": 0
}
}