Skip to main content

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.

Analytics

Export analytics data from your ChatKitty application

Export message analytics

Batch export message analytics data

Authorizations:
application_authorization

Responses

Response samples

Content type
{}

Export user analytics

Batch export user analytics data

Authorizations:
application_authorization

Responses

Response samples

Content type
{}

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
{}

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
{
  • "features": {
    }
}

Update the authenticated application settings

Update the settings configuring this application

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

Content type
application/vnd.chatkitty+json
{
  • "guest_users": "DISABLED",
  • "user_created_channels": "DISABLED"
}

Response samples

Content type
{
  • "features": {
    }
}

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
{}

Create a channel

Creates a new channel or returns an equivalent existing channel

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

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

Response samples

Content type
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
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
{}

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
object (JsonMergePatch)

Responses

Request samples

Content type
application/json+merge-patch
{ }

Response samples

Content type
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/vnd.chatkitty+json
type
required
string

Custom type of this event

required
object

Custom data associated with this event

Responses

Request samples

Content type
application/vnd.chatkitty+json
{
  • "type": "My Custom Event",
  • "properties": {
    }
}

Response samples

Content type
{}

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
{}

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/vnd.chatkitty+json
user
required
object (ChatUserReference)

Reference to a user

Responses

Request samples

Content type
application/vnd.chatkitty+json
{
  • "user": {
    }
}

Response samples

Content type
{}

Send channel keystrokes

Sends keystrokes in this channel on behalf of a user

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

Content type
application/json
{
  • "keys": "string",
  • "user": {
    }
}

Response samples

Content type
{
  • "keys": "string",
  • "username": "string",
  • "_links": [
    ]
}

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
{}

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/vnd.chatkitty+json
object (ChatUserReference)

Reference to a user

Responses

Request samples

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

Response samples

Content type
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
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
{}

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
{}

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

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

Response samples

Content type
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
{}

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/vnd.chatkitty+json
object (ChatUserReference)

Reference to a user

Responses

Request samples

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

Response samples

Content type
{}

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
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
{}

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
{}

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
{
  • "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
{}

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
{
  • "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
{}

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
{
  • "_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/vnd.chatkitty+json
handler_script
required
string

JavaScript/TypeScript code that runs when this function is executed

Responses

Request samples

Content type
application/vnd.chatkitty+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
{
  • "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
{}

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
{}

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
{}

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
{}

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
{}

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
{}

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
{}

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
{}

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
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
{}

Update a message

Updates a message properties

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Message ID

Request Body schema: application/json+merge-patch
object (JsonMergePatch)

Responses

Request samples

Content type
application/json+merge-patch
{ }

Response samples

Content type
Example
{}

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
{}

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
{}

Update NodeJS chat runtime NPM dependencies

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

Authorizations:
application_authorization
Request Body schema: application/vnd.chatkitty+json
Array
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

Content type
application/vnd.chatkitty+json
[
  • {
    }
]

Response samples

Content type
{}

Update NodeJS chat runtime environment variables

Updates the runtime environment variables of this application's NodeJS chat runtime

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

Content type
application/vnd.chatkitty+json
{
  • "CUSTOM_ENV_AWS_REGION": "us-east-1"
}

Response samples

Content type
{}

List NodeJS chat runtime functions

Returns a page of functions for this application's NodeJS chat runtime

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.

Responses

Request samples

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

Content type
{}

Create a NodeJS chat runtime function

Creates a NodeJS chat function for this runtime

Authorizations:
application_authorization
Request Body schema: application/vnd.chatkitty+json
type
required
string
description
string
initialize_asynchronously
required
boolean
name
required
string

Responses

Request samples

Content type
application/vnd.chatkitty+json
{
  • "type": "user.attempted.start_session",
  • "name": "User Attempted Start Session"
}

Response samples

Content type
{}

Update NodeJS chat runtime initialization script

Updates the initialization script for this application's NodeJS chat runtime

Authorizations:
application_authorization
Request Body schema: application/vnd.chatkitty+json
script
required
string

The JavaScript/TypeScript source of this script

Responses

Request samples

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

Content type
{}

Threads

Message thread operations

Retrieve a thread

Returns a thread by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

Reply thread ID

Responses

Request samples

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

Response samples

Content type
{}

Send thread keystrokes

Sends keystrokes in this thread on behalf of a user

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

Content type
application/json
{
  • "keys": "string",
  • "user": {
    }
}

Response samples

Content type
{
  • "keys": "string",
  • "username": "string",
  • "_links": [
    ]
}

List reply thread messages

Returns a page of replies sent in this thread

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

Response samples

Content type
{}

Send a reply thread message

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

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

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

Response samples

Content type
Example
{}

User Sessions

User session operations

List user sessions

Returns a page of user 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
{}

Users

User operations

List users

Returns a page of users 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.

name
string

Filters by username

properties
string

Filters by user custom properties

Responses

Request samples

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

Content type
{}

Create a user

Creates a new user

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

Content type
application/vnd.chatkitty+json
{
  • "name": "jane@chatkitty.com",
  • "displayName": "Jane Doe",
  • "isGuest": false,
  • "properties": {
    }
}

Response samples

Content type
{}

Check a user exists

Checks if a user exists

Authorizations:
application_authorization
query Parameters
name
required
string

Username of the user

Responses

Request samples

curl --location --request 'HEAD' \
  'https://api.chatkitty.com/v1/users?name=Jane%20Doe' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN'

Response samples

Content type
{ }

Retrieve a user

Returns a user by ID

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

User ID

Responses

Request samples

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

Response samples

Content type
{}

Delete a user

Delets a user

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

User ID

Responses

Request samples

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

Response samples

Content type
{}

Update a user

Updates a user

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

User ID

Request Body schema: application/json+merge-patch
object (JsonMergePatch)

Responses

Request samples

Content type
application/json+merge-patch
{ }

Response samples

Content type
{}

List a user's channels

Returns a page of channels for this user created or joined

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

Content type
{}

Update a user's display picture

Updates a user's display picture

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

Content type
{}

Response samples

Content type
{}

List a user's messages

Returns a page of messages sent by this user

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

Response samples

Content type
{}

List a user's notifications

Returns a page of notifications received by this user

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

Response samples

Content type
{}

Retrieve a user secret

Returns a user secret

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

User ID

name
required
string

The secret's name

Responses

Request samples

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

Content type
{
  • "secret": "My secret is... well, I'd never tell."
}

Set a user secret

Sets a user secret's value

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

Content type
application/vnd.chatkitty+json
{
  • "secret": "My secret is... well, I'd never tell."
}

Response samples

Content type
{}

Remove a user secret

Removes a user secret's value

Authorizations:
application_authorization
path Parameters
id
required
integer <int64>

User ID

name
required
string

The secret's name

Responses

Request samples

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

Content type
{}