Skip to main content

ChatKitty Platform API (v1.26.0)

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.

Application

Configure and manage your ChatKitty application

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:
application_authorization

Responses

Request samples

curl -X 'GET' \
  'https://api.chatkitty.com/v1/application' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Retrieve the authenticated application settings

Returns the current settings configuring this application

Authorizations:
application_authorization

Responses

Request samples

curl -X 'GET' \
  'https://api.chatkitty.com/v1/application/settings' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{
  • "guestUsers": "DISABLED",
  • "userCreatedChannels": "DISABLED"
}

Update the authenticated application settings

Update the settings configuring this application

Authorizations:
application_authorization
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

Content type
application/json
{
  • "guestUsers": "DISABLED",
  • "userCreatedChannels": "DISABLED"
}

Response samples

Content type
application/json
{
  • "guestUsers": "DISABLED",
  • "userCreatedChannels": "DISABLED"
}

Channels

Operations to create, retrieve, update and delete channels

List channels

Returns a page of channels belonging to this application

Authorizations:
application_authorization
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 --location --request 'GET' \
  'https://api.chatkitty.com/v1/channels?page=0&size=5' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Create a channel

Creates a new channel or returns an equivalent existing channel

Authorizations:
application_authorization
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

Content type
application/json
Example
{
  • "type": "PUBLIC",
  • "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7"
}

Response samples

Content type
application/json
Example
{}

Retrieve a channel

Returns a channel by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/channels/55913' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
Example
{}

Delete a channel

Deletes a channel by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

Responses

Request samples

curl --location --request 'DELETE' \
  'https://api.chatkitty.com/v1/channels/55913' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Update a channel

Updates a channel properties

Authorizations:
application_authorization
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

Content type
application/json+merge-patch
{
  • "displayName": "A chatty channel"
}

Response samples

Content type
application/json
Example
{}

Send a channel event

Sends a custom channel event

Authorizations:
application_authorization
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

Content type
application/json
{
  • "type": "My Custom Event",
  • "properties": {
    }
}

Response samples

Content type
application/json
{}

List channel invites

Returns a page of invites sent to join this channel

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

Send a channel invite

Sends a channel invite to user

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

Request Body schema: application/json
required
ChatUserIdReference (object) or ChatUserUsernameReference (object)
One of
id
required
integer <int64>

User ID associated with this user

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{}

List a channel's members

Returns a page of channel members

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

Add a channel member

Makes a user a group channel member

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

Request Body schema: application/json
One of
id
required
integer <int64>

User ID associated with this user

Responses

Request samples

Content type
application/json
Example
{
  • "username": "jane@chatkitty.com"
}

Response samples

Content type
application/json
Example
{}

Remove a channel member

Removes a member from a group channel

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

user_id
required
integer <int64>

User ID of member to be removed

Responses

Request samples

curl --location --request 'DELETE' \
  'https://api.chatkitty.com/v1/channels/55913/members/14503' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
Example
{}

List channel memberships

Returns a page of channel membership info for this channel

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

List channel messages

Returns a page of messages sent in this channel

Authorizations:
application_authorization
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 --location --request 'GET' \
  'https://api.chatkitty.com/v1/channels/702/messages' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Send a channel message

Sends a message in this channel as the system or on behalf of a user

Authorizations:
application_authorization
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

Content type
Example
{
  • "type": "TEXT",
  • "body": "Hello, World!"
}

Response samples

Content type
application/json
Example
{}

Lists a channel's moderators

Returns a page of channel moderators

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

Add a channel moderator

Makes a user a group channel moderator

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

Request Body schema: application/json
One of
id
required
integer <int64>

User ID associated with this user

Responses

Request samples

Content type
application/json
Example
{
  • "username": "jane@chatkitty.com"
}

Response samples

Content type
application/json
{}

Remove a channel moderator

Removes a moderator from a group channel

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Channel ID

user_id
required
integer <int64>

User ID of moderator to be removed

Responses

Request samples

curl --location --request 'DELETE' \
  'https://api.chatkitty.com/v1/channels/55913/moderators/14503' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
Example
{}

List channel participants

Returns a page of channel active participants: members that currently online

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

Chat Sessions

Chat session operations

List chat sessions

Returns a page of chat sessions belonging to this application

Authorizations:
application_authorization
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

Content type
application/json
{}

Chat Function Versions

Chat function version operations

Retrieve a chat function version

Returns a chat function version by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Chat function version ID

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/function-versions/13515' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{
  • "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}",
}

Chat Functions

Chat function operations

Retrieve a chat function

Returns a chat function by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Chat function ID

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/functions/1' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Retrieve chat function current version

Returns the version of this chat function currently deployed

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Chat function ID

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/functions/13515/current-version' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{
  • "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}",
}

List chat function invocations

Returns a page of invocations of this chat function. A log of previous runs of the function

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

List chat function versions

Returns a page of versions of this chat function

Authorizations:
application_authorization
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 --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

Content type
application/json
{
  • "_embedded": {
    },
  • "page": {
    }
}

Create a chat function version

Creates a new version of this chat function

Authorizations:
application_authorization
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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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}",
}

Imports

Import user, channel, message data into your ChatKitty application

Import channels

Authorizations:
application_authorization
Request Body schema: multipart/form-data
file
required
string <binary>

JSON array file with channels

Responses

Request samples

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

Content type
application/json
{}

Import channel members

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

Import messages

Authorizations:
application_authorization
Request Body schema: multipart/form-data
file
required
string <binary>

JSON array file with messages

Responses

Request samples

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

Content type
application/json
{}

Import users

Authorizations:
application_authorization
Request Body schema: multipart/form-data
file
required
string <binary>

JSON array file with users

Responses

Request samples

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

Content type
application/json
{}

Jobs

Retrieve information about long running scheduled jobs like imports and exports

List jobs

Returns a page of jobs created for this application

Authorizations:
application_authorization
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 --location --request 'GET' \
  'https://api.chatkitty.com/v1/jobs' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Retrieve a job

Returns a job by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Job ID

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/jobs/1' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Messages

Operations to retrieve, update and delete messages

List messages

Returns a page of messages belonging to this application

Authorizations:
application_authorization
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 --location --request  'GET' \
  'https://api.chatkitty.com/v1/messages' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Delete messages

Deletes all messages belonging to this application

Authorizations:
application_authorization

Responses

Request samples

curl --location --request 'DELETE' \
  'https://api.chatkitty.com/v1/messages' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Retrieve a message

Returns a message by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Message ID

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/messages/44902' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
Example
{}

Delete a message

Deletes a message by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Message ID

Responses

Request samples

curl --location --request 'DELETE' \
  'https://api.chatkitty.com/v1/messages/67528' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

List message read receipts

Returns a page of read receipts for this message

Authorizations:
application_authorization
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 --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

Content type
application/json
{}

Chat Runtime

Chat runtime operations

Retrieve NodeJS chat runtime

Return this application's NodeJS chat runtime

Authorizations:
application_authorization

Responses

Request samples

curl --location --request 'GET' \
  'https://api.chatkitty.com/v1/runtimes/nodejs' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
application/json
{}

Update NodeJS chat runtime NPM dependencies

Updates the NPM dependencies for this application's NodeJS chat runtime

Authorizations:
application_authorization
Request Body schema: application/json
Array
defaultDependency
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