Notifications
Notifications inform users of actions that occurred in a context different from their current context. ChatKitty sends notifications to your app through the ChatKitty JavaScript SDK when an action outside of an active chat session occurs. You can observe these notifications and use them to build in-app notification views. ChatKitty also sends notifications to chat functions that can be used to trigger push notifications.
Schema
id required | integer <int64> 64-bit integer identifier associated with this resource |
body required | string The text body of this notification |
object (ChannelProperties) | |
created_time required | string <date-time> Time this notification was created |
required | object (NotificationData) Additional context data of this notification |
muted required | boolean True if this notification should be muted |
read_time | string <date-time> Time this notification was read |
title required | string The title of this notification |
Array of objects (Link) Hypermedia control links for this resource |
{- "id": 3256308,
- "title": "System message sent",
- "body": "File attachment",
- "channel": {
- "id": 702,
- "type": "PUBLIC",
- "name": "Your Awesome Chat Room",
- "displayName": "Your Awesome Chat Room",
- "creator": {
- "id": 352,
- "type": "PERSON",
- "name": "aaron.nwabuoku@chatkitty.com",
- "displayName": "aaron.nwabuoku@chatkitty.com",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "lastReceivedMessage": {
- "id": 85103,
- "type": "SYSTEM_FILE",
- "channelId": 702,
- "file": {
- "type": "EXTERNAL",
- "name": "jane.png",
- "contentType": "image/png",
- "size": 32768
}, - "properties": { },
- "createdTime": "2022-06-02T16:36:39.169379Z"
}, - "properties": { },
- "createdTime": "2020-11-23T13:03:17.292Z",
- "_links": {
}
}, - "data": {
- "message": {
- "id": 85103,
- "type": "SYSTEM_FILE",
- "channelId": 702,
- "file": {
- "type": "EXTERNAL",
- "name": "jane.png",
- "contentType": "image/png",
- "size": 32768
}, - "properties": { },
- "createdTime": "2022-06-02T16:36:39.169379Z",
- "_links": {
}
}, - "channelId": 702,
- "type": "SYSTEM:SENT:MESSAGE",
- "_relays": {
- "message": "/application/v1/messages/85103.relay"
}
}, - "createdTime": "2022-06-02T16:36:54.356152Z",
- "_links": {
}
}
Notification types
User sent message
Sent when another user sends a message in a channel the recipient is a member of but currently has no active chat sessions.
Notification data
type required | string |
channel_id required | integer <int64> Deprecated The ID channel the message was sent. Deprecated: Use the channel property of this notification |
required | object (ChatUserMessageResource) The message that was sent |
{- "type": "string",
- "channel_id": 0,
- "message": {
- "type": "TEXT",
- "id": 44902,
- "channel_id": 0,
- "created_time": "2019-08-24T14:15:22Z",
- "group_tag": "string",
- "last_edited_time": "2019-08-24T14:15:22Z",
- "nested_level": 0,
- "properties": {
- "property1": { },
- "property2": { }
}, - "reactions": [
- {
- "count": 0,
- "emoji": {
- "aliases": [
- "string"
], - "character": "string",
- "description": "string",
- "tags": [
- "string"
]
}, - "users": [
- {
- "type": "PERSON",
- "id": 0,
- "call_status": "AVAILABLE",
- "display_name": "string",
- "display_picture_url": "string",
- "isGuest": true,
- "name": "string",
- "presence": {
- "online": true,
- "status": "string"
}, - "properties": {
- "property1": { },
- "property2": { }
}
}
]
}
], - "replies_count": 0,
- "_links": {
- "0": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
},
}, - "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "createdTime": "2021-09-16T20:45:33.696Z"
}
}
System sent message
Sent when a system message is sent using the Platform API in a channel the recipient is a member of but currently has no active chat sessions.
Notification data
type required | string |
channel_id required | integer <int64> Deprecated The ID channel the message was sent. Deprecated: Use the channel property of this notification |
required | object (ChatUserMessageResource) The message that was sent |
{- "type": "string",
- "channel_id": 0,
- "message": {
- "type": "TEXT",
- "id": 44902,
- "channel_id": 0,
- "created_time": "2019-08-24T14:15:22Z",
- "group_tag": "string",
- "last_edited_time": "2019-08-24T14:15:22Z",
- "nested_level": 0,
- "properties": {
- "property1": { },
- "property2": { }
}, - "reactions": [
- {
- "count": 0,
- "emoji": {
- "aliases": [
- "string"
], - "character": "string",
- "description": "string",
- "tags": [
- "string"
]
}, - "users": [
- {
- "type": "PERSON",
- "id": 0,
- "call_status": "AVAILABLE",
- "display_name": "string",
- "display_picture_url": "string",
- "isGuest": true,
- "name": "string",
- "presence": {
- "online": true,
- "status": "string"
}, - "properties": {
- "property1": { },
- "property2": { }
}
}
]
}
], - "replies_count": 0,
- "_links": {
- "0": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
},
}, - "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "createdTime": "2021-09-16T20:45:33.696Z"
}
}
User mentioned channel
Sent when another user mentions a channel the recipient is a member of, in a channel accessible to the recipient.
Notification data
type required | string |
channel_id required | integer <int64> Deprecated The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification |
required | object (ChannelResource) |
required | object (TextMessageResource) The message in which the user was mentioned |
{- "type": "string",
- "channel_id": 0,
- "mentioned_channel": {
- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}, - "message": {
- "type": "TEXT",
- "id": 44902,
- "channel_id": 0,
- "created_time": "2019-08-24T14:15:22Z",
- "group_tag": "string",
- "last_edited_time": "2019-08-24T14:15:22Z",
- "nested_level": 0,
- "properties": {
- "property1": { },
- "property2": { }
}, - "reactions": [
- {
- "count": 0,
- "emoji": {
- "aliases": [
- "string"
], - "character": "string",
- "description": "string",
- "tags": [
- "string"
]
}, - "users": [
- {
- "type": "PERSON",
- "id": 0,
- "call_status": "AVAILABLE",
- "display_name": "string",
- "display_picture_url": "string",
- "isGuest": true,
- "name": "string",
- "presence": {
- "online": true,
- "status": "string"
}, - "properties": {
- "property1": { },
- "property2": { }
}
}
]
}
], - "replies_count": 0,
- "_links": {
- "0": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
},
}, - "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "createdTime": "2021-09-16T20:45:33.696Z"
}
}
User mentioned user
Sent when another user mentions the recipient in a channel accessible to the recipient.
Notification data
type required | string |
channel_id required | integer <int64> Deprecated The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification |
required | object (ChatUserResource) |
required | object (TextMessageResource) The message in which the user was mentioned |
{- "type": "string",
- "channel_id": 0,
- "mentioned_user": {
- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}, - "message": {
- "type": "TEXT",
- "id": 44902,
- "channel_id": 0,
- "created_time": "2019-08-24T14:15:22Z",
- "group_tag": "string",
- "last_edited_time": "2019-08-24T14:15:22Z",
- "nested_level": 0,
- "properties": {
- "property1": { },
- "property2": { }
}, - "reactions": [
- {
- "count": 0,
- "emoji": {
- "aliases": [
- "string"
], - "character": "string",
- "description": "string",
- "tags": [
- "string"
]
}, - "users": [
- {
- "type": "PERSON",
- "id": 0,
- "call_status": "AVAILABLE",
- "display_name": "string",
- "display_picture_url": "string",
- "isGuest": true,
- "name": "string",
- "presence": {
- "online": true,
- "status": "string"
}, - "properties": {
- "property1": { },
- "property2": { }
}
}
]
}
], - "replies_count": 0,
- "_links": {
- "0": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
},
}, - "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "createdTime": "2021-09-16T20:45:33.696Z"
}
}