ChatKitty Platform API (2.49.2)
Download OpenAPI specification:Download
OpenAPI specification (OAS) for the ChatKitty Platform API. See the Interactive Docs to try ChatKitty API methods without writing code, and get the complete schema of resources exposed by the API.
Export message analytics
Batch export message analytics data
Authorizations:
Responses
Response samples
- 202
- 400
- 401
- 403
- 404
{- "id": 203,
- "type": "MESSAGE_IMPORT",
- "state": "PENDING",
- "createdTime": "2022-04-28T05:30:44.265Z",
- "endedTime": "2022-04-28T05:30:44.692Z",
- "_links": {
}
}
Retrieve the authenticated application
Returns the ChatKitty application associated with the authentication credentials used.
You must use an OAuth V2 Bearer token to access this endpoint.
Authorizations:
Responses
Request samples
- cURL
- JavaScript
curl -X 'GET' \ 'https://api.chatkitty.com/v1/application' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "key": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "properties": { },
- "created_time": "2020-10-02T20:29:25.316Z",
}
Retrieve the authenticated application settings
Returns the current settings configuring this application
Authorizations:
Responses
Request samples
- cURL
- JavaScript
curl -X 'GET' \ 'https://api.chatkitty.com/v1/application/settings' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "features": {
- "guest_users": "ENABLED",
- "user_created_channels": "DISABLED"
}
}
Update the authenticated application settings
Update the settings configuring this application
Authorizations:
Request Body schema: application/vnd.chatkitty+json
guest_users required | string Enum: "DISABLED" "ENABLED" Toggle state of this settings option |
user_created_channels required | string Enum: "DISABLED" "ENABLED" Toggle state of this settings option |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "guest_users": "DISABLED",
- "user_created_channels": "DISABLED"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "features": {
- "guest_users": "ENABLED",
- "user_created_channels": "DISABLED"
}
}
List channels
Returns a page of channels belonging to this application
Authorizations:
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
type | string Enum: "DIRECT" "PUBLIC" "PRIVATE" Filters by channel type |
members | Array of strings unique Filters by channel members using their usernames |
startTime | string <date-time> Filters for channels created within a time range: start time |
endTime | string <date-time> Filters for channels created within a time range: end time |
properties | string Filters by channel custom properties |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels?page=0&size=5' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "channels": [
- {
- "id": 15252,
- "type": "DIRECT",
- "creator": {
- "id": 19652,
- "type": "PERSON",
- "name": "rexyfexy@gmail.com",
- "displayName": "doark",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "members": [
- {
- "id": 19652,
- "type": "PERSON",
- "name": "rexyfexy@gmail.com",
- "displayName": "doark",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - {
- "id": 19452,
- "type": "PERSON",
- "name": "aa",
- "displayName": "emra",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}
], - "properties": { },
- "createdTime": "2021-05-05T00:38:24.888Z",
- "_links": {
- "participants": {
},
}
}, - {
- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}, - {
- "id": 2402,
- "type": "PUBLIC",
- "name": "#test",
- "displayName": "Test Channel",
- "creator": {
- "id": 4153,
- "type": "PERSON",
- "name": "test@mail.com",
- "displayName": "mridx",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "properties": { },
- "createdTime": "2020-12-13T21:12:09.195Z",
- "_links": {
}
}, - {
- "id": 856,
- "type": "PUBLIC",
- "name": "mkm",
- "displayName": "Meme Channel",
- "creator": {
- "id": 1504,
- "type": "PERSON",
- "name": "njnj@vghf.jk",
- "displayName": "mkm",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "lastReceivedMessage": {
- "id": 17654,
- "type": "TEXT",
- "channelId": 856,
- "user": {
- "id": 15402,
- "type": "PERSON",
- "name": "paras@code.co",
- "displayName": "Paras",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "body": "ghk",
- "properties": { },
- "createdTime": "2021-03-31T06:00:28.680Z"
}, - "properties": { },
- "createdTime": "2020-11-25T07:46:45.775Z",
- "_links": {
}
}, - {
- "id": 1302,
- "type": "PUBLIC",
- "name": "SONU KUMAR",
- "displayName": "SONU KUMAR",
- "creator": {
- "id": 2302,
- "type": "PERSON",
- "name": "852122",
- "displayName": "SONU KUMAR",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "lastReceivedMessage": {
- "id": 44530,
- "type": "TEXT",
- "channelId": 1302,
- "user": {
- "id": 39826,
- "type": "PERSON",
- "name": "steve@innersync.com",
- "displayName": "Steve Williams",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "body": "Checking out",
- "properties": { },
- "createdTime": "2021-09-14T18:02:56.066Z"
}, - "properties": { },
- "createdTime": "2020-12-02T05:10:01.260Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 2020,
- "totalPages": 404,
- "number": 0
}
}
Create a channel
Creates a new channel or returns an equivalent existing channel
Authorizations:
Request Body schema: application/vnd.chatkitty+json
type required | string |
creator | object Reference to a user |
members | Array of objects unique List of user references of members of this channel |
object Custom data associated with this channel | |
name | string The unique name of this channel used to reference the channel. If absent defaults to a random UUID |
display_name | string Human readable name of this channel shown to users. If absent defaults to the channel name |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}
Retrieve a channel
Returns a channel by ID
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/55913' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}
Delete a channel
Deletes a channel by ID
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/channels/55913' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "key": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "properties": { },
- "created_time": "2020-10-02T20:29:25.316Z",
}
Update a channel
Updates a channel properties
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Request Body schema: application/json+merge-patch
Responses
Request samples
- Payload
- cURL
- JavaScript
{ }
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}
Send a channel event
Sends a custom channel event
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Request Body schema: application/vnd.chatkitty+json
type required | string Custom type of this event |
required | object Custom data associated with this event |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "type": "My Custom Event",
- "properties": {
- "payload": "Boom!",
- "stuff": {
- "favoriteNumber": 42,
- "favoriteMovie": "Lilo and Stitch"
}
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "type": "My Custom Event",
- "properties": {
- "payload": "Boom!",
- "stuff": {
- "favoriteNumber": 42,
- "favoriteMovie": "Lilo and Stitch"
}
},
}
List channel invites
Returns a page of invites sent to join this channel
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/67026/invites?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "invites": [
- {
- "createdTime": "2022-06-02T16:51:03.206366Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 25,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Send a channel invite
Sends a channel invite to user
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Request Body schema: application/vnd.chatkitty+json
user required | object (ChatUserReference) Reference to a user |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "user": {
- "username": "jane@chatkitty.com"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "createdTime": "2022-06-02T16:51:03.206366286Z",
- "_links": {
}
}
Send channel keystrokes
Sends keystrokes in this channel on behalf of a user
Authorizations:
path Parameters
id required | integer <int64> |
Request Body schema: application/json
keys required | string |
user required | object (ChatUserReference) Reference to a user |
Responses
Request samples
- Payload
{- "keys": "string",
- "user": {
- "username": "jane@chatkitty.com"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "keys": "string",
- "username": "string",
- "_links": [
- {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
]
}
List a channel's members
Returns a page of channel members
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/67026/members?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "users": [
- {
- "id": 14503,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3004,
- "type": "PERSON",
- "name": "1",
- "displayName": "ChatKittyUser",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6152,
- "type": "PERSON",
- "name": "10zxc13@gmail.com",
- "displayName": "Jack",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3353,
- "type": "PERSON",
- "name": "12121",
- "displayName": "12121",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6602,
- "type": "PERSON",
- "name": "123",
- "displayName": "123",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 571,
- "totalPages": 115,
- "number": 0
}
}
Add a channel member
Makes a user a group channel member
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Request Body schema: application/vnd.chatkitty+json
Reference to a user
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "username": "jane@chatkitty.com"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}
Remove a channel member
Removes a member from a group channel
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
user_id required | integer <int64> User ID of member to be removed |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/channels/55913/members/14503' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}
List channel memberships
Returns a page of channel membership info for this channel
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/702/memberships?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "memberships": [
- {
- "createdTime": "2020-12-02T21:52:33.976Z",
- "_links": {
}
}, - {
- "createdTime": "2020-12-02T22:03:28.742Z",
- "_links": {
}
}, - {
- "createdTime": "2020-11-23T13:03:17.433Z",
- "_links": {
}
}, - {
- "createdTime": "2020-12-07T22:28:47.620Z",
- "_links": {
}
}, - {
- "createdTime": "2020-11-23T14:34:29.580Z",
- "_links": {
}
}
]
}, - "_links": {
- "first": {
}, - "self": {
}, - "next": {
},
}, - "page": {
- "size": 5,
- "totalElements": 537,
- "totalPages": 108,
- "number": 0
}
}
List channel messages
Returns a page of messages sent in this channel
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
query Parameters
size | integer <int32> The size of the page to be returned |
start | integer <int64> Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
next | integer <int64> Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages |
relation | string Enum: "SELF" "PREVIOUS" "NEXT" Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
username | string |
query | string |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/702/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "messages": [
- {
- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}, - {
- "id": 44701,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "test",
- "properties": { },
- "createdTime": "2021-09-16T14:57:55.903Z",
- "_links": {
}
}, - {
- "id": 44700,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "hi",
- "properties": { },
- "createdTime": "2021-09-16T14:57:46.056Z",
- "_links": {
}
}, - {
- "id": 44760,
- "type": "TEXT",
- "channelId": 1255,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "do?",
- "properties": { },
- "createdTime": "2021-09-16T09:14:09.585Z",
- "_links": {
}
}, - {
- "id": 44759,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "ok",
- "properties": { },
- "createdTime": "2021-09-16T09:13:48.030Z",
- "_links": {
}
}
]
}, - "page": {
- "size": 5
}
}
Send a channel message
Sends a message in this channel as the system or on behalf of a user
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Request Body schema:
type required | string |
group_tag | string Optional string to associate this message with other messages. Can be used to group messages into a gallery |
object Custom data associated with this message | |
user | object (ChatUserReference) Reference to a user |
body required | string The text body of this message |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "type": "TEXT",
- "body": "Hello, World!"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}
Lists a channel's moderators
Returns a page of channel moderators
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/67026/moderators?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "users": [
- {
- "id": 14503,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3004,
- "type": "PERSON",
- "name": "1",
- "displayName": "ChatKittyUser",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6152,
- "type": "PERSON",
- "name": "10zxc13@gmail.com",
- "displayName": "Jack",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3353,
- "type": "PERSON",
- "name": "12121",
- "displayName": "12121",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6602,
- "type": "PERSON",
- "name": "123",
- "displayName": "123",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 571,
- "totalPages": 115,
- "number": 0
}
}
Add a channel moderator
Makes a user a group channel moderator
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
Request Body schema: application/vnd.chatkitty+json
Reference to a user
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "username": "jane@chatkitty.com"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}
Remove a channel moderator
Removes a moderator from a group channel
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
user_id required | integer <int64> User ID of moderator to be removed |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/channels/55913/moderators/14503' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}
List channel participants
Returns a page of channel active participants: members that currently online
Authorizations:
path Parameters
id required | integer <int64> Channel ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/702/participants?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "users": [
- {
- "id": 14503,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3004,
- "type": "PERSON",
- "name": "1",
- "displayName": "ChatKittyUser",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6152,
- "type": "PERSON",
- "name": "10zxc13@gmail.com",
- "displayName": "Jack",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3353,
- "type": "PERSON",
- "name": "12121",
- "displayName": "12121",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6602,
- "type": "PERSON",
- "name": "123",
- "displayName": "123",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 571,
- "totalPages": 115,
- "number": 0
}
}
List chat sessions
Returns a page of chat sessions belonging to this application
Authorizations:
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
state | string Enum: "ACTIVE" "ENDED" Filters by state |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "sessions": [
- {
- "id": 1480794,
- "session": {
- "id": 544188,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-09-19T04:35:43.576Z",
- "createdTime": "2021-09-19T04:28:48.442Z"
}, - "state": "ENDED",
- "endTime": "2021-09-19T04:33:41.677Z",
- "createdTime": "2021-09-19T04:33:40.657Z",
- "_links": {
}
}, - {
- "id": 1480795,
- "session": {
- "id": 544188,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-09-19T04:35:43.576Z",
- "createdTime": "2021-09-19T04:28:48.442Z"
}, - "state": "ENDED",
- "endTime": "2021-09-19T04:35:43.597Z",
- "createdTime": "2021-09-19T04:33:41.710Z",
- "_links": {
}
}, - {
- "id": 1480731,
- "session": {
- "id": 544216,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-09-19T04:38:45.272Z",
- "createdTime": "2021-09-19T04:35:45.028Z"
}, - "state": "ENDED",
- "endTime": "2021-09-19T04:35:55.360Z",
- "createdTime": "2021-09-19T04:35:45.685Z",
- "_links": {
}
}, - {
- "id": 1481281,
- "session": {
- "id": 545001,
- "user": {
- "id": 39806,
- "type": "PERSON",
- "name": "c6f75947-af48-4893-a78e-0e0b9bd68580",
- "displayName": "Julie Jaxton",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-09-20T12:13:12.242Z",
- "createdTime": "2021-09-20T12:13:09.900Z"
}, - "state": "ENDED",
- "endTime": "2021-09-20T12:13:12.255Z",
- "createdTime": "2021-09-20T12:13:10.352Z",
- "_links": {
}
}, - {
- "id": 1481282,
- "session": {
- "id": 545052,
- "user": {
- "id": 39807,
- "type": "PERSON",
- "name": "8fadc920-f3e6-49ff-9398-1e58b3dc44dd",
- "displayName": "Zaria Bria",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-09-20T12:13:22.564Z",
- "createdTime": "2021-09-20T12:13:20.105Z"
}, - "state": "ENDED",
- "endTime": "2021-09-20T12:13:22.575Z",
- "createdTime": "2021-09-20T12:13:20.553Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 5190,
- "totalPages": 1038,
- "number": 0
}
}
Retrieve a chat function version
Returns a chat function version by ID
Authorizations:
path Parameters
id required | integer <int64> Chat function version ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/function-versions/13515' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 13515,
- "versionNumber": 34,
- "handlerScript": "const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n logs.push('Hello ' + event.username);\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return logs;\n}",
- "_links": {
}
}
Retrieve a chat function
Returns a chat function by ID
Authorizations:
path Parameters
id required | integer <int64> Chat function ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/functions/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "user.attempted.start_session",
- "runtime": {
- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29"
}, - "name": "User Attempted Start Session",
- "enabled": true,
- "currentVersionNumber": 34,
- "_links": {
- "currentVersion": {
},
}
}
Retrieve chat function current version
Returns the version of this chat function currently deployed
Authorizations:
path Parameters
id required | integer <int64> Chat function ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/functions/13515/current-version' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 13515,
- "versionNumber": 34,
- "handlerScript": "const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n logs.push('Hello ' + event.username);\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return logs;\n}",
- "_links": {
}
}
List chat function invocations
Returns a page of invocations of this chat function. A log of previous runs of the function
Authorizations:
path Parameters
id required | integer <int64> Chat function ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/functions/1/invocations?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "invocations": [
- {
- "id": 468510,
- "versionNumber": 34,
- "args": {
- "authParams": {
- "displayName": "Niyati"
}, - "username": "asac@sfas.com"
}, - "status": "SUCCEEDED",
- "result": {
- "payload": [
- "Hello asac@sfas.com"
]
}, - "createdTime": "2021-09-20T06:37:01.766Z",
}, - {
- "id": 468453,
- "versionNumber": 34,
- "args": {
- "authParams": {
- "displayName": ""
}, - "username": ""
}, - "status": "SUCCEEDED",
- "result": {
- "payload": [
- "Hello ",
- "Hello "
]
}, - "createdTime": "2021-09-19T09:34:40.190Z",
}, - {
- "id": 468452,
- "versionNumber": 34,
- "args": {
- "authParams": {
- "displayName": ""
}, - "username": ""
}, - "status": "SUCCEEDED",
- "result": {
- "payload": [
- "Hello "
]
}, - "createdTime": "2021-09-19T09:34:26.890Z",
}, - {
- "id": 467243,
- "versionNumber": 34,
- "args": {
- "authParams": {
- "displayName": ""
}, - "username": "aaron"
}, - "status": "SUCCEEDED",
- "result": {
- "payload": [
- "Hello aaron"
]
}, - "createdTime": "2021-09-17T17:00:31.396Z",
}, - {
- "id": 467162,
- "versionNumber": 34,
- "args": {
- "authParams": {
- "displayName": "bob"
}, - "username": "fwfe@efw.com"
}, - "status": "SUCCEEDED",
- "result": {
- "payload": [
- "Hello fwfe@efw.com"
]
}, - "createdTime": "2021-09-17T09:15:50.072Z",
}
]
}, - "_links": {
- "first": {
}, - "self": {
}, - "next": {
},
}, - "page": {
- "size": 5,
- "totalElements": 7578,
- "totalPages": 1516,
- "number": 0
}
}
List chat function versions
Returns a page of versions of this chat function
Authorizations:
path Parameters
id required | integer <int64> Chat function ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/functions/1/versions?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "versions": [
- {
- "id": 13515,
- "versionNumber": 34,
- "handlerScript": "const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n logs.push('Hello ' + event.username);\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return logs;\n}",
- "_links": {
}
}, - {
- "id": 13461,
- "versionNumber": 33,
- "handlerScript": "const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n logs.push('Hello!');\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return logs;\n}",
- "_links": {
}
}, - {
- "id": 4802,
- "versionNumber": 32,
- "handlerScript": "async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return {payload: true};\n}",
- "_links": {
}
}, - {
- "id": 4652,
- "versionNumber": 31,
- "handlerScript": "async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return true;\n}",
- "_links": {
}
}, - {
- "id": 4555,
- "versionNumber": 30,
- "handlerScript": "async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return {\n status: \"SUCCESS\"\n };\n}",
- "_links": {
}
}
]
}, - "_links": {
- "first": {
},
}, - "page": {
- "size": 5,
- "totalElements": 35,
- "totalPages": 7,
- "number": 0
}
}
Create a chat function version
Creates a new version of this chat function
Authorizations:
path Parameters
id required | integer <int64> Chat function ID |
Request Body schema: application/vnd.chatkitty+json
handler_script required | string JavaScript/TypeScript code that runs when this function is executed |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "handlerScript": "const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n logs.push('Hello ' + event.username);\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return logs;\n}"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 13515,
- "versionNumber": 34,
- "handlerScript": "const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n let email = event.username;\n let displayName = event.authParams.displayName || email;\n\n let userApi = context.getUserApi();\n\n logs.push('Hello ' + event.username);\n\n await userApi.getUserExists(email)\n .catch(async () => {\n let user = await userApi.createUser(\n {\n 'name': email,\n 'displayName': displayName\n }\n );\n\n let channelApi = context.getChannelApi();\n\n await channelApi.createChannelMember(702, { 'id': user.data.id });\n });\n\n return logs;\n}",
- "_links": {
}
}
Import channels
Batch imports channels from a JSON array file
Authorizations:
Request Body schema: multipart/form-data
file required | string <binary> JSON array file with channels |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/imports/channels' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@channels_import_file.json;type=application/json
Response samples
- 202
- 400
- 401
- 403
- 404
{- "id": 53,
- "type": "CHANNEL_IMPORT",
- "state": "PENDING",
- "createdTime": "2021-09-28T05:30:44.265Z",
- "endedTime": "2021-09-28T05:30:44.692Z",
- "_links": {
}
}
Import channel members
Batch imports channel members from a JSON array file
Authorizations:
path Parameters
id required | integer <int64> |
Request Body schema: multipart/form-data
file required | string <binary> JSON array file with user references to be added as members |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/imports/channels/1/members' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@members_import_file.json;type=application/json
Response samples
- 202
- 400
- 401
- 403
- 404
{- "id": 205,
- "type": "CHANNEL_MEMBERS_IMPORT",
- "state": "PENDING",
- "createdTime": "2022-05-28T05:30:44.265Z",
- "endedTime": "2022-05-28T05:30:44.692Z",
- "_links": {
}
}
Import messages
Batch imports messages from a JSON array file
Authorizations:
Request Body schema: multipart/form-data
file required | string <binary> JSON array file with messages |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/imports/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@messages_import_file.json;type=application/json
Response samples
- 202
- 400
- 401
- 403
- 404
{- "id": 203,
- "type": "MESSAGE_IMPORT",
- "state": "PENDING",
- "createdTime": "2022-04-28T05:30:44.265Z",
- "endedTime": "2022-04-28T05:30:44.692Z",
- "_links": {
}
}
Import users
Batch imports users from a JSON array file
Authorizations:
Request Body schema: multipart/form-data
file required | string <binary> JSON array file with users |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/imports/users' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@users_import_file.json;type=application/json
Response samples
- 202
- 400
- 401
- 403
- 404
{- "id": 202,
- "type": "USER_IMPORT",
- "state": "PENDING",
- "createdTime": "2022-03-28T05:30:44.265Z",
- "endedTime": "2022-03-28T05:30:44.692Z",
- "_links": {
}
}
List jobs
Returns a page of jobs created for this application
Authorizations:
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
running | boolean Filters for jobs currently running |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/jobs' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "jobs": [
- {
- "id": 1,
- "type": "CHANNEL_IMPORT",
- "state": "FAILED",
- "createdTime": "2021-09-28T04:19:41.255Z",
- "endedTime": "2021-09-28T04:19:42.230Z",
- "_links": {
}
}, - {
- "id": 52,
- "type": "CHANNEL_IMPORT",
- "state": "FAILED",
- "createdTime": "2021-09-28T05:30:08.902Z",
- "endedTime": "2021-09-28T05:30:09.571Z",
- "_links": {
}
}, - {
- "id": 53,
- "type": "CHANNEL_IMPORT",
- "state": "FINISHED",
- "createdTime": "2021-09-28T05:30:44.265Z",
- "endedTime": "2021-09-28T05:30:44.692Z",
- "_links": {
}
}, - {
- "id": 54,
- "type": "CHANNEL_IMPORT",
- "state": "FINISHED",
- "createdTime": "2021-09-28T05:35:35.075Z",
- "endedTime": "2021-09-28T05:36:15.755Z",
- "_links": {
}
}, - {
- "id": 102,
- "type": "CHANNEL_MEMBERS_IMPORT",
- "state": "FINISHED",
- "createdTime": "2021-09-29T04:52:22.895Z",
- "endedTime": "2021-09-29T04:52:58.941Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 25,
- "totalElements": 5,
- "totalPages": 1,
- "number": 0
}
}
Retrieve a job
Returns a job by ID
Authorizations:
path Parameters
id required | integer <int64> Job ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/jobs/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 53,
- "type": "CHANNEL_IMPORT",
- "state": "PENDING",
- "createdTime": "2021-09-28T05:30:44.265Z",
- "endedTime": "2021-09-28T05:30:44.692Z",
- "_links": {
}
}
List messages
Returns a page of messages belonging to this application
Authorizations:
query Parameters
size | integer <int32> The size of the page to be returned |
start | integer <int64> Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
next | integer <int64> Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages |
relation | string Enum: "SELF" "PREVIOUS" "NEXT" Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
username | string Filters messages by a sender's username |
query | string Filters text messages by text contained in the message body |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "messages": [
- {
- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}, - {
- "id": 44701,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "test",
- "properties": { },
- "createdTime": "2021-09-16T14:57:55.903Z",
- "_links": {
}
}, - {
- "id": 44700,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "hi",
- "properties": { },
- "createdTime": "2021-09-16T14:57:46.056Z",
- "_links": {
}
}, - {
- "id": 44760,
- "type": "TEXT",
- "channelId": 1255,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "do?",
- "properties": { },
- "createdTime": "2021-09-16T09:14:09.585Z",
- "_links": {
}
}, - {
- "id": 44759,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "ok",
- "properties": { },
- "createdTime": "2021-09-16T09:13:48.030Z",
- "_links": {
}
}
]
}, - "page": {
- "size": 5
}
}
Delete messages
Deletes all messages belonging to this application
Authorizations:
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "key": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "properties": { },
- "created_time": "2020-10-02T20:29:25.316Z",
}
Retrieve a message
Returns a message by ID
Authorizations:
path Parameters
id required | integer <int64> Message ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/messages/44902' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}
Delete a message
Deletes a message by ID
Authorizations:
path Parameters
id required | integer <int64> Message ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/messages/67528' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 67528,
- "type": "MAIN",
- "properties": { },
- "createdTime": "2022-02-04T13:19:06.764939Z",
- "_links": {
}
}
Update a message
Updates a message properties
Authorizations:
path Parameters
id required | integer <int64> Message ID |
Request Body schema: application/json+merge-patch
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}
List message read receipts
Returns a page of read receipts for this message
Authorizations:
path Parameters
id required | integer <int64> |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/messages/1/read-receipts?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "receipts": [
- {
- "user": {
- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "createdTime": "2022-06-02T16:51:03.206366286Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 1,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Retrieve NodeJS chat runtime
Return this application's NodeJS chat runtime
Authorizations:
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/runtimes/nodejs' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29",
- "dependencies": [
- {
- "name": "axios",
- "version": "^0.19.2",
- "defaultDependency": true
}, - {
- "name": "axios-token-interceptor",
- "version": "^0.2.0",
- "defaultDependency": true
}, - {
- "name": "chatkitty-platform-sdk",
- "version": "1.0.1",
- "defaultDependency": true
}, - {
- "name": "qs",
- "version": "6.9.4",
- "defaultDependency": true
}, - {
- "name": "firebase",
- "version": "^9.8.2",
- "defaultDependency": false
}
], - "initializationScript": {
- "script": "var foo = 8;"
}, - "environmentVariables": {
- "CHATKITTY_CLIENT_SECRET": "34e65736-70c2-4d30-b80a-8ad9887c860b",
- "CHATKITTY_CLIENT_ID": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "CHATKITTY_APPLICATION_ID": "1",
}, - "_links": {
- "dependencies": {
}, - "initializationScript": {
},
}
}
Update NodeJS chat runtime NPM dependencies
Updates the NPM dependencies for this application's NodeJS chat runtime
Authorizations:
Request Body schema: application/vnd.chatkitty+json
default_dependency required | boolean True if this NPM package is automatically installed by ChatKitty and available by default in your chat functions |
name required | string The name of the dependency NPM package |
version required | string The version of the NPM package |
Responses
Request samples
- Payload
- cURL
- JavaScript
[- {
- "name": "firebase",
- "version": "^9.8.2"
}
]
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29",
- "dependencies": [
- {
- "name": "axios",
- "version": "^0.19.2",
- "defaultDependency": true
}, - {
- "name": "axios-token-interceptor",
- "version": "^0.2.0",
- "defaultDependency": true
}, - {
- "name": "chatkitty-platform-sdk",
- "version": "1.0.1",
- "defaultDependency": true
}, - {
- "name": "qs",
- "version": "6.9.4",
- "defaultDependency": true
}, - {
- "name": "firebase",
- "version": "^9.8.2",
- "defaultDependency": false
}
], - "initializationScript": {
- "script": "var foo = 8;"
}, - "environmentVariables": {
- "CHATKITTY_CLIENT_SECRET": "34e65736-70c2-4d30-b80a-8ad9887c860b",
- "CHATKITTY_CLIENT_ID": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "CHATKITTY_APPLICATION_ID": "1",
}, - "_links": {
- "dependencies": {
}, - "initializationScript": {
},
}
}
Update NodeJS chat runtime environment variables
Updates the runtime environment variables of this application's NodeJS chat runtime
Authorizations:
Request Body schema: application/vnd.chatkitty+json
property name* additional property | string Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "CUSTOM_ENV_AWS_REGION": "us-east-1"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29",
- "dependencies": [
- {
- "name": "axios",
- "version": "^0.19.2",
- "defaultDependency": true
}, - {
- "name": "axios-token-interceptor",
- "version": "^0.2.0",
- "defaultDependency": true
}, - {
- "name": "chatkitty-platform-sdk",
- "version": "1.0.1",
- "defaultDependency": true
}, - {
- "name": "qs",
- "version": "6.9.4",
- "defaultDependency": true
}, - {
- "name": "firebase",
- "version": "^9.8.2",
- "defaultDependency": false
}
], - "initializationScript": {
- "script": "var foo = 8;"
}, - "environmentVariables": {
- "CHATKITTY_CLIENT_SECRET": "34e65736-70c2-4d30-b80a-8ad9887c860b",
- "CHATKITTY_CLIENT_ID": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "CHATKITTY_APPLICATION_ID": "1",
}, - "_links": {
- "dependencies": {
}, - "initializationScript": {
},
}
}
List NodeJS chat runtime functions
Returns a page of functions for this application's NodeJS chat runtime
Authorizations:
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/runtimes/nodejs/functions?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "functions": [
- {
- "id": 202,
- "type": "user.received.notification",
- "runtime": {
- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29"
}, - "name": "User Received Notification",
- "enabled": true,
- "currentVersionNumber": 5,
- "_links": {
- "currentVersion": {
},
}
}, - {
- "id": 4552,
- "type": "user.sent.message",
- "runtime": {
- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29"
}, - "name": "User Sent Message",
- "enabled": false,
- "currentVersionNumber": 0,
- "_links": {
- "currentVersion": {
},
}
}, - {
- "id": 6152,
- "type": "user.started.chat_session",
- "runtime": {
- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29"
}, - "name": "User Started Chat Session",
- "enabled": false,
- "currentVersionNumber": 0,
- "_links": {
- "currentVersion": {
},
}
}, - {
- "id": 1,
- "type": "user.attempted.start_session",
- "runtime": {
- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29"
}, - "name": "User Attempted Start Session",
- "enabled": true,
- "currentVersionNumber": 34,
- "_links": {
- "currentVersion": {
},
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 4,
- "totalPages": 1,
- "number": 0
}
}
Create a NodeJS chat runtime function
Creates a NodeJS chat function for this runtime
Authorizations:
Request Body schema: application/vnd.chatkitty+json
type required | string |
description | string |
initialize_asynchronously required | boolean |
name required | string |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "type": "user.attempted.start_session",
- "name": "User Attempted Start Session"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "user.attempted.start_session",
- "runtime": {
- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29"
}, - "name": "User Attempted Start Session",
- "enabled": true,
- "currentVersionNumber": 34,
- "_links": {
- "currentVersion": {
},
}
}
Update NodeJS chat runtime initialization script
Updates the initialization script for this application's NodeJS chat runtime
Authorizations:
Request Body schema: application/vnd.chatkitty+json
script required | string The JavaScript/TypeScript source of this script |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "script": "import firebase from 'firebase';\r\nimport '@firebase/auth';\r\nimport '@firebase/firestore';\r\n\r\nconst firebaseConfig = {\r\n apiKey: 'AIzaSyBEqSZdB3qTeSTyycvYDgJ5qG-5Xg9rQZY',\r\n authDomain: 'chatkitty-example.firebaseapp.com',\r\n databaseURL: 'https://chatkitty-example.firebaseio.com',\r\n projectId: 'chatkitty-example',\r\n storageBucket: 'chatkitty-example.appspot.com',\r\n messagingSenderId: '540634290949',\r\n appId: '1:540634290949:web:cd754ff7e98087230ff56c',\r\n measurementId: 'G-BB7Q5DRQK6',\r\n};\r\n\r\nif (!firebase.apps.length) {\r\n firebase.initializeApp(firebaseConfig);\r\n}\r\n\r\nexport { firebase };"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "NODEJS",
- "version": "v0.0.29",
- "dependencies": [
- {
- "name": "axios",
- "version": "^0.19.2",
- "defaultDependency": true
}, - {
- "name": "axios-token-interceptor",
- "version": "^0.2.0",
- "defaultDependency": true
}, - {
- "name": "chatkitty-platform-sdk",
- "version": "1.0.1",
- "defaultDependency": true
}, - {
- "name": "qs",
- "version": "6.9.4",
- "defaultDependency": true
}, - {
- "name": "firebase",
- "version": "^9.8.2",
- "defaultDependency": false
}
], - "initializationScript": {
- "script": "var foo = 8;"
}, - "environmentVariables": {
- "CHATKITTY_CLIENT_SECRET": "34e65736-70c2-4d30-b80a-8ad9887c860b",
- "CHATKITTY_CLIENT_ID": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "CHATKITTY_APPLICATION_ID": "1",
}, - "_links": {
- "dependencies": {
}, - "initializationScript": {
},
}
}
Retrieve a thread
Returns a thread by ID
Authorizations:
path Parameters
id required | integer <int64> Reply thread ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/threads/67528' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 67528,
- "type": "MAIN",
- "properties": { },
- "createdTime": "2022-02-04T13:19:06.764939Z",
- "_links": {
}
}
Send thread keystrokes
Sends keystrokes in this thread on behalf of a user
Authorizations:
path Parameters
id required | integer <int64> |
Request Body schema: application/json
keys required | string |
user required | object (ChatUserReference) Reference to a user |
Responses
Request samples
- Payload
{- "keys": "string",
- "user": {
- "username": "jane@chatkitty.com"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "keys": "string",
- "username": "string",
- "_links": [
- {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}
]
}
List reply thread messages
Returns a page of replies sent in this thread
Authorizations:
path Parameters
id required | integer <int64> |
query Parameters
size | integer <int32> The size of the page to be returned |
start | integer <int64> Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
next | integer <int64> Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages |
relation | string Enum: "SELF" "PREVIOUS" "NEXT" Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/threads/1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "messages": [
- {
- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}, - {
- "id": 44701,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "test",
- "properties": { },
- "createdTime": "2021-09-16T14:57:55.903Z",
- "_links": {
}
}, - {
- "id": 44700,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "hi",
- "properties": { },
- "createdTime": "2021-09-16T14:57:46.056Z",
- "_links": {
}
}, - {
- "id": 44760,
- "type": "TEXT",
- "channelId": 1255,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "do?",
- "properties": { },
- "createdTime": "2021-09-16T09:14:09.585Z",
- "_links": {
}
}, - {
- "id": 44759,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "ok",
- "properties": { },
- "createdTime": "2021-09-16T09:13:48.030Z",
- "_links": {
}
}
]
}, - "page": {
- "size": 5
}
}
Send a reply thread message
Sends a reply message in this thread as the system or on behalf of a user
Authorizations:
path Parameters
id required | integer <int64> |
Request Body schema:
type required | string |
group_tag | string Optional string to associate this message with other messages. Can be used to group messages into a gallery |
object Custom data associated with this message | |
user | object (ChatUserReference) Reference to a user |
body required | string The text body of this message |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "type": "TEXT",
- "body": "Hello, World!"
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}
List user sessions
Returns a page of user sessions belonging to this application
Authorizations:
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
state | string Enum: "ACTIVE" "ENDED" Filters by state |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "sessions": [
- {
- "id": 635627,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-11-12T08:25:27.253Z",
- "createdTime": "2021-11-12T08:02:34.122Z",
- "_links": {
}
}, - {
- "id": 635641,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-11-12T08:35:08.587Z",
- "createdTime": "2021-11-12T08:25:33.885Z",
- "_links": {
}
}, - {
- "id": 635669,
- "user": {
- "id": 39806,
- "type": "PERSON",
- "name": "c6f75947-af48-4893-a78e-0e0b9bd68580",
- "displayName": "Julie Jaxton",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-11-12T08:55:36.282Z",
- "createdTime": "2021-11-12T08:38:54.982Z",
- "_links": {
}
}, - {
- "id": 635644,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-11-12T08:54:48.309Z",
- "createdTime": "2021-11-12T08:45:13.682Z",
- "_links": {
}
}, - {
- "id": 635651,
- "user": {
- "id": 39805,
- "type": "PERSON",
- "name": "b2a6da08-88bf-4778-b993-7234e6d8a3ff",
- "displayName": "Joni Jordyn",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "state": "ENDED",
- "userAgent": "ChatKitty-JS/1.50.0",
- "endTime": "2021-11-12T09:06:40.409Z",
- "createdTime": "2021-11-12T09:04:53.490Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 1645,
- "totalPages": 329,
- "number": 0
}
}
List users
Returns a page of users belonging to this application
Authorizations:
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
name | string Filters by username |
properties | string Filters by user custom properties |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "users": [
- {
- "id": 14503,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3004,
- "type": "PERSON",
- "name": "1",
- "displayName": "ChatKittyUser",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6152,
- "type": "PERSON",
- "name": "10zxc13@gmail.com",
- "displayName": "Jack",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 3353,
- "type": "PERSON",
- "name": "12121",
- "displayName": "12121",
- "isGuest": true,
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}, - {
- "id": 6602,
- "type": "PERSON",
- "name": "123",
- "displayName": "123",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
- "displayPicture": {
},
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 571,
- "totalPages": 115,
- "number": 0
}
}
Create a user
Creates a new user
Authorizations:
Request Body schema: application/vnd.chatkitty+json
display_name required | string Human readable name of this user. Shown to other users |
is_guest required | boolean True if this user was created by a guest user session |
name required | string The unique name used to identify this user across ChatKitty. Also known as username |
object Custom data associated with this user |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "isGuest": false,
- "properties": {
- "favoriteNumber": 42
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}
Check a user exists
Checks if a user exists
Authorizations:
query Parameters
name required | string Username of the user |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'HEAD' \ 'https://api.chatkitty.com/v1/users?name=Jane%20Doe' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{ }
Retrieve a user
Returns a user by ID
Authorizations:
path Parameters
id required | integer <int64> User ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}
Delete a user
Delets a user
Authorizations:
path Parameters
id required | integer <int64> User ID |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/users/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "key": "19b458d0-2b50-491c-8f13-65ec12f3978e",
- "properties": { },
- "created_time": "2020-10-02T20:29:25.316Z",
}
Update a user
Updates a user
Authorizations:
path Parameters
id required | integer <int64> User ID |
Request Body schema: application/json+merge-patch
Responses
Request samples
- Payload
- cURL
- JavaScript
{ }
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}
List a user's channels
Returns a page of channels for this user created or joined
Authorizations:
path Parameters
id required | integer <int64> User ID |
query Parameters
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 25 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/channels?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "channels": [
- {
- "id": 15252,
- "type": "DIRECT",
- "creator": {
- "id": 19652,
- "type": "PERSON",
- "name": "rexyfexy@gmail.com",
- "displayName": "doark",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "members": [
- {
- "id": 19652,
- "type": "PERSON",
- "name": "rexyfexy@gmail.com",
- "displayName": "doark",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - {
- "id": 19452,
- "type": "PERSON",
- "name": "aa",
- "displayName": "emra",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}
], - "properties": { },
- "createdTime": "2021-05-05T00:38:24.888Z",
- "_links": {
- "participants": {
},
}
}, - {
- "id": 55913,
- "type": "PUBLIC",
- "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7",
- "displayName": "Our public channel",
- "properties": { },
- "createdTime": "2021-09-28T01:35:40.967Z",
- "_links": {
- "participants": {
},
}
}, - {
- "id": 2402,
- "type": "PUBLIC",
- "name": "#test",
- "displayName": "Test Channel",
- "creator": {
- "id": 4153,
- "type": "PERSON",
- "name": "test@mail.com",
- "displayName": "mridx",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "properties": { },
- "createdTime": "2020-12-13T21:12:09.195Z",
- "_links": {
}
}, - {
- "id": 856,
- "type": "PUBLIC",
- "name": "mkm",
- "displayName": "Meme Channel",
- "creator": {
- "id": 1504,
- "type": "PERSON",
- "name": "njnj@vghf.jk",
- "displayName": "mkm",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "lastReceivedMessage": {
- "id": 17654,
- "type": "TEXT",
- "channelId": 856,
- "user": {
- "id": 15402,
- "type": "PERSON",
- "name": "paras@code.co",
- "displayName": "Paras",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "body": "ghk",
- "properties": { },
- "createdTime": "2021-03-31T06:00:28.680Z"
}, - "properties": { },
- "createdTime": "2020-11-25T07:46:45.775Z",
- "_links": {
}
}, - {
- "id": 1302,
- "type": "PUBLIC",
- "name": "SONU KUMAR",
- "displayName": "SONU KUMAR",
- "creator": {
- "id": 2302,
- "type": "PERSON",
- "name": "852122",
- "displayName": "SONU KUMAR",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "lastReceivedMessage": {
- "id": 44530,
- "type": "TEXT",
- "channelId": 1302,
- "user": {
- "id": 39826,
- "type": "PERSON",
- "name": "steve@innersync.com",
- "displayName": "Steve Williams",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "callStatus": "AVAILABLE",
- "properties": { }
}, - "body": "Checking out",
- "properties": { },
- "createdTime": "2021-09-14T18:02:56.066Z"
}, - "properties": { },
- "createdTime": "2020-12-02T05:10:01.260Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5,
- "totalElements": 2020,
- "totalPages": 404,
- "number": 0
}
}
Update a user's display picture
Updates a user's display picture
Authorizations:
path Parameters
id required | integer <int64> User ID |
Request Body schema:
content_type required | string File MIME content type |
name required | string File name |
size required | integer <int64> File size in bytes |
url required | string External file URL |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "name": "jane.png",
- "contentType": "image/png",
- "size": 32768
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}
List a user's messages
Returns a page of messages sent by this user
Authorizations:
path Parameters
id required | integer <int64> User ID |
query Parameters
size | integer <int32> The size of the page to be returned |
start | integer <int64> Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
next | integer <int64> Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages |
relation | string Enum: "SELF" "PREVIOUS" "NEXT" Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
unread | boolean Filters by returning unread messages |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "messages": [
- {
- "id": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T20:45:33.696Z",
- "_links": {
}
}, - {
- "id": 44701,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "test",
- "properties": { },
- "createdTime": "2021-09-16T14:57:55.903Z",
- "_links": {
}
}, - {
- "id": 44700,
- "type": "TEXT",
- "channelId": 802,
- "user": {
- "id": 39906,
- "type": "PERSON",
- "name": "sean.donald@gmail.com",
- "displayName": "zolo",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "hi",
- "properties": { },
- "createdTime": "2021-09-16T14:57:46.056Z",
- "_links": {
}
}, - {
- "id": 44760,
- "type": "TEXT",
- "channelId": 1255,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "do?",
- "properties": { },
- "createdTime": "2021-09-16T09:14:09.585Z",
- "_links": {
}
}, - {
- "id": 44759,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "ok",
- "properties": { },
- "createdTime": "2021-09-16T09:13:48.030Z",
- "_links": {
}
}
]
}, - "page": {
- "size": 5
}
}
List a user's notifications
Returns a page of notifications received by this user
Authorizations:
path Parameters
id required | integer <int64> User ID |
query Parameters
size | integer <int32> The size of the page to be returned |
start | integer <int64> Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
next | integer <int64> Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages |
relation | string Enum: "SELF" "PREVIOUS" "NEXT" Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/notifications' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "_embedded": {
- "notifications": [
- {
- "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": {
}
}, - {
- "id": 3255805,
- "title": "System message sent",
- "body": "Hello, World!",
- "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": 85216,
- "type": "SYSTEM_TEXT",
- "channelId": 702,
- "body": "Hello, World!",
- "properties": { },
- "createdTime": "2022-06-02T16:34:58.871950Z",
- "_links": {
}
}, - "channelId": 702,
- "type": "SYSTEM:SENT:MESSAGE",
- "_relays": {
- "message": "/application/v1/messages/85216.relay"
}
}, - "createdTime": "2022-06-02T16:35:14.296158Z",
- "_links": {
}
}, - {
- "id": 1750641,
- "title": "hey sent a message",
- "body": "🌞",
- "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": 44902,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39953,
- "type": "PERSON",
- "name": "hey@mailinator.com",
- "displayName": "hey",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "🌞",
- "properties": { },
- "createdTime": "2021-09-16T16:45:33.696Z",
- "_links": {
}
}, - "channelId": 702,
- "type": "USER:SENT:MESSAGE",
- "_relays": {
- "message": "/application/v1/messages/44902.relay"
}
}, - "createdTime": "2021-09-16T16:45:48.351Z",
- "_links": {
}
}, - {
- "id": 1749995,
- "title": "ho sent a message",
- "body": "ok",
- "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": 44759,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39841,
- "type": "PERSON",
- "name": "ho@mailinator.com",
- "displayName": "ho",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "ok",
- "properties": { },
- "createdTime": "2021-09-16T05:13:48.030Z",
- "_links": {
}
}, - "channelId": 702,
- "type": "USER:SENT:MESSAGE",
- "_relays": {
- "message": "/application/v1/messages/44759.relay"
}
}, - "createdTime": "2021-09-16T05:14:00.993Z",
- "_links": {
}
}, - {
- "id": 1749225,
- "title": "Nisar sent a message",
- "body": "hi",
- "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": 44559,
- "type": "TEXT",
- "channelId": 702,
- "user": {
- "id": 39827,
- "type": "PERSON",
- "name": "ss@dd.com",
- "displayName": "Nisar",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { }
}, - "body": "hi",
- "properties": { },
- "createdTime": "2021-09-14T20:13:37.357Z",
- "_links": {
}
}, - "channelId": 702,
- "type": "USER:SENT:MESSAGE",
- "_relays": {
- "message": "/application/v1/messages/44559.relay"
}
}, - "createdTime": "2021-09-14T20:13:49.998Z",
- "_links": {
}
}
]
}, - "_links": {
}, - "page": {
- "size": 5
}
}
Retrieve a user secret
Returns a user secret
Authorizations:
path Parameters
id required | integer <int64> User ID |
name required | string The secret's name |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/secrets/Secret%20Name' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "secret": "My secret is... well, I'd never tell."
}
Set a user secret
Sets a user secret's value
Authorizations:
path Parameters
id required | integer <int64> User ID |
name required | string The secret's name |
Request Body schema: application/vnd.chatkitty+json
secret | object Secret value |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "secret": "My secret is... well, I'd never tell."
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}
Remove a user secret
Removes a user secret's value
Authorizations:
path Parameters
id required | integer <int64> User ID |
name required | string The secret's name |
Responses
Request samples
- cURL
- JavaScript
curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/users/1/secrets/Secret%20Name' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN'
Response samples
- 200
- 400
- 401
- 403
- 404
{- "id": 1,
- "type": "PERSON",
- "name": "jane@chatkitty.com",
- "displayName": "Jane Doe",
- "presence": {
- "status": "UNAVAILABLE",
- "online": false
}, - "properties": { },
- "_links": {
}
}