ChatKitty Platform API (2.5.5)
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.
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/json
guestUsers required | string Enum: "DISABLED" "ENABLED" Toggle state of this settings option |
userCreatedChannels required | string Enum: "DISABLED" "ENABLED" Toggle state of this settings option |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "guestUsers": "DISABLED",
- "userCreatedChannels": "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/json
type required | string |
ChatUserIdReference (object) or ChatUserUsernameReference (object) | |
Array of ChatUserIdReference (object) or ChatUserUsernameReference (object) 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 |
displayName | 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
displayName | string Updates human readable name of this channel |
object Updates custom data associated with this channel |
Responses
Request samples
- Payload
- cURL
- JavaScript
{- "displayName": "A chatty channel"
}
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/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/json
required | ChatUserIdReference (object) or ChatUserUsernameReference (object) | ||
One of
|
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 |
required | ChatUserIdReference (object) or ChatUserUsernameReference (object) |
Responses
Request samples
- Payload
{- "keys": "string",
- "user": {
- "username": "jane@chatkitty.com",
- "id": 0
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
{- "keys": "string",
- "username": "string",
- "_links": {
- "property1": {
- "href": "string",
- "hreflang": "string",
- "title": "string",
- "type": "string",
- "deprecation": "string",
- "profile": "string",
- "name": "string",
- "templated": true
}, - "property2": {
- "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/json
id required | integer <int64> User ID associated with this 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 |
groupTag | 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 | |
ChatUserIdReference (object) or ChatUserUsernameReference (object) | |
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/json
id required | integer <int64> User ID associated with this 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/json
handlerScript 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
body | string Updates the text body of this message |
object Updates custom data associated with this message |
Responses
Request samples
- Payload
{- "body": "string",
- "properties": { }
}
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": {
- "self": {
- "href":