openapi: 3.0.1 info: title: ChatKitty Platform API description: |- 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. version: 2.58.3 termsOfService: https://chatkitty.com/terms-of-service contact: name: Support url: mailto:support@chatkitty.com license: name: MIT url: https://opensource.org/licenses/MIT x-konfig-ignore: object-with-no-properties: true servers: - url: https://api.chatkitty.com tags: - description: Operations to create, retrieve, update and delete channels name: channels x-displayName: Channels - description: User operations name: users x-displayName: Users - description: Operations to retrieve, update and delete messages name: messages x-displayName: Messages - description: Chat runtime operations name: runtime x-displayName: Chat Runtime - description: Chat function operations name: functions x-displayName: Chat Functions - description: Import user, channel, message data into your ChatKitty application name: imports x-displayName: Imports - description: Message thread operations name: threads x-displayName: Threads - description: Configure and manage your ChatKitty application name: application x-displayName: Application - description: Export analytics data from your ChatKitty application name: analytics x-displayName: Analytics - description: >- Retrieve information about long running scheduled jobs like imports and exports name: jobs x-displayName: Jobs - description: Chat session operations name: chat-sessions x-displayName: Chat Sessions - description: Chat function version operations name: function-versions x-displayName: Chat Function Versions - description: User session operations name: user-sessions x-displayName: User Sessions paths: /v1/analytics/messages: post: tags: - analytics summary: Export message analytics operationId: Analytics_exportMessageAnalyticsData security: - application_authorization: - read:message description: Batch export message analytics data responses: '202': description: Export job accepted content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/analytics/users: post: tags: - analytics summary: Export user analytics operationId: Analytics_exportUserAnalyticsData security: - application_authorization: - read:user description: Batch export user analytics data responses: '202': description: Export job accepted content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/application: get: tags: - application summary: Retrieve the authenticated application operationId: Application_getAuthenticated security: - application_authorization: - read:application description: >- Returns the ChatKitty application associated with the authentication credentials used. You must use an **OAuth V2 Bearer token** to access this endpoint. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl -X 'GET' \ 'https://api.chatkitty.com/v1/application' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Application.retrieveAuthenticatedApplication() /v1/application/settings: get: tags: - application summary: Retrieve the authenticated application settings operationId: Application_getSettings security: - application_authorization: - read:application description: Returns the current settings configuring this application responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl -X 'GET' \ 'https://api.chatkitty.com/v1/application/settings' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: > // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Application.retrieveAuthenticatedApplicationSettings() put: tags: - application summary: Update the authenticated application settings operationId: Application_updateSettings security: - application_authorization: - update:application description: Update the settings configuring this application requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationSettingsProperties' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationSettingsResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl -X 'PUT' \ 'https://api.chatkitty.com/v1/application/settings' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "guestUsers": "DISABLED", "userCreatedChannels": "DISABLED" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Application.updateAuthenticatedApplicationSettings({ guestUsers: 'DISABLED', userCreatedChannels: 'DISABLED' }) /v1/channels: get: tags: - channels summary: List channels operationId: Channels_list security: - application_authorization: - read:channel description: Returns a page of channels belonging to this application parameters: - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string - description: Filters by channel type name: type in: query required: false schema: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE - description: Filters by channel members using their usernames name: members in: query required: false schema: uniqueItems: true type: array items: type: string - description: 'Filters for channels created within a time range: start time' name: startTime in: query required: false schema: type: string format: date-time - description: 'Filters for channels created within a time range: end time' name: endTime in: query required: false schema: type: string format: date-time - description: Filters by channel custom properties name: properties in: query required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChannelResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels?page=0&size=5' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannels() post: tags: - channels summary: Create a channel operationId: Channels_createChannel security: - application_authorization: - create:channel description: Creates a new channel or returns an equivalent existing channel requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CreateChannelResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/channels' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "type": "PUBLIC", "name": "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.createChannel({ type: "PUBLIC", name: "b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7" }) /v1/channels/{id}: get: tags: - channels summary: Retrieve a channel operationId: Channels_getById security: - application_authorization: - read:channel description: Returns a channel by ID parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/55913' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.retrieveChannel(55913) delete: tags: - channels summary: Delete a channel operationId: Channels_deleteById security: - application_authorization: - read:channel - delete:channel description: Deletes a channel by ID parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/channels/55913' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.deleteChannel(55913) patch: tags: - channels summary: Update a channel operationId: Channels_updateProperties security: - application_authorization: - read:channel - update:channel description: Updates a channel properties parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json+merge-patch: schema: $ref: '#/components/schemas/JsonMergePatch' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'PATCH' \ 'https://api.chatkitty.com/v1/channels/55913' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json+merge-patch' \ -d '{ "displayName": "A chatty channel" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.updateChannel(55913, { displayName: "A chatty channel" }) /v1/channels/{id}/events: post: tags: - channels summary: Send a channel event operationId: Channels_sendEvent security: - application_authorization: - read:channel - create:channel_event description: Sends a custom channel event parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CreateChannelGenericEventResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelGenericEventResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelGenericEventResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelGenericEventResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelGenericEventResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/channels/55913/events' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "type": "My Custom Event", "properties": { "payload": "Boom!", "stuff": { "favoriteNumber": 42, "favoriteMovie": "Lilo and Stitch" } } }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.sendChannelEvent(55913, { type: "My Custom Event", properties: { payload: "Boom!", stuff: { "favoriteNumber": 42, "favoriteMovie": "Lilo and Stitch" } } }) /v1/channels/{id}/invites: get: tags: - channels summary: List channel invites operationId: Channels_listInvites security: - application_authorization: - read:channel_invite description: Returns a page of invites sent to join this channel parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChannelInviteResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChannelInviteResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChannelInviteResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChannelInviteResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannelInvites(67026) post: tags: - channels summary: Send a channel invite operationId: Channels_sendInvite security: - application_authorization: - read:channel - read:user - create:channel_invite description: Sends a channel invite to user parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CreateChannelInviteResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelInviteResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelInviteResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelInviteResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelInviteResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/channels/67026/invites' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ user: { "username": "jane@chatkitty.com" } }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.sendChannelInvite(67026, { user: { username: "jane@chatkitty.com" } }) /v1/channels/{id}/keystrokes: post: tags: - channels summary: Send channel keystrokes operationId: Channels_sendKeystrokes security: - application_authorization: - read:channel - read:user - create:keystrokes description: Sends keystrokes in this channel on behalf of a user parameters: - name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: >- #/components/schemas/CreateDelegatedReplyThreadKeystrokesResource required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' application/hal+json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/channels/{id}/members: get: tags: - channels summary: List a channel's members operationId: Channels_listMembersPage security: - application_authorization: - read:channel - read:channel_membership description: Returns a page of channel members parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannelMembers(67026) post: tags: - channels summary: Add a channel member operationId: Channels_addMember security: - application_authorization: - read:channel - read:user - create:channel_membership description: Makes a user a group channel member parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserReference' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/channels/55913/members' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "username": "jane@chatkitty.com" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.addChannelMember(55913, { username: "jane@chatkitty.com" }) /v1/channels/{id}/members/{user_id}: delete: tags: - channels summary: Remove a channel member operationId: Channels_removeMember security: - application_authorization: - read:channel - read:user - delete:channel_membership description: Removes a member from a group channel parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: User ID of member to be removed name: user_id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/channels/55913/members/14503' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.removeChannelMember(55913, 14503) /v1/channels/{id}/memberships: get: tags: - channels summary: List channel memberships operationId: Channels_listMembershipsPage security: - application_authorization: - read:channel - read:channel_membership description: Returns a page of channel membership info for this channel parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChannelMembershipResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChannelMembershipResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChannelMembershipResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChannelMembershipResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannelMemberships(702) /v1/channels/{id}/messages: get: tags: - channels summary: List channel messages operationId: Channels_listMessagesPage security: - application_authorization: - read:channel - read:message description: Returns a page of messages sent in this channel parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: The size of the page to be returned name: size in: query required: false schema: type: integer format: int32 - description: >- Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: start in: query required: false schema: type: integer format: int64 - description: >- Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages name: next in: query required: false schema: type: integer format: int64 - description: >- Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: relation in: query required: false schema: type: string enum: - SELF - PREVIOUS - NEXT - name: username in: query required: false schema: type: string - name: query in: query required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/channels/702/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannelMessages(702) post: tags: - channels summary: Send a channel message operationId: Channels_sendChannelMessage security: - application_authorization: - read:channel - read:user - create:message description: Sends a message in this channel as the system or on behalf of a user parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMessageResource' multipart/form-data: schema: $ref: '#/components/schemas/ChannelsSendChannelMessageRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/MessageResource' application/hal+json: schema: $ref: '#/components/schemas/MessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/channels/702/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "type": "TEXT", "body": "🌞" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.sendChannelMessage(702, { "type": "TEXT", "body": "🌞" }) /v1/channels/{id}/moderators: get: tags: - channels summary: Lists a channel's moderators operationId: Channels_listModeratorsPage security: - application_authorization: - read:channel - read:channel_moderator description: Returns a page of channel moderators parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannelModerators(67026) post: tags: - channels summary: Add a channel moderator operationId: Channels_addModerator security: - application_authorization: - read:channel - read:user - read:channel_membership - create:channel_moderator description: Makes a user a group channel moderator parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserReference' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/channels/55913/moderators' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "username": "jane@chatkitty.com" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.addChannelModerator(55913, { username: "jane@chatkitty.com" }) /v1/channels/{id}/moderators/{user_id}: delete: tags: - channels summary: Remove a channel moderator operationId: Channels_removeModerator security: - application_authorization: - read:channel - read:user - delete:channel_moderator description: Removes a moderator from a group channel parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: User ID of moderator to be removed name: user_id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChannelResource' application/hal+json: schema: $ref: '#/components/schemas/ChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/channels/55913/moderators/14503' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.removeChannelModerator(55913, 14503) /v1/channels/{id}/participants: get: tags: - channels summary: List channel participants operationId: Channels_listParticipantsPage security: - application_authorization: - read:channel - read:chat_session description: >- Returns a page of channel active participants: members that currently online parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Channels.listChannelParticipants(702) /v1/channels/{id}/reported-messages: get: tags: - channels summary: List channel reported messages operationId: Channels_listReportedMessagesPage security: - application_authorization: - read:channel - read:message_report description: Returns a page of reported messages in this channel parameters: - description: Channel ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelMessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelMessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelMessageResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelMessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/chat-sessions: get: tags: - chat-sessions summary: List chat sessions operationId: Chatsessions_listPage security: - application_authorization: - read:chat_session description: Returns a page of chat sessions belonging to this application parameters: - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string - description: Filters by state name: state in: query required: false schema: type: string enum: - ACTIVE - ENDED responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatSessionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatSessionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatSessionResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatSessionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/function-versions/{id}: get: tags: - function-versions summary: Retrieve a chat function version operationId: Functionversions_getById security: - application_authorization: - read:function_version description: Returns a chat function version by ID parameters: - description: Chat function version ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/hal+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/function-versions/13515' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.FunctionVersions.retrieveFunctionVersion(13515) /v1/functions/{id}: get: tags: - functions summary: Retrieve a chat function operationId: Functions_getById security: - application_authorization: - read:function description: Returns a chat function by ID parameters: - description: Chat function ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatFunctionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatFunctionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatFunctionResource' application/hal+json: schema: $ref: '#/components/schemas/ChatFunctionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/functions/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Functions.retrieveFunction(1) /v1/functions/{id}/current-version: get: tags: - functions summary: Retrieve chat function current version operationId: Functions_getCurrentVersion security: - application_authorization: - read:function - read:function_version description: Returns the version of this chat function currently deployed parameters: - description: Chat function ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/hal+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/functions/13515/current-version' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Functions.retrieveFunctionCurrentVersion(13515) /v1/functions/{id}/invocations: get: tags: - functions summary: List chat function invocations operationId: Functions_listInvocationsPage security: - application_authorization: - read:function - read:function_invocation description: >- Returns a page of invocations of this chat function. A log of previous runs of the function parameters: - description: Chat function ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatFunctionInvocationResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionInvocationResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionInvocationResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionInvocationResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Functions.listFunctionInvocations(1) /v1/functions/{id}/versions: get: tags: - functions summary: List chat function versions operationId: Functions_listVersionsPage security: - application_authorization: - read:function - read:function_version description: Returns a page of versions of this chat function parameters: - description: Chat function ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatFunctionVersionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionVersionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionVersionResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionVersionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Functions.listFunctionVersions(1) post: tags: - functions summary: Create a chat function version operationId: Functions_createFunctionVersion security: - application_authorization: - read:function - create:function_version description: Creates a new version of this chat function parameters: - description: Chat function ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CreateChatFunctionVersionResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' application/hal+json: schema: $ref: '#/components/schemas/ChatFunctionVersionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/functions/1/versions' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "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}" } ' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Functions.createFunctionVersion(13515,{ "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}" }) /v1/imports/channels: post: tags: - imports summary: Import channels operationId: Imports_batchChannels security: - application_authorization: - create:channel description: Batch imports channels from a JSON array file requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/ImportsBatchChannelsRequest' responses: '202': description: Import job accepted content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 53 type: CHANNEL_IMPORT state: PENDING createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 53 type: CHANNEL_IMPORT state: PENDING createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 53 type: CHANNEL_IMPORT state: PENDING createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 53 type: CHANNEL_IMPORT state: PENDING createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' externalDocs: description: >- Learn more about importing channels and the channel import JSON array file format url: https://chatkitty.com/docs/concepts/imports#importing-channels x-codeSamples: - lang: cURL source: | 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 - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) const file = new File( ['[{"idempotencyKey":"unique-external-id","type":"DIRECT","members":["jane@chatkitty.com","john@chatkitty.com"]}]'], "import.json", { type: "application/json" }) await chatkitty.Imports.importChannels(file) /v1/imports/channels/{id}/members: post: tags: - imports summary: Import channel members operationId: Imports_channelMembersBatch security: - application_authorization: - create:channel_membership description: Batch imports channel members from a JSON array file parameters: - name: id in: path required: true schema: type: integer format: int64 requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/ImportsChannelMembersBatchRequest' responses: '202': description: Import job accepted content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 205 type: CHANNEL_MEMBERS_IMPORT state: PENDING createdTime: '2022-05-28T05:30:44.265Z' endedTime: '2022-05-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/205 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 205 type: CHANNEL_MEMBERS_IMPORT state: PENDING createdTime: '2022-05-28T05:30:44.265Z' endedTime: '2022-05-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/205 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 205 type: CHANNEL_MEMBERS_IMPORT state: PENDING createdTime: '2022-05-28T05:30:44.265Z' endedTime: '2022-05-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/205 application: href: https://api.chatkitty.com/v1/applications/1 application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 205 type: CHANNEL_MEMBERS_IMPORT state: PENDING createdTime: '2022-05-28T05:30:44.265Z' endedTime: '2022-05-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/205 application: href: https://api.chatkitty.com/v1/applications/1 '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' externalDocs: description: >- Learn more about importing channel members and the channel member import JSON array file format url: https://chatkitty.com/docs/concepts/imports#importing-channel-members x-codeSamples: - lang: cURL source: | 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 - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) const file = new File( ['[{"idempotencyKey":"unique-external-id","type":"DIRECT","members":["b2a6da08-88bf-4778-b993-7234e6d8a3ff","c6f75947-af48-4893-a78e-0e0b9bd68580"]}]'], "import.json", { type: "application/json" }) await chatkitty.Imports.importChannelMembers(1, [{ idempotencyKey: "123", username: "string" }]) /v1/imports/messages: post: tags: - imports summary: Import messages operationId: Imports_batchMessagesFromJson security: - application_authorization: - create:message description: Batch imports messages from a JSON array file requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/ImportsBatchMessagesFromJsonRequest' responses: '202': description: Import job accepted content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 203 type: MESSAGE_IMPORT state: PENDING createdTime: '2022-04-28T05:30:44.265Z' endedTime: '2022-04-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/203 application: href: https://api.chatkitty.com/v1/applications/1 '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' externalDocs: description: >- Learn more about importing messages and the message import JSON array file format url: https://chatkitty.com/docs/concepts/imports#importing-messages x-codeSamples: - lang: cURL source: | 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 - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) const file = new File( ['[{"type":"TEXT","body":"Hello, World!"}]'], "import.json", { type: "application/json" }) await chatkitty.Imports.importMessages(file) /v1/imports/users: post: tags: - imports summary: Import users operationId: Imports_jsonUsersBatch security: - application_authorization: - create:user description: Batch imports users from a JSON array file requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/ImportsJsonUsersBatchRequest' responses: '202': description: Import job accepted content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' example: id: 202 type: USER_IMPORT state: PENDING createdTime: '2022-03-28T05:30:44.265Z' endedTime: '2022-03-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/202 application: href: https://api.chatkitty.com/v1/applications/1 '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' externalDocs: description: >- Learn more about importing users and the user import JSON array file format url: https://chatkitty.com/docs/concepts/imports#importing-users x-codeSamples: - lang: cURL source: | 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 - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) const file = new File( ['[{name:"jane@chatkitty.com",displayName:"JaneDoe",isGuest:false,properties:{favoriteNumber:42}}]'], "import.json", { type: "application/json" }) await chatkitty.Imports.importUsers(file) /v1/jobs: get: tags: - jobs summary: List jobs operationId: Jobs_listJobsPage security: - application_authorization: - read:job description: Returns a page of jobs created for this application parameters: - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string - description: Filters for jobs currently running name: running in: query required: false schema: type: boolean responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelApplicationJobResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelApplicationJobResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelApplicationJobResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelApplicationJobResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/jobs' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Jobs.listJobs() /v1/jobs/{id}: get: tags: - jobs summary: Retrieve a job operationId: Jobs_getJobById security: - application_authorization: - read:job description: Returns a job by ID parameters: - description: Job ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationJobResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationJobResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationJobResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/jobs/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Jobs.retrieveJob(1) /v1/messages: get: tags: - messages summary: List messages operationId: Messages_listPage security: - application_authorization: - read:message description: Returns a page of messages belonging to this application parameters: - description: The size of the page to be returned name: size in: query required: false schema: type: integer format: int32 - description: >- Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: start in: query required: false schema: type: integer format: int64 - description: >- Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages name: next in: query required: false schema: type: integer format: int64 - description: >- Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: relation in: query required: false schema: type: string enum: - SELF - PREVIOUS - NEXT - description: Filters messages by a sender's username name: username in: query required: false schema: type: string - description: Filters text messages by text contained in the message body name: query in: query required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Messages.listMessages() delete: tags: - messages summary: Delete messages operationId: Messages_deleteAll security: - application_authorization: - read:message - delete:message description: Deletes all messages belonging to this application responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Messages.deleteMessages() /v1/messages/{id}: get: tags: - messages summary: Retrieve a message operationId: Messages_getById security: - application_authorization: - read:message description: Returns a message by ID parameters: - description: Message ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/MessageResource' application/hal+json: schema: $ref: '#/components/schemas/MessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/messages/44902' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Messages.retrieveMessage(44902) delete: tags: - messages summary: Delete a message operationId: Messages_removeById security: - application_authorization: - read:message - delete:message description: Deletes a message by ID parameters: - description: Message ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReplyThreadResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ReplyThreadResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ReplyThreadResource' application/hal+json: schema: $ref: '#/components/schemas/ReplyThreadResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/messages/67528' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Messages.deleteMessage(67528) patch: tags: - messages summary: Update a message operationId: Messages_updateProperties security: - application_authorization: - read:message - update:message description: Updates a message properties parameters: - description: Message ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json+merge-patch: schema: $ref: '#/components/schemas/JsonMergePatch' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/MessageResource' application/hal+json: schema: $ref: '#/components/schemas/MessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/messages/{id}/read-receipts: get: tags: - messages summary: List message read receipts operationId: Messages_listReadReceipts security: - application_authorization: - read:message - read:read_receipt description: Returns a page of read receipts for this message parameters: - name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelMessageReadReceiptResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelMessageReadReceiptResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelMessageReadReceiptResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelMessageReadReceiptResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Messages.listMessageReadReceipts(1) /v1/runtimes/nodejs: get: tags: - runtime summary: Retrieve NodeJS chat runtime operationId: Runtime_getNodejsChatRuntime security: - application_authorization: - read:runtime - update:runtime description: Return this application's NodeJS chat runtime responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/runtimes/nodejs' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Runtime.retrieveNodejsRuntime() /v1/runtimes/nodejs/dependencies: put: tags: - runtime summary: Update NodeJS chat runtime NPM dependencies operationId: Runtime_updateNodejsChatDependencies security: - application_authorization: - read:runtime - update:runtime description: Updates the NPM dependencies for this application's NodeJS chat runtime requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/RuntimeUpdateNodejsChatDependenciesRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'PUT' \ 'https://api.chatkitty.com/v1/runtimes/nodejs/dependencies' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "name": "firebase", "version": "^9.8.2" } ]' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Runtime.updateNodejsRuntimeDependencies([ { "name": "firebase", "version": "^9.8.2" } ]) /v1/runtimes/nodejs/environment-variables: put: tags: - runtime summary: Update NodeJS chat runtime environment variables operationId: Runtime_updateNodejsChatEnvironmentVariables security: - application_authorization: - read:runtime - update:runtime description: >- Updates the runtime environment variables of this application's NodeJS chat runtime requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatRuntimeEnvironmentVariablesProperties' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'PUT' \ 'https://api.chatkitty.com/v1/runtimes/nodejs/environment-variables' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "CUSTOM_ENV_AWS_REGION": "us-east-1" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Runtime.updateNodejsRuntimeEnvironmentVariables({ "CUSTOM_ENV_AWS_REGION": "us-east-1" }) /v1/runtimes/nodejs/functions: get: tags: - runtime summary: List NodeJS chat runtime functions operationId: Runtime_listNodejsChatFunctions security: - application_authorization: - read:runtime - read:function description: Returns a page of functions for this application's NodeJS chat runtime parameters: - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatFunctionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatFunctionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Runtime.listNodejsRuntimeFunctions() post: tags: - runtime summary: Create a NodeJS chat runtime function operationId: Runtime_createNodejsChatFunction security: - application_authorization: - read:runtime - read:function description: Creates a NodeJS chat function for this runtime requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CreateChatFunctionResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatFunctionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatFunctionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatFunctionResource' application/hal+json: schema: $ref: '#/components/schemas/ChatFunctionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/runtimes/nodejs/functions' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "type": "user.attempted.start_session", "name": "User Attempted Start Session" }' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Runtime.createNodejsRuntimeFunction({ "type": "user.attempted.start_session", "name": "User Attempted Start Session" }) /v1/runtimes/nodejs/initialization-script: put: tags: - runtime summary: Update NodeJS chat runtime initialization script operationId: Runtime_updateNodejsChatInitializationScript security: - application_authorization: - read:runtime - update:runtime description: >- Updates the initialization script for this application's NodeJS chat runtime requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatRuntimeScriptProperties' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' application/hal+json: schema: $ref: '#/components/schemas/ChatRuntimeResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'PUT' \ 'https://api.chatkitty.com/v1/runtimes/nodejs/initialization-script' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "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 };" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Runtime.updateNodejsRuntimeInitializationScript({ "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 };" }) /v1/threads/{id}: get: tags: - threads summary: Retrieve a thread operationId: Threads_getById security: - application_authorization: - read:thread description: Returns a thread by ID parameters: - description: Reply thread ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReplyThreadResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ReplyThreadResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ReplyThreadResource' application/hal+json: schema: $ref: '#/components/schemas/ReplyThreadResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/threads/67528' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: |+ // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Threads.retrieveThread(67528) /v1/threads/{id}/keystrokes: post: tags: - threads summary: Send thread keystrokes operationId: Threads_sendKeystrokes security: - application_authorization: - read:thread - read:user - create:keystrokes description: Sends keystrokes in this thread on behalf of a user parameters: - name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: >- #/components/schemas/CreateDelegatedReplyThreadKeystrokesResource required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' application/hal+json: schema: $ref: '#/components/schemas/ReplyThreadKeystrokesResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/threads/{id}/messages: get: tags: - threads summary: List reply thread messages operationId: Threads_listThreadMessages security: - application_authorization: - read:thread - read:message description: Returns a page of replies sent in this thread parameters: - name: id in: path required: true schema: type: integer format: int64 - description: The size of the page to be returned name: size in: query required: false schema: type: integer format: int32 - description: >- Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: start in: query required: false schema: type: integer format: int64 - description: >- Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages name: next in: query required: false schema: type: integer format: int64 - description: >- Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: relation in: query required: false schema: type: string enum: - SELF - PREVIOUS - NEXT responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/threads/1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Threads.listThreadMessages(1) post: tags: - threads summary: Send a reply thread message operationId: Threads_sendReplyMessage security: - application_authorization: - read:thread - read:user - create:message description: >- Sends a reply message in this thread as the system or on behalf of a user parameters: - name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMessageResource' multipart/form-data: schema: $ref: '#/components/schemas/ThreadsSendReplyMessageRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/MessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/MessageResource' application/hal+json: schema: $ref: '#/components/schemas/MessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/threads/44902/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "type": "TEXT", "body": "🌞", }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Threads.sendThreadMessage(44902, { "type": "TEXT", "body": "🌞", }) /v1/user-sessions: get: tags: - user-sessions summary: List user sessions operationId: Usersessions_listUserSessions security: - application_authorization: - read:user_session description: Returns a page of user sessions belonging to this application parameters: - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string - description: Filters by state name: state in: query required: false schema: type: string enum: - ACTIVE - ENDED responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatUserSessionResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatUserSessionResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserSessionResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserSessionResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: [] /v1/users: get: tags: - users summary: List users operationId: Users_getPage security: - application_authorization: - read:user description: Returns a page of users belonging to this application parameters: - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string - description: Filters by username name: name in: query required: false schema: type: string - description: Filters by user custom properties name: properties in: query required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users?page=0&size=25' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.listUsers() post: tags: - users summary: Create a user operationId: Users_createUser security: - application_authorization: - create:user description: Creates a new user requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CreatePersonChatUserResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/users' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "jane@chatkitty.com", "displayName": "Jane Doe", "isGuest": false, "properties": { "favoriteNumber": 42 } }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.createUser({ "name": "jane@chatkitty.com", "displayName": "Jane Doe", "isGuest": false, "properties": { "favoriteNumber": 42 } }) head: tags: - users summary: Check a user exists operationId: Users_checkExists security: - application_authorization: - read:user description: Checks if a user exists parameters: - description: Username of the user name: name in: query required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UsersCheckExistsResponse' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/UsersCheckExists200Response' application/vnd.hal+json: schema: $ref: '#/components/schemas/UsersCheckExists200Response' application/hal+json: schema: $ref: '#/components/schemas/UsersCheckExists200Response' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: User does not exist content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'HEAD' \ 'https://api.chatkitty.com/v1/users?name=Jane%20Doe' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.checkUserExists("Jane Doe") /v1/users/{id}: get: tags: - users summary: Retrieve a user operationId: Users_getById security: - application_authorization: - read:user description: Returns a user by ID parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.retrieveUser(1) delete: tags: - users summary: Delete a user operationId: Users_removeUser security: - application_authorization: - read:user - delete:user description: Delets a user parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ApplicationResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ApplicationResource' application/hal+json: schema: $ref: '#/components/schemas/ApplicationResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/users/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.deleteUser(1) patch: tags: - users summary: Update a user operationId: Users_updateUserById security: - application_authorization: - read:user - update:user description: Updates a user parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json+merge-patch: schema: $ref: '#/components/schemas/JsonMergePatch' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'PATCH' \ 'https://api.chatkitty.com/v1/users/1' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json+merge-patch' \ -d '{ "displayName": "Jane Doe" }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.updateUser(1) /v1/users/{id}/channels: get: tags: - users summary: List a user's channels operationId: Users_listChannelsPage security: - application_authorization: - read:user - read:channels description: Returns a page of channels for this user created or joined parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 - description: Zero-based page index (0..N) name: page in: query required: false schema: minimum: 0 type: integer default: 0 - description: The size of the page to be returned name: size in: query required: false schema: minimum: 1 type: integer default: 25 - description: >- Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. name: sort in: query required: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PagedModelChannelResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/PagedModelChannelResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/PagedModelChannelResource' application/hal+json: schema: $ref: '#/components/schemas/PagedModelChannelResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | 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' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.listUserChannels(1) /v1/users/{id}/display-picture: post: tags: - users summary: Update a user's display picture operationId: Users_updateDisplayPicture security: - application_authorization: - read:user - update:user description: Updates a user's display picture parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateExternalFileProperties' multipart/form-data: schema: $ref: '#/components/schemas/UsersUpdateDisplayPictureRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'POST' \ 'https://api.chatkitty.com/v1/users/1/display-picture' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/files/jane.png", "name": "jane.png", "contentType": "image/png", "size": 32768 }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.updateUserDisplayPicture(1, { "url": "https://example.com/files/jane.png", "name": "jane.png", "contentType": "image/png", "size": 32768 }) /v1/users/{id}/messages: get: tags: - users summary: List a user's messages operationId: Users_listMessagesPage security: - application_authorization: - read:user - read:channels description: Returns a page of messages sent by this user parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 - description: The size of the page to be returned name: size in: query required: false schema: type: integer format: int32 - description: >- Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: start in: query required: false schema: type: integer format: int64 - description: >- Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages name: next in: query required: false schema: type: integer format: int64 - description: >- Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: relation in: query required: false schema: type: string enum: - SELF - PREVIOUS - NEXT - description: Filters by returning unread messages name: unread in: query required: false schema: type: boolean responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' application/hal+json: schema: $ref: '#/components/schemas/CursorPagedModelMessageResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/messages' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.listUserMessages(1) /v1/users/{id}/notifications: get: tags: - users summary: List a user's notifications operationId: Users_listNotificationsPage security: - application_authorization: - read:user - read:notifications description: Returns a page of notifications received by this user parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 - description: The size of the page to be returned name: size in: query required: false schema: type: integer format: int32 - description: >- Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: start in: query required: false schema: type: integer format: int64 - description: >- Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages name: next in: query required: false schema: type: integer format: int64 - description: >- Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages name: relation in: query required: false schema: type: string enum: - SELF - PREVIOUS - NEXT responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CursorPagedModelNotificationResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/CursorPagedModelNotificationResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/CursorPagedModelNotificationResource' application/hal+json: schema: $ref: '#/components/schemas/CursorPagedModelNotificationResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/notifications' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.listUserNotifications(1) /v1/users/{id}/secrets/{name}: get: tags: - users summary: Retrieve a user secret operationId: Users_getSecret security: - application_authorization: - read:user_secret description: Returns a user secret parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 - description: The secret's name name: name in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SecretResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/SecretResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/SecretResource' application/hal+json: schema: $ref: '#/components/schemas/SecretResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'GET' \ 'https://api.chatkitty.com/v1/users/1/secrets/Secret%20Name' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.retrieveUserSecret(1,"Secret Name") put: tags: - users summary: Set a user secret operationId: Users_setUserSecret security: - application_authorization: - read:user - update:user_secret description: Sets a user secret's value parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 - description: The secret's name name: name in: path required: true schema: type: string requestBody: content: application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/SecretResource' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'PUT' \ 'https://api.chatkitty.com/v1/users/1/secrets/Jane%20Doe' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "secret": "My secret is... well, I'\''d never tell." }' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.setUserSecret(1, "Jane Doe", { "secret": "My secret is... well, I'd never tell." }) delete: tags: - users summary: Remove a user secret operationId: Users_removeSecretValue security: - application_authorization: - read:user - delete:user_secret description: Removes a user secret's value parameters: - description: User ID name: id in: path required: true schema: type: integer format: int64 - description: The secret's name name: name in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.chatkitty+json: schema: $ref: '#/components/schemas/ChatUserResource' application/vnd.hal+json: schema: $ref: '#/components/schemas/ChatUserResource' application/hal+json: schema: $ref: '#/components/schemas/ChatUserResource' '400': description: Client error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ClientError message: A client error occurred, check your request timestamp: '2022-01-16T06:26:49.627204600Z' '401': description: >- Unauthorized: Full authentication is required to access this resource content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: unauthorized error_description: Full authentication is required to access this resource '403': description: Access is denied content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' example: error: access_denied error_description: Access is denied '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: error: ResourceNotFoundError message: Resource not found timestamp: '2022-01-16T06:26:49.627204600Z' x-codeSamples: - lang: cURL source: | curl --location --request 'DELETE' \ 'https://api.chatkitty.com/v1/users/1/secrets/Secret%20Name' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ACCESS-TOKEN' - lang: JavaScript source: | // npm install chatkitty-platform-sdk const chatkitty = new ChatKitty({ clientId: 'CLIENT-ID', clientSecret: 'CLIENT-SECRET' }) await chatkitty.Users.removeUserSecret(1,"Secret Name") components: schemas: AuthenticationError: required: - error - error_description type: object properties: error: type: string error_description: type: string ApiError: required: - error - message - timestamp type: object properties: error: type: string explanation: type: string message: type: string properties: type: object additionalProperties: type: object writeOnly: true timestamp: type: string SecretResource: type: object properties: secret: description: Secret value type: object example: secret: My secret is... well, I'd never tell. ChatUserPresenceProperties: description: Presence status of this user required: - online - status type: object properties: online: description: True if this user has an active user session type: boolean status: description: The availability status of this user type: string ChatUserProperties: required: - display_name - display_picture_url - id - isGuest - name - presence - properties - type type: object properties: type: description: Type of user type: string enum: - PERSON - BOT id: description: 64-bit integer identifier associated with this resource type: integer format: int64 call_status: description: Call presence status of this user type: string enum: - AVAILABLE - IN_CALL display_name: description: Human readable name of this user. Shown to other users type: string display_picture_url: description: URL for this user's display picture type: string isGuest: description: True if this user was created by a guest user session type: boolean name: description: >- The unique name used to identify this user across ChatKitty. Also known as username type: string presence: $ref: '#/components/schemas/ChatUserPresenceProperties' properties: description: Custom data associated with this user type: object additionalProperties: description: Custom data associated with this user type: object ChatUserResource: required: - display_name - display_picture_url - id - isGuest - name - presence - properties - type type: object properties: type: description: Type of user type: string enum: - PERSON - BOT id: description: 64-bit integer identifier associated with this resource type: integer format: int64 call_status: description: Call presence status of this user type: string enum: - AVAILABLE - IN_CALL display_name: description: Human readable name of this user. Shown to other users type: string display_picture_url: description: URL for this user's display picture type: string isGuest: description: True if this user was created by a guest user session type: boolean name: description: >- The unique name used to identify this user across ChatKitty. Also known as username type: string presence: $ref: '#/components/schemas/ChatUserPresenceProperties' properties: description: Custom data associated with this user type: object additionalProperties: description: Custom data associated with this user type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 1 type: PERSON name: jane@chatkitty.com displayName: Jane Doe displayPictureUrl: https://api.chatkitty.com/v1/picture/jane presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/1 channels: href: https://api.chatkitty.com/v1/applications/1/users/1/channels notifications: href: https://api.chatkitty.com/v1/applications/1/users/1/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/1/display-picture application: href: https://api.chatkitty.com/v1/applications/1 Link: type: object properties: title: type: string href: type: string hreflang: type: string type: type: string deprecation: type: string profile: type: string name: type: string templated: type: boolean ChatRuntimeScriptProperties: required: - script type: object properties: script: description: The JavaScript/TypeScript source of this script type: string example: 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 };" ChatRuntimeDependencyProperties: description: The NPM dependencies version of this runtime required: - default_dependency - name - version type: object properties: version: description: The version of the NPM package type: string default_dependency: description: >- True if this NPM package is automatically installed by ChatKitty and available by default in your chat functions type: boolean name: description: The name of the dependency NPM package type: string example: version: ^9.8.2 name: firebase ChatRuntimeEnvironmentVariablesProperties: description: >- Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime type: object additionalProperties: description: >- Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime type: string example: CUSTOM_ENV_AWS_REGION: us-east-1 ChatRuntimeProperties: required: - dependencies - environment_variables - id - type - version type: object properties: version: description: The semantic version of this runtime type: string type: description: The type of this runtime. Always NODEJS type: string enum: - NODEJS id: description: 64-bit integer identifier associated with this resource type: integer format: int64 dependencies: description: The NPM dependencies version of this runtime type: array items: $ref: '#/components/schemas/ChatRuntimeDependencyProperties' environment_variables: description: >- Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime type: object additionalProperties: description: >- Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime type: string initialization_script: $ref: '#/components/schemas/ChatRuntimeScriptProperties' example: version: v0.0.29 id: 1 type: NODEJS dependencies: - version: ^0.19.2 name: axios defaultDependency: true - version: ^0.2.0 name: axios-token-interceptor defaultDependency: true - version: 1.0.1 name: chatkitty-platform-sdk defaultDependency: true - version: 6.9.4 name: qs defaultDependency: true - version: ^9.8.2 name: firebase defaultDependency: false initializationScript: script: var foo = 8; environmentVariables: CHATKITTY_CLIENT_SECRET: 34e65736-70c2-4d30-b80a-8ad9887c860b CHATKITTY_CLIENT_ID: 19b458d0-2b50-491c-8f13-65ec12f3978e CHATKITTY_CHAT_SERVICE_BASE_URL: https://api.chatkitty.com CHATKITTY_APPLICATION_ID: '1' CHATKITTY_AUTHORIZATION_SERVICE_BASE_URL: https://authorization.chatkitty.com ChatRuntimeResource: required: - dependencies - environment_variables - id - type - version type: object properties: version: description: The semantic version of this runtime type: string type: description: The type of this runtime. Always NODEJS type: string enum: - NODEJS id: description: 64-bit integer identifier associated with this resource type: integer format: int64 dependencies: description: The NPM dependencies version of this runtime type: array items: $ref: '#/components/schemas/ChatRuntimeDependencyProperties' environment_variables: description: >- Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime type: object additionalProperties: description: >- Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime type: string initialization_script: $ref: '#/components/schemas/ChatRuntimeScriptProperties' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: version: v0.0.29 id: 1 type: NODEJS dependencies: - version: ^0.19.2 name: axios defaultDependency: true - version: ^0.2.0 name: axios-token-interceptor defaultDependency: true - version: 1.0.1 name: chatkitty-platform-sdk defaultDependency: true - version: 6.9.4 name: qs defaultDependency: true - version: ^9.8.2 name: firebase defaultDependency: false initializationScript: script: var foo = 8; environmentVariables: CHATKITTY_CLIENT_SECRET: 34e65736-70c2-4d30-b80a-8ad9887c860b CHATKITTY_CLIENT_ID: 19b458d0-2b50-491c-8f13-65ec12f3978e CHATKITTY_CHAT_SERVICE_BASE_URL: https://api.chatkitty.com CHATKITTY_APPLICATION_ID: '1' CHATKITTY_AUTHORIZATION_SERVICE_BASE_URL: https://authorization.chatkitty.com _links: self: href: https://api.chatkitty.com/v1/applications/1/runtimes/nodejs dependencies: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/dependencies initializationScript: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/initialization-script functions: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/functions application: href: https://api.chatkitty.com/v1/applications/1 ApplicationSettingsProperties: required: - guest_users - user_created_channels type: object properties: guest_users: description: Toggle state of this settings option type: string enum: - DISABLED - ENABLED user_created_channels: description: Toggle state of this settings option type: string enum: - DISABLED - ENABLED ApplicationSettingsResource: required: - guest_users - user_created_channels type: object properties: guest_users: description: Toggle state of this settings option type: string enum: - DISABLED - ENABLED user_created_channels: description: Toggle state of this settings option type: string enum: - DISABLED - ENABLED _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: features: guest_users: ENABLED user_created_channels: DISABLED CreateExternalFileProperties: required: - content_type - name - size - url type: object properties: content_type: description: File MIME content type type: string name: description: File name type: string size: description: File size in bytes type: integer format: int64 url: description: External file URL type: string example: url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 CreatePersonChatUserResource: required: - display_name - is_guest - name type: object properties: display_name: description: Human readable name of this user. Shown to other users type: string is_guest: description: True if this user was created by a guest user session type: boolean name: description: >- The unique name used to identify this user across ChatKitty. Also known as username type: string properties: description: Custom data associated with this user type: object additionalProperties: description: Custom data associated with this user type: object example: name: jane@chatkitty.com displayName: Jane Doe isGuest: false properties: favoriteNumber: 42 ChannelMessageMentionProperties: description: A channel mention required: - channel - end_position - start_position - tag - type type: object allOf: - $ref: '#/components/schemas/MessageMentionProperties' - type: object properties: channel: $ref: '#/components/schemas/MessageMentionChannelProperties' ChatUserMessageMentionProperties: description: A user mention required: - end_position - start_position - tag - type - user type: object allOf: - $ref: '#/components/schemas/MessageMentionProperties' - type: object properties: user: $ref: '#/components/schemas/ChatUserProperties' EmojiProperties: description: The emoji these users reacted with required: - aliases - character - description - tags type: object properties: tags: description: Tags used to describe this emoji uniqueItems: true type: array items: description: Tags used to describe this emoji type: string description: description: Description of this emoji type: string aliases: description: List of possible aliases for this emoji uniqueItems: true type: array items: description: List of possible aliases for this emoji type: string character: description: The unicode character of this emoji type: string FileChatUserMessageProperties: description: A file message sent by or behalf of a user required: - channel_id - created_time - file - id - nested_level - properties - type - user type: object allOf: - $ref: '#/components/schemas/FileMessageProperties' - type: object properties: user: $ref: '#/components/schemas/ChatUserProperties' - $ref: '#/components/schemas/MessageProperties' FileChatUserMessageResource: required: - channel_id - created_time - file - id - nested_level - properties - type - user type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time file: $ref: '#/components/schemas/FileProperties' group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 user: $ref: '#/components/schemas/ChatUserProperties' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 44904 type: FILE channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} file: url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44904 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 FileMessageProperties: required: - channel_id - created_time - file - id - nested_level - properties - type type: object allOf: - $ref: '#/components/schemas/MessageProperties' - type: object properties: file: $ref: '#/components/schemas/FileProperties' FileProperties: description: The file data of this message required: - content_type - name - size - type - url type: object properties: type: description: The type of this file. Either external or hosted by ChatKitty type: string enum: - HOSTED - EXTERNAL content_type: description: The mime type of this file type: string name: description: The file name type: string size: description: The size of this file in bytes type: integer format: int64 url: description: The file URL type: string FileSystemMessageProperties: description: >- A file message sent by this application itself. Used for systems announcements independent of any user required: - channel_id - created_time - file - id - nested_level - properties - type type: object allOf: - $ref: '#/components/schemas/FileMessageProperties' - $ref: '#/components/schemas/MessageProperties' FileSystemMessageResource: required: - channel_id - created_time - file - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time file: $ref: '#/components/schemas/FileProperties' group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 44905 type: SYSTEM_FILE channelId: 702 file: url: https://example.com/files/my-application-file.png name: file.png contentType: image/png size: 32768 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44905 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 MessageLinkPreviewImageProperties: description: Image data of this link preview required: - source type: object properties: source: description: The url source of this image type: string MessageLinkPreviewProperties: description: Embedded link preview data required: - image - title - url type: object properties: title: description: The title of this link type: string description: description: Description of this link preview type: string image: $ref: '#/components/schemas/MessageLinkPreviewImageProperties' site_name: description: The name of the site linked type: string url: description: The URL of the link being previewed type: string MessageLinkProperties: description: Link previews in this message required: - end_position - source - start_position type: object properties: end_position: description: The ending index of this link within the message type: integer format: int32 preview: $ref: '#/components/schemas/MessageLinkPreviewProperties' source: description: The href of the URL this message link represents type: string start_position: description: The starting index of this link within the message type: integer format: int32 MessageMentionChannelProperties: description: Channel properties embedded in channel mentions required: - created_time - id - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' display_name: description: >- Human readable name of this channel shown to users. Present if this is a group channel type: string name: description: >- The unique name of this channel used to reference the channel. Present if this is a group channel type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object MessageMentionProperties: description: Mentions in this message required: - end_position - start_position - tag - type type: object properties: type: description: The type of this message mention type: string enum: - CHANNEL - USER end_position: description: The ending position of this mention reference inside its message type: integer format: int32 start_position: description: The starting position of this mention reference inside its message type: integer format: int32 tag: description: The literal text referencing the mentioned entity inside the message type: string discriminator: propertyName: type mapping: CHANNEL: '#/components/schemas/ChannelMessageMentionProperties' USER: '#/components/schemas/ChatUserMessageMentionProperties' MessageProperties: required: - channel_id - created_time - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 discriminator: propertyName: type mapping: TEXT: '#/components/schemas/TextChatUserMessageProperties' FILE: '#/components/schemas/FileChatUserMessageProperties' SYSTEM_TEXT: '#/components/schemas/TextSystemMessageProperties' SYSTEM_FILE: '#/components/schemas/FileSystemMessageProperties' MessageReactionsSummaryProperties: description: Reactions to this message required: - count - emoji - users type: object properties: count: description: The number of users that reacted with this emoji type: integer format: int64 emoji: $ref: '#/components/schemas/EmojiProperties' users: description: The users that reacted with this emoji type: array items: $ref: '#/components/schemas/ChatUserProperties' MessageResource: required: - channel_id - created_time - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 discriminator: propertyName: type mapping: TEXT: '#/components/schemas/TextChatUserMessageResource' FILE: '#/components/schemas/FileChatUserMessageResource' SYSTEM_TEXT: '#/components/schemas/TextSystemMessageResource' SYSTEM_FILE: '#/components/schemas/FileSystemMessageResource' oneOf: - $ref: '#/components/schemas/TextChatUserMessageResource' - $ref: '#/components/schemas/FileChatUserMessageResource' - $ref: '#/components/schemas/TextSystemMessageResource' - $ref: '#/components/schemas/FileSystemMessageResource' TextChatUserMessageProperties: description: A text message sent by or behalf of a user required: - body - channel_id - created_time - id - nested_level - properties - type - user type: object allOf: - $ref: '#/components/schemas/TextMessageProperties' - type: object properties: user: $ref: '#/components/schemas/ChatUserProperties' - $ref: '#/components/schemas/MessageProperties' TextChatUserMessageResource: required: - body - channel_id - created_time - id - nested_level - properties - type - user type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 body: description: The text body of this message type: string channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time links: description: Link previews in this message type: array items: $ref: '#/components/schemas/MessageLinkProperties' mentions: description: Mentions in this message type: array items: $ref: '#/components/schemas/MessageMentionProperties' nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 user: $ref: '#/components/schemas/ChatUserProperties' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 TextMessageProperties: required: - body - channel_id - created_time - id - nested_level - properties - type type: object allOf: - $ref: '#/components/schemas/MessageProperties' - type: object properties: body: description: The text body of this message type: string links: description: Link previews in this message type: array items: $ref: '#/components/schemas/MessageLinkProperties' mentions: description: Mentions in this message type: array items: $ref: '#/components/schemas/MessageMentionProperties' TextSystemMessageProperties: description: >- A text message sent by this application itself. Used for systems announcements independent of any user required: - body - channel_id - created_time - id - nested_level - properties - type type: object allOf: - $ref: '#/components/schemas/TextMessageProperties' - $ref: '#/components/schemas/MessageProperties' TextSystemMessageResource: required: - body - channel_id - created_time - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 body: description: The text body of this message type: string channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time links: description: Link previews in this message type: array items: $ref: '#/components/schemas/MessageLinkProperties' mentions: description: Mentions in this message type: array items: $ref: '#/components/schemas/MessageMentionProperties' nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 44903 type: SYSTEM_TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: This is a system announcement. Keep calm and carry on. properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44903 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 ChatUserIdReference: description: Reference to a user by ID required: - id type: object allOf: - $ref: '#/components/schemas/ChatUserReference' - type: object properties: id: description: 'User ID associated with this user ' type: integer format: int64 ChatUserReference: description: Reference to a user type: object example: username: jane@chatkitty.com properties: username: type: string example: jane@chatkitty.com ChatUserUsernameReference: description: Reference to a user by username required: - username type: object allOf: - $ref: '#/components/schemas/ChatUserReference' - type: object properties: username: description: Username associated with this user type: string CreateFileMessageResource: required: - file type: object example: type: FILE file: url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 allOf: - $ref: '#/components/schemas/CreateMessageResource' - type: object properties: file: $ref: '#/components/schemas/CreateExternalFileProperties' CreateMessageResource: required: - type type: object properties: type: type: string group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object user: $ref: '#/components/schemas/ChatUserReference' discriminator: propertyName: type mapping: TEXT: '#/components/schemas/CreateTextMessageResource' FILE: '#/components/schemas/CreateFileMessageResource' CreateTextMessageResource: required: - body type: object example: type: TEXT body: Hello, World! allOf: - $ref: '#/components/schemas/CreateMessageResource' - type: object properties: body: description: The text body of this message type: string CreateDelegatedReplyThreadKeystrokesResource: required: - keys - user type: object properties: keys: type: string user: $ref: '#/components/schemas/ChatUserReference' ReplyThreadKeystrokesResource: required: - keys - username type: object properties: keys: type: string username: type: string _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' CreateChatFunctionResource: required: - initialize_asynchronously - name - type type: object properties: description: type: string type: type: string initialize_asynchronously: type: boolean name: type: string example: type: user.attempted.start_session name: User Attempted Start Session ChatFunctionChatRuntimeProperties: description: The runtime this function executes on. Always a NodeJS runtime required: - id - type - version type: object properties: version: description: The semantic version of this runtime type: string type: description: The type of this runtime. Always NODEJS type: string enum: - NODEJS id: description: 64-bit integer identifier associated with this resource type: integer format: int64 ChatFunctionResource: required: - current_version_number - enabled - id - name - runtime - type type: object properties: description: description: Optional description of this function type: string type: description: The type of this function type: string id: description: 64-bit integer identifier associated with this resource type: integer format: int64 current_version_number: description: >- The current version number of this function. Incremented every time a new version is deployed type: integer format: int64 enabled: description: True if this function is enabled type: boolean name: description: The name of this function type: string runtime: $ref: '#/components/schemas/ChatFunctionChatRuntimeProperties' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 1 type: user.attempted.start_session runtime: version: v0.0.29 id: 1 type: NODEJS name: User Attempted Start Session enabled: true currentVersionNumber: 34 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/1 versions: href: https://api.chatkitty.com/v1/applications/1/functions/1/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/current-version application: href: https://api.chatkitty.com/v1/applications/1 ApplicationJobResource: required: - created_time - id - state - type type: object properties: type: description: The type of application job type: string enum: - CHANNEL_IMPORT - CHANNEL_MEMBERS_IMPORT - MESSAGE_IMPORT - USER_IMPORT - MESSAGE_ANALYTICS_EXPORT id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: type: string format: date-time ended_time: type: string format: date-time file: type: string state: description: The running state of an application job type: string enum: - PENDING - RUNNING - FINISHED - FAILED _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 53 type: CHANNEL_IMPORT state: PENDING createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 CreateChatFunctionVersionResource: required: - handler_script type: object properties: handler_script: description: JavaScript/TypeScript code that runs when this function is executed type: string example: handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello ' + event.username); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } ChatFunctionVersionResource: required: - handler_script - id - version_number type: object properties: id: description: 64-bit integer identifier associated with this resource type: integer format: int64 handler_script: description: JavaScript/TypeScript code that runs when this function is executed type: string version_number: description: >- The version number of this function version. Incremented from the previous version type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 13515 versionNumber: 34 handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello ' + event.username); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/13515 application: href: https://api.chatkitty.com/v1/applications/1 ChannelProperties: required: - created_time - id - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' last_received_message: $ref: '#/components/schemas/MessageProperties' properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object discriminator: propertyName: type mapping: PUBLIC: '#/components/schemas/PublicChannelProperties' PRIVATE: '#/components/schemas/PrivateChannelProperties' DIRECT: '#/components/schemas/DirectChannelProperties' ChannelResource: required: - created_time - id - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' last_received_message: $ref: '#/components/schemas/MessageProperties' properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 55913 type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 displayName: Our public channel properties: {} createdTime: '2021-09-28T01:35:40.967Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55913 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/55913/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/55913/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/moderators application: href: https://api.chatkitty.com/v1/applications/1 discriminator: propertyName: type mapping: PUBLIC: '#/components/schemas/PublicChannelResource' PRIVATE: '#/components/schemas/PrivateChannelResource' DIRECT: '#/components/schemas/DirectChannelResource' oneOf: - $ref: '#/components/schemas/PublicChannelResource' - $ref: '#/components/schemas/PrivateChannelResource' - $ref: '#/components/schemas/DirectChannelResource' DirectChannelProperties: description: A direct channel required: - created_time - id - members - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' last_received_message: $ref: '#/components/schemas/MessageProperties' members: description: >- The members of this channel. Present if this is a direct channel. For other channel types, use [**list channel messages**](https://chatkitty.com/docs/api/reference#tag/channels/operation/list-channel-messages) type: array items: $ref: '#/components/schemas/ChatUserProperties' properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object DirectChannelResource: required: - created_time - id - members - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' last_received_message: $ref: '#/components/schemas/MessageProperties' members: description: >- The members of this channel. Present if this is a direct channel. For other channel types, use [**list channel messages**](https://chatkitty.com/docs/api/reference#tag/channels/operation/list-channel-messages) type: array items: $ref: '#/components/schemas/ChatUserProperties' properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 19354 type: DIRECT creator: id: 20953 type: PERSON name: jake@giftata.com displayName: Jake displayPictureUrl: https://api.chatkitty.com/v1/picture/Jake presence: status: UNAVAILABLE online: false properties: {} members: - id: 2 type: PERSON name: aaron displayName: aaron displayPictureUrl: https://api.chatkitty.com/v1/picture/aaron isGuest: true presence: status: UNAVAILABLE online: false properties: {} - id: 20953 type: PERSON name: jake@giftata.com displayName: Jake displayPictureUrl: https://api.chatkitty.com/v1/picture/Jake presence: status: UNAVAILABLE online: false properties: {} properties: {} createdTime: '2021-05-18T20:40:29.472Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/19354 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/19354/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/19354/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/19354/events application: href: https://api.chatkitty.com/v1/applications/1 PrivateChannelProperties: description: A private channel required: - created_time - display_name - id - name - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' display_name: description: Human readable name of this channel shown to users type: string last_received_message: $ref: '#/components/schemas/MessageProperties' name: description: The unique name of this channel used to reference the channel type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object PrivateChannelResource: required: - created_time - display_name - id - name - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' display_name: description: Human readable name of this channel shown to users type: string last_received_message: $ref: '#/components/schemas/MessageProperties' name: description: The unique name of this channel used to reference the channel type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 55914 type: PRIVATE name: a3e9118e-4c60-4a87-a19f-cb8bf5351462 displayName: Our private channel properties: {} createdTime: '2021-09-28T01:45:20.542Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55914 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/55914/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/55914/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/moderators application: href: https://api.chatkitty.com/v1/applications/1 PublicChannelProperties: description: A public channel required: - created_time - display_name - id - name - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' display_name: description: Human readable name of this channel shown to users type: string last_received_message: $ref: '#/components/schemas/MessageProperties' name: description: The unique name of this channel used to reference the channel type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object PublicChannelResource: required: - created_time - display_name - id - name - properties - type type: object properties: type: description: The type of this channel type: string enum: - DIRECT - PUBLIC - PRIVATE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this channel was created type: string format: date-time creator: $ref: '#/components/schemas/ChatUserProperties' display_name: description: Human readable name of this channel shown to users type: string last_received_message: $ref: '#/components/schemas/MessageProperties' name: description: The unique name of this channel used to reference the channel type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 55913 type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 displayName: Our public channel properties: {} createdTime: '2021-09-28T01:35:40.967Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55913 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/55913/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/55913/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/moderators application: href: https://api.chatkitty.com/v1/applications/1 CreateChannelInviteResource: required: - user type: object properties: user: $ref: '#/components/schemas/ChatUserReference' example: user: username: jane@chatkitty.com ChannelInviteResource: required: - created_time type: object properties: created_time: description: The time this invite was created type: string format: date-time _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: createdTime: '2022-06-02T16:51:03.206366286Z' _links: invitee: href: https://api.chatkitty.com/v1/applications/1/users/1054 channel: href: https://api.chatkitty.com/v1/applications/1/channels/67026 application: href: https://api.chatkitty.com/v1/applications/1 CreateChannelGenericEventResource: required: - properties - type type: object properties: type: description: Custom type of this event type: string properties: description: Custom data associated with this event type: object additionalProperties: description: Custom data associated with this event type: object example: type: My Custom Event properties: payload: Boom! stuff: favoriteNumber: 42 favoriteMovie: Lilo and Stitch ChannelGenericEventResource: required: - properties - type type: object properties: type: description: Custom type of this event type: string properties: description: Custom data associated with this event type: object additionalProperties: description: Custom data associated with this event type: object user: $ref: '#/components/schemas/ChatUserProperties' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: type: My Custom Event properties: payload: Boom! stuff: favoriteNumber: 42 favoriteMovie: Lilo and Stitch _links: application: href: https://api.chatkitty.com/v1/applications/1 CreateChannelResource: required: - type type: object properties: type: type: string creator: $ref: '#/components/schemas/ChatUserReference' members: description: List of user references of members of this channel uniqueItems: true type: array items: $ref: '#/components/schemas/ChatUserReference' properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object discriminator: propertyName: type mapping: PUBLIC: '#/components/schemas/CreatePublicChannelResource' PRIVATE: '#/components/schemas/CreatePrivateChannelResource' DIRECT: '#/components/schemas/CreateDirectChannelResource' CreateGroupChannelResource: type: object allOf: - $ref: '#/components/schemas/CreateChannelResource' - type: object properties: name: description: >- The unique name of this channel used to reference the channel. If absent defaults to a random UUID type: string display_name: description: >- Human readable name of this channel shown to users. If absent defaults to the channel name type: string CreatePrivateChannelResource: description: Creates a private channel type: object example: type: PRIVATE name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 allOf: - $ref: '#/components/schemas/CreateGroupChannelResource' - $ref: '#/components/schemas/CreateChannelResource' CreatePublicChannelResource: description: Creates a public channel type: object example: type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 allOf: - $ref: '#/components/schemas/CreateGroupChannelResource' - $ref: '#/components/schemas/CreateChannelResource' JsonMergePatch: type: object ApplicationSentSystemMessageNotificationData: description: Sent when a system message is sent required: - channel_id - message - type type: object properties: type: type: string channel_id: description: >- The ID channel the message was sent. Deprecated: Use the channel property of this notification type: integer format: int64 deprecated: true message: $ref: '#/components/schemas/SystemMessageResource' ChatUserMentionedChannelNotificationData: description: Sent when a user mentions a channel in a message required: - channel_id - mentioned_channel - message - type type: object properties: type: type: string channel_id: description: >- The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification type: integer format: int64 deprecated: true mentioned_channel: $ref: '#/components/schemas/ChannelResource' message: $ref: '#/components/schemas/TextMessageResource' ChatUserMentionedChatUserNotificationData: description: Sent when a user mentions a user in a message required: - channel_id - mentioned_user - message - type type: object properties: type: type: string channel_id: description: >- The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification type: integer format: int64 deprecated: true mentioned_user: $ref: '#/components/schemas/ChatUserResource' message: $ref: '#/components/schemas/TextMessageResource' ChatUserMessageResource: description: The message that was sent required: - channel_id - created_time - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' discriminator: propertyName: type mapping: TEXT: '#/components/schemas/TextChatUserMessageResource' FILE: '#/components/schemas/FileChatUserMessageResource' oneOf: - $ref: '#/components/schemas/TextChatUserMessageResource' - $ref: '#/components/schemas/FileChatUserMessageResource' ChatUserRepliedToChatUserMessageNotificationData: description: Sent when a user replies to a message required: - channel_id - message - parent - type type: object properties: type: type: string channel_id: description: >- The ID of channel the reply message was sent. Deprecated: Use the channel property of this notification type: integer format: int64 deprecated: true message: $ref: '#/components/schemas/MessageResource' parent: $ref: '#/components/schemas/MessageResource' ChatUserSentChatUserMessageNotificationData: description: Sent when a user sends a message required: - channel_id - message - type type: object properties: type: type: string channel_id: description: >- The ID channel the message was sent. Deprecated: Use the channel property of this notification type: integer format: int64 deprecated: true message: $ref: '#/components/schemas/ChatUserMessageResource' CursorPageMetadata: required: - size type: object properties: next: type: string size: type: integer format: int64 start: type: string CursorPagedModelNotificationResource: required: - page type: object properties: _embedded: type: object properties: notifications: type: array items: $ref: '#/components/schemas/NotificationResource' page: $ref: '#/components/schemas/CursorPageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: notifications: - title: System message sent id: 3256308 body: File attachment channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/85103 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: SYSTEM:SENT:MESSAGE _relays: message: /application/v1/messages/85103.relay createdTime: '2022-06-02T16:36:54.356152Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: System message sent id: 3255805 body: Hello, World! channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 85216 type: SYSTEM_TEXT channelId: 702 body: Hello, World! properties: {} createdTime: '2022-06-02T16:34:58.871950Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/85216 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: SYSTEM:SENT:MESSAGE _relays: message: /application/v1/messages/85216.relay createdTime: '2022-06-02T16:35:14.296158Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: hey sent a message id: 1750641 body: 🌞 channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T16:45:33.696Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: USER:SENT:MESSAGE _relays: message: /application/v1/messages/44902.relay createdTime: '2021-09-16T16:45:48.351Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: ho sent a message id: 1749995 body: ok channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 44759 type: TEXT channelId: 702 user: id: 39841 type: PERSON name: ho@mailinator.com displayName: ho displayPictureUrl: https://api.chatkitty.com/v1/picture/ho presence: status: UNAVAILABLE online: false properties: {} body: ok properties: {} createdTime: '2021-09-16T05:13:48.030Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/44759 user: href: https://api.chatkitty.com/v1/applications/1/users/39841 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: USER:SENT:MESSAGE _relays: message: /application/v1/messages/44759.relay createdTime: '2021-09-16T05:14:00.993Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: Nisar sent a message id: 1749225 body: hi channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 44559 type: TEXT channelId: 702 user: id: 39827 type: PERSON name: ss@dd.com displayName: Nisar displayPictureUrl: https://api.chatkitty.com/v1/picture/Nisar presence: status: UNAVAILABLE online: false properties: {} body: hi properties: {} createdTime: '2021-09-14T20:13:37.357Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/44559 user: href: https://api.chatkitty.com/v1/applications/1/users/39827 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: USER:SENT:MESSAGE _relays: message: /application/v1/messages/44559.relay createdTime: '2021-09-14T20:13:49.998Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=SELF next: href: >- https://api.chatkitty.com/v1/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=NEXT page: size: 5 NotificationData: description: Additional context data of this notification required: - type type: object properties: type: description: >- The type of notification that was received. This specifies the schema of the notification data type: string discriminator: propertyName: type mapping: SYSTEM:SENT:MESSAGE: '#/components/schemas/ApplicationSentSystemMessageNotificationData' USER:MENTIONED:CHANNEL: '#/components/schemas/ChatUserMentionedChannelNotificationData' USER:MENTIONED:USER: '#/components/schemas/ChatUserMentionedChatUserNotificationData' USER:REPLIED_TO:MESSAGE: >- #/components/schemas/ChatUserRepliedToChatUserMessageNotificationData USER:SENT:MESSAGE: '#/components/schemas/ChatUserSentChatUserMessageNotificationData' NotificationResource: required: - body - created_time - data - id - muted - title type: object properties: title: description: The title of this notification type: string id: description: 64-bit integer identifier associated with this resource type: integer format: int64 body: description: The text body of this notification type: string channel: $ref: '#/components/schemas/ChannelProperties' created_time: description: Time this notification was created type: string format: date-time data: $ref: '#/components/schemas/NotificationData' muted: description: True if this notification should be muted type: boolean read_time: description: Time this notification was read type: string format: date-time _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: title: System message sent id: 3256308 body: File attachment channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/85103 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: SYSTEM:SENT:MESSAGE _relays: message: /application/v1/messages/85103.relay createdTime: '2022-06-02T16:36:54.356152Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 SystemMessageResource: description: The message that was sent required: - channel_id - created_time - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' discriminator: propertyName: type mapping: SYSTEM_TEXT: '#/components/schemas/TextSystemMessageResource' SYSTEM_FILE: '#/components/schemas/FileSystemMessageResource' oneOf: - $ref: '#/components/schemas/TextSystemMessageResource' - $ref: '#/components/schemas/FileSystemMessageResource' TextMessageResource: description: The message in which the user was mentioned required: - channel_id - created_time - id - nested_level - properties - type type: object properties: type: description: The type of this message type: string enum: - TEXT - FILE - SYSTEM_TEXT - SYSTEM_FILE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 channel_id: description: The ID of the channel this message belongs to type: integer format: int64 created_time: description: The time this message was created type: string format: date-time group_tag: description: >- Optional string to associate this message with other messages. Can be used to group messages into a gallery type: string last_edited_time: description: The time this message was last edited type: string format: date-time nested_level: description: The nested thread level of this message type: integer format: int32 properties: description: Custom data associated with this message type: object additionalProperties: description: Custom data associated with this message type: object reactions: description: Reactions to this message type: array items: $ref: '#/components/schemas/MessageReactionsSummaryProperties' replies_count: description: The number of replies to this message type: integer format: int64 report_count: description: The number of times this message has been reported type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' discriminator: propertyName: type mapping: TEXT: '#/components/schemas/TextChatUserMessageResource' SYSTEM_TEXT: '#/components/schemas/TextSystemMessageResource' oneOf: - $ref: '#/components/schemas/TextChatUserMessageResource' - $ref: '#/components/schemas/TextSystemMessageResource' CursorPagedModelMessageResource: required: - page type: object properties: _embedded: type: object properties: messages: type: array items: $ref: '#/components/schemas/MessageResource' page: $ref: '#/components/schemas/CursorPageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: messages: - id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44701 type: TEXT channelId: 802 user: id: 39906 type: PERSON name: sean.donald@gmail.com displayName: zolo displayPictureUrl: https://api.chatkitty.com/v1/picture/zolo presence: status: UNAVAILABLE online: false properties: {} body: test properties: {} createdTime: '2021-09-16T14:57:55.903Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44701 user: href: https://api.chatkitty.com/v1/applications/1/users/39906 channel: href: https://api.chatkitty.com/v1/applications/1/channels/802 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44700 type: TEXT channelId: 802 user: id: 39906 type: PERSON name: sean.donald@gmail.com displayName: zolo displayPictureUrl: https://api.chatkitty.com/v1/picture/zolo presence: status: UNAVAILABLE online: false properties: {} body: hi properties: {} createdTime: '2021-09-16T14:57:46.056Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44700 user: href: https://api.chatkitty.com/v1/applications/1/users/39906 channel: href: https://api.chatkitty.com/v1/applications/1/channels/802 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44760 type: TEXT channelId: 1255 user: id: 39841 type: PERSON name: ho@mailinator.com displayName: ho displayPictureUrl: https://api.chatkitty.com/v1/picture/ho presence: status: UNAVAILABLE online: false properties: {} body: do? properties: {} createdTime: '2021-09-16T09:14:09.585Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44760 user: href: https://api.chatkitty.com/v1/applications/1/users/39841 channel: href: https://api.chatkitty.com/v1/applications/1/channels/1255 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44759 type: TEXT channelId: 702 user: id: 39841 type: PERSON name: ho@mailinator.com displayName: ho displayPictureUrl: https://api.chatkitty.com/v1/picture/ho presence: status: UNAVAILABLE online: false properties: {} body: ok properties: {} createdTime: '2021-09-16T09:13:48.030Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44759 user: href: https://api.chatkitty.com/v1/applications/1/users/39841 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages?start=333582423138781125&next=327180758840001251&size=5&relation=SELF next: href: >- https://api.chatkitty.com/v1/applications/1/messages?start=333582423138781125&next=327180758840001251&size=5&relation=NEXT page: size: 5 PageMetadata: type: object properties: number: type: integer format: int64 size: type: integer format: int64 total_elements: type: integer format: int64 total_pages: type: integer format: int64 PagedModelChannelResource: type: object properties: _embedded: type: object properties: channels: type: array items: $ref: '#/components/schemas/ChannelResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: channels: - id: 15252 type: DIRECT creator: id: 19652 type: PERSON name: rexyfexy@gmail.com displayName: doark displayPictureUrl: https://api.chatkitty.com/v1/picture/doark presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} members: - id: 19652 type: PERSON name: rexyfexy@gmail.com displayName: doark displayPictureUrl: https://api.chatkitty.com/v1/picture/doark presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} - id: 19452 type: PERSON name: aa displayName: emra displayPictureUrl: https://api.chatkitty.com/v1/picture/emra presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} properties: {} createdTime: '2021-05-05T00:38:24.888Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/15252 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/15252/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/15252/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/15252/events application: href: https://api.chatkitty.com/v1/applications/1 - id: 55913 type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 displayName: Our public channel properties: {} createdTime: '2021-09-28T01:35:40.967Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55913 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/moderators application: href: https://api.chatkitty.com/v1/applications/1 - id: 2402 type: PUBLIC name: '#test' displayName: Test Channel creator: id: 4153 type: PERSON name: test@mail.com displayName: mridx displayPictureUrl: https://api.chatkitty.com/v1/picture/mridx presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} properties: {} createdTime: '2020-12-13T21:12:09.195Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/2402 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/moderators application: href: https://api.chatkitty.com/v1/applications/1 - id: 856 type: PUBLIC name: mkm displayName: Meme Channel creator: id: 1504 type: PERSON name: njnj@vghf.jk displayName: mkm displayPictureUrl: https://api.chatkitty.com/v1/picture/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 displayPictureUrl: https://api.chatkitty.com/v1/picture/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: self: href: https://api.chatkitty.com/v1/applications/1/channels/856 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/moderators application: href: https://api.chatkitty.com/v1/applications/1 - id: 1302 type: PUBLIC name: SONU KUMAR displayName: SONU KUMAR creator: id: 2302 type: PERSON name: '852122' displayName: SONU KUMAR displayPictureUrl: https://api.chatkitty.com/v1/picture/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 displayPictureUrl: https://api.chatkitty.com/v1/picture/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: self: href: https://api.chatkitty.com/v1/applications/1/channels/1302 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/moderators application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: https://api.chatkitty.com/v1/applications/1/channels?page=0&size=5 self: href: https://api.chatkitty.com/v1/applications/1/channels?page=0&size=5 next: href: https://api.chatkitty.com/v1/applications/1/channels?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/channels?page=403&size=5 page: size: 5 totalElements: 2020 totalPages: 404 number: 0 PagedModelChatUserResource: type: object properties: _embedded: type: object properties: users: type: array items: $ref: '#/components/schemas/ChatUserResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: users: - id: 14503 type: PERSON name: jane@chatkitty.com displayName: Jane displayPictureUrl: https://api.chatkitty.com/v1/picture/Jane presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/14503 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/14503/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/14503/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/14503/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 3004 type: PERSON name: '1' displayName: ChatKittyUser displayPictureUrl: https://api.chatkitty.com/v1/picture/ChatKittyUser isGuest: true presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/3004 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/3004/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/3004/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/3004/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 6152 type: PERSON name: 10zxc13@gmail.com displayName: Jack displayPictureUrl: https://api.chatkitty.com/v1/picture/Jack presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/6152 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/6152/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/6152/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/6152/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 3353 type: PERSON name: '12121' displayName: '12121' displayPictureUrl: https://api.chatkitty.com/v1/picture/12121 isGuest: true presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/3353 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/3353/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/3353/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/3353/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 6602 type: PERSON name: '123' displayName: '123' displayPictureUrl: https://api.chatkitty.com/v1/picture/123 presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/6602 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/6602/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/6602/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/6602/display-picture application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: https://api.chatkitty.com/v1/applications/1/users?page=0&size=5 self: href: https://api.chatkitty.com/v1/applications/1/users?page=0&size=5 next: href: https://api.chatkitty.com/v1/applications/1/users?page=1&size=5 last: href: https://api.chatkitty.com/v1/applications/1/users?page=114&size=5 page: size: 5 totalElements: 571 totalPages: 115 number: 0 ChatUserSessionProperties: required: - created_time - id - state - user type: object properties: id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: Time this session was created type: string format: date-time end_time: description: Time this session ended. Present if state is ENDED type: string format: date-time state: description: State of this session. ACTIVE or ENDED type: string enum: - ACTIVE - ENDED user: $ref: '#/components/schemas/ChatUserProperties' user_agent: description: User agent used to start this session type: string ChatUserSessionResource: required: - created_time - id - state - user type: object properties: id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: Time this session was created type: string format: date-time end_time: description: Time this session ended. Present if state is ENDED type: string format: date-time state: description: State of this session. ACTIVE or ENDED type: string enum: - ACTIVE - ENDED user: $ref: '#/components/schemas/ChatUserProperties' user_agent: description: User agent used to start this session type: string _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 635627 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:25:27.253Z' createdTime: '2021-11-12T08:02:34.122Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 PagedModelChatUserSessionResource: type: object properties: _embedded: type: object properties: sessions: type: array items: $ref: '#/components/schemas/ChatUserSessionResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: sessions: - id: 635627 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:25:27.253Z' createdTime: '2021-11-12T08:02:34.122Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635641 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:35:08.587Z' createdTime: '2021-11-12T08:25:33.885Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635669 user: id: 39806 type: PERSON name: c6f75947-af48-4893-a78e-0e0b9bd68580 displayName: Julie Jaxton displayPictureUrl: https://api.chatkitty.com/v1/picture/Julie+Jaxton isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:55:36.282Z' createdTime: '2021-11-12T08:38:54.982Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39806 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635644 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:54:48.309Z' createdTime: '2021-11-12T08:45:13.682Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635651 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T09:06:40.409Z' createdTime: '2021-11-12T09:04:53.490Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 _links: first: href: https://api.chatkitty.com/v1/user-sessions?page=0&size=5 self: href: https://api.chatkitty.com/v1/user-sessions?page=0&size=5 next: href: https://api.chatkitty.com/v1/user-sessions?page=1&size=5 last: href: https://api.chatkitty.com/v1/user-sessions?page=328&size=5 page: size: 5 totalElements: 1645 totalPages: 329 number: 0 ReplyThreadResource: required: - created_time - id - properties - type type: object properties: type: description: The type of this thread type: string enum: - MAIN - STANDALONE - MESSAGE id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: The ISO date-time this thread was created type: string format: date-time name: description: The name of this thread type: string properties: description: Custom data associated with this thread type: object additionalProperties: description: Custom data associated with this thread type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 67528 type: MAIN properties: {} createdTime: '2022-02-04T13:19:06.764939Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/threads/67528 channel: href: https://api.chatkitty.com/v1/applications/1/channels/67026 application: href: https://api.chatkitty.com/v1/applications/1 PagedModelChatFunctionResource: type: object properties: _embedded: type: object properties: functions: type: array items: $ref: '#/components/schemas/ChatFunctionResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: functions: - id: 202 type: user.received.notification runtime: version: v0.0.29 id: 1 type: NODEJS name: User Received Notification enabled: true currentVersionNumber: 5 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/202 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/202/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/202/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/202/current-version application: href: https://api.chatkitty.com/v1/applications/1 - id: 4552 type: user.sent.message runtime: version: v0.0.29 id: 1 type: NODEJS name: User Sent Message enabled: false currentVersionNumber: 0 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/4552 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/4552/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/4552/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/4552/current-version application: href: https://api.chatkitty.com/v1/applications/1 - id: 6152 type: user.started.chat_session runtime: version: v0.0.29 id: 1 type: NODEJS name: User Started Chat Session enabled: false currentVersionNumber: 0 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/6152 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/6152/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/6152/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/6152/current-version application: href: https://api.chatkitty.com/v1/applications/1 - id: 1 type: user.attempted.start_session runtime: version: v0.0.29 id: 1 type: NODEJS name: User Attempted Start Session enabled: true currentVersionNumber: 34 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/1 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/current-version application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/functions?page=0&size=5 page: size: 5 totalElements: 4 totalPages: 1 number: 0 MessageReadReceiptResource: required: - created_time - user type: object properties: created_time: description: Time the user read this message type: string format: date-time user: $ref: '#/components/schemas/ChatUserProperties' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: user: id: 1 type: PERSON name: jane@chatkitty.com displayName: Jane Doe displayPictureUrl: https://api.chatkitty.com/v1/picture/jane presence: status: UNAVAILABLE online: false properties: {} createdTime: '2022-06-02T16:51:03.206366286Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/1 message: href: https://api.chatkitty.com/v1/applications/1/messages/67026 application: href: https://api.chatkitty.com/v1/applications/1 PagedModelMessageReadReceiptResource: type: object properties: _embedded: type: object properties: receipts: type: array items: $ref: '#/components/schemas/MessageReadReceiptResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: receipts: - user: id: 1 type: PERSON name: jane@chatkitty.com displayName: Jane Doe displayPictureUrl: https://api.chatkitty.com/v1/picture/jane presence: status: UNAVAILABLE online: false properties: {} createdTime: '2022-06-02T16:51:03.206366286Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/1 message: href: https://api.chatkitty.com/v1/applications/1/messages/67026 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/67026/read-receipts?page=0&size=25 page: size: 1 totalElements: 1 totalPages: 1 number: 0 PagedModelApplicationJobResource: type: object properties: _embedded: type: object properties: jobs: type: array items: $ref: '#/components/schemas/ApplicationJobResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: jobs: - id: 1 type: CHANNEL_IMPORT state: FAILED createdTime: '2021-09-28T04:19:41.255Z' endedTime: '2021-09-28T04:19:42.230Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/1 application: href: https://api.chatkitty.com/v1/applications/1 - id: 52 type: CHANNEL_IMPORT state: FAILED createdTime: '2021-09-28T05:30:08.902Z' endedTime: '2021-09-28T05:30:09.571Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/52 application: href: https://api.chatkitty.com/v1/applications/1 - id: 53 type: CHANNEL_IMPORT state: FINISHED createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 - id: 54 type: CHANNEL_IMPORT state: FINISHED createdTime: '2021-09-28T05:35:35.075Z' endedTime: '2021-09-28T05:36:15.755Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/54 application: href: https://api.chatkitty.com/v1/applications/1 - id: 102 type: CHANNEL_MEMBERS_IMPORT state: FINISHED createdTime: '2021-09-29T04:52:22.895Z' endedTime: '2021-09-29T04:52:58.941Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/102 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/jobs?running=false&page=0&size=25 page: size: 25 totalElements: 5 totalPages: 1 number: 0 PagedModelChatFunctionVersionResource: type: object properties: _embedded: type: object properties: versions: type: array items: $ref: '#/components/schemas/ChatFunctionVersionResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: versions: - id: 13515 versionNumber: 34 handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello ' + event.username); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/13515 application: href: https://api.chatkitty.com/v1/applications/1 - id: 13461 versionNumber: 33 handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello!'); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/13461 application: href: https://api.chatkitty.com/v1/applications/1 - id: 4802 versionNumber: 32 handlerScript: >- async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return {payload: true}; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/4802 application: href: https://api.chatkitty.com/v1/applications/1 - id: 4652 versionNumber: 31 handlerScript: >- async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return true; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/4652 application: href: https://api.chatkitty.com/v1/applications/1 - id: 4555 versionNumber: 30 handlerScript: >- async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return { status: "SUCCESS" }; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/4555 application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=0&size=5 self: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=0&size=5 next: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=6&size=5 page: size: 5 totalElements: 35 totalPages: 7 number: 0 ChatFunctionInvocationResource: required: - args - created_time - id - result - status - version_number type: object properties: id: description: 64-bit integer identifier associated with this resource type: integer format: int64 args: description: The function arguments passed into this function for this invocation type: object additionalProperties: description: >- The function arguments passed into this function for this invocation type: object created_time: description: The ISO date-time of this invocation when the function was called type: string format: date-time result: description: The result of this invocation when it completed type: object additionalProperties: description: The result of this invocation when it completed type: object status: description: The running status of this invocation type: string enum: - RUNNING - SUCCEEDED - FAILED version_number: description: >- The version number of this function version when this invocation occured type: integer format: int64 _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' PagedModelChatFunctionInvocationResource: type: object properties: _embedded: type: object properties: invocations: type: array items: $ref: '#/components/schemas/ChatFunctionInvocationResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _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' _links: application: href: https://api.chatkitty.com/v1/applications/1 - id: 468453 versionNumber: 34 args: authParams: displayName: '' username: '' status: SUCCEEDED result: payload: - 'Hello ' - 'Hello ' createdTime: '2021-09-19T09:34:40.190Z' _links: application: href: https://api.chatkitty.com/v1/applications/1 - id: 468452 versionNumber: 34 args: authParams: displayName: '' username: '' status: SUCCEEDED result: payload: - 'Hello ' createdTime: '2021-09-19T09:34:26.890Z' _links: application: href: https://api.chatkitty.com/v1/applications/1 - id: 467243 versionNumber: 34 args: authParams: displayName: '' username: aaron status: SUCCEEDED result: payload: - Hello aaron createdTime: '2021-09-17T17:00:31.396Z' _links: application: href: https://api.chatkitty.com/v1/applications/1 - 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: application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=0&size=5 self: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=0&size=5 next: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=1515&size=5 page: size: 5 totalElements: 7578 totalPages: 1516 number: 0 ChatSessionResource: required: - created_time - id - session - state type: object properties: id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: Time this session was created type: string format: date-time end_time: description: Time this session ended. Present if state is ENDED type: string format: date-time session: $ref: '#/components/schemas/ChatUserSessionProperties' state: description: State of this session. ACTIVE or ENDED type: string enum: - ACTIVE - ENDED _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 1480794 session: id: 544188 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544188 channel: href: https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 PagedModelChatSessionResource: type: object properties: _embedded: type: object properties: sessions: type: array items: $ref: '#/components/schemas/ChatSessionResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: sessions: - id: 1480794 session: id: 544188 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544188 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1480795 session: id: 544188 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544188 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55052 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1480731 session: id: 544216 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544216 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55052 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1481281 session: id: 545001 user: id: 39806 type: PERSON name: c6f75947-af48-4893-a78e-0e0b9bd68580 displayName: Julie Jaxton displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/545001 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1481282 session: id: 545052 user: id: 39807 type: PERSON name: 8fadc920-f3e6-49ff-9398-1e58b3dc44dd displayName: Zaria Bria displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/545052 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 _links: first: href: https://api.chatkitty.com/v1/chat-sessions?page=0&size=5 self: href: https://api.chatkitty.com/v1/chat-sessions?page=0&size=5 next: href: https://api.chatkitty.com/v1/chat-sessions?page=1&size=5 last: href: https://api.chatkitty.com/v1/chat-sessions?page=1037&size=5 page: size: 5 totalElements: 5190 totalPages: 1038 number: 0 PagedModelMessageResource: type: object properties: _embedded: type: object properties: messages: type: array items: $ref: '#/components/schemas/MessageResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' ChannelMembershipResource: required: - created_time type: object properties: created_time: type: string format: date-time _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' PagedModelChannelMembershipResource: type: object properties: _embedded: type: object properties: memberships: type: array items: $ref: '#/components/schemas/ChannelMembershipResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: memberships: - createdTime: '2020-12-02T21:52:33.976Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/2 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/2 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-12-02T22:03:28.742Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/52 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/52 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-11-23T13:03:17.433Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/352 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/352 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-12-07T22:28:47.620Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/403 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/403 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-11-23T14:34:29.580Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/452 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/452 application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=0&size=5 self: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=0&size=5 next: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=107&size=5 page: size: 5 totalElements: 537 totalPages: 108 number: 0 PagedModelChannelInviteResource: type: object properties: _embedded: type: object properties: invites: type: array items: $ref: '#/components/schemas/ChannelInviteResource' page: $ref: '#/components/schemas/PageMetadata' _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: _embedded: invites: - createdTime: '2022-06-02T16:51:03.206366Z' _links: invitee: href: https://api.chatkitty.com/v1/applications/1/users/1054 channel: href: https://api.chatkitty.com/v1/applications/1/channels/67026 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/channels/67026/invites?page=0&size=25 page: size: 25 totalElements: 1 totalPages: 1 number: 0 ApplicationResource: required: - created_time - id - key - properties type: object properties: id: description: 64-bit integer identifier associated with this resource type: integer format: int64 created_time: description: ISO date-time this application was created type: string format: date-time key: description: Primary API key assigned to this application type: string properties: description: Custom properties attached to this application type: object additionalProperties: description: Custom properties attached to this application type: object _links: description: Hypermedia control links for this resource type: array items: $ref: '#/components/schemas/Link' example: id: 1 key: 19b458d0-2b50-491c-8f13-65ec12f3978e properties: {} created_time: '2020-10-02T20:29:25.316Z' _links: self: href: https://api.chatkitty.com/v1/applications/1 Links: type: object additionalProperties: $ref: '#/components/schemas/Link' MessageImport: required: - channel_id - type type: object properties: type: type: string channel_id: description: ID of the channel this message belongs to type: integer format: int64 group_tag: description: Tag identifying the message group this message belongs to type: string idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string properties: description: Map of custom data attached to this message type: object additionalProperties: description: Map of custom data attached to this message type: object example: idempotencyKey: unique-external-id type: TEXT body: Hello, World! discriminator: propertyName: type mapping: SYSTEM_TEXT: '#/components/schemas/TextSystemMessageImport' TEXT: '#/components/schemas/TextChatUserMessageImport' ChatUserImport: required: - display_name - guest - name - properties type: object properties: display_name: description: Human readable name of this user. Shown to other users type: string display_picture: $ref: '#/components/schemas/FileImport' guest: description: True if this user was created by a guest user session type: boolean idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string name: description: >- The unique name used to identify this user across ChatKitty. Also known as username type: string properties: description: Custom data associated with this user type: object additionalProperties: description: Custom data associated with this user type: object example: name: jane@chatkitty.com displayName: Jane Doe isGuest: false properties: favoriteNumber: 42 ChannelMembershipImport: required: - username type: object properties: idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string username: description: Username of the user to be added as a member type: string example: username: jane@chatkitty.com FileImport: description: External file properties required: - content_type - name - size - url type: object properties: content_type: description: The mime type of this file type: string idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string name: description: The file name type: string size: description: The size of this file in bytes type: integer format: int64 url: description: The file URL type: string ChannelImport: required: - members - type type: object properties: type: type: string creator: description: Username of the user who created this channel type: string idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string members: description: List of usernames of members of this channel type: array items: description: List of usernames of members of this channel type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object example: idempotencyKey: unique-external-id type: DIRECT members: - jane@chatkitty.com - john@chatkitty.com discriminator: propertyName: type mapping: PUBLIC: '#/components/schemas/PublicChannelImport' PRIVATE: '#/components/schemas/PrivateChannelImport' DIRECT: '#/components/schemas/DirectChannelImport' TextMessageImport: required: - body - channel_id type: object properties: body: description: The text body of this message type: string channel_id: description: ID of the channel this message belongs to type: integer format: int64 group_tag: description: Tag identifying the message group this message belongs to type: string idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string properties: description: Map of custom data attached to this message type: object additionalProperties: description: Map of custom data attached to this message type: object GroupChannelImport: required: - members type: object properties: creator: description: Username of the user who created this channel type: string display_name: description: >- Human readable name of this channel shown to users. If absent defaults to the channel name type: string idempotency_key: description: >- Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended type: string members: description: List of usernames of members of this channel type: array items: description: List of usernames of members of this channel type: string name: description: >- The unique name of this channel used to reference the channel. If absent defaults to a random UUID type: string properties: description: Custom data associated with this channel type: object additionalProperties: description: Custom data associated with this channel type: object TextSystemMessageImport: description: Imports a system text message required: - body - channel_id type: object example: type: TEXT body: Hello, World! allOf: - $ref: '#/components/schemas/MessageImport' - type: object properties: body: description: The text body of this message type: string TextChatUserMessageImport: description: Imports a user text message required: - body - channel_id - user type: object example: type: TEXT body: Hello, World! user: jane@chatkitty.com allOf: - $ref: '#/components/schemas/MessageImport' - type: object properties: body: description: The text body of this message type: string user: description: Username of the user who sent this message type: string PublicChannelImport: description: Imports a public channel required: - members type: object example: idempotencyKey: unique-external-id type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 allOf: - $ref: '#/components/schemas/ChannelImport' - type: object properties: name: description: >- The unique name of this channel used to reference the channel. If absent defaults to a random UUID type: string display_name: description: >- Human readable name of this channel shown to users. If absent defaults to the channel name type: string PrivateChannelImport: description: Imports a private channel required: - members type: object example: idempotencyKey: unique-external-id type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 allOf: - $ref: '#/components/schemas/ChannelImport' - type: object properties: name: description: >- The unique name of this channel used to reference the channel. If absent defaults to a random UUID type: string display_name: description: >- Human readable name of this channel shown to users. If absent defaults to the channel name type: string ChannelsSendChannelMessageRequest: required: - file type: object properties: file: type: string format: binary groupTag: type: string username: type: string properties: type: string ImportsBatchChannelsRequest: required: - file type: object properties: file: description: JSON array file with channels type: string format: binary ImportsChannelMembersBatchRequest: required: - file type: object properties: file: description: JSON array file with user references to be added as members type: string format: binary ImportsBatchMessagesFromJsonRequest: required: - file type: object properties: file: description: JSON array file with messages type: string format: binary ImportsJsonUsersBatchRequest: required: - file type: object properties: file: description: JSON array file with users type: string format: binary RuntimeUpdateNodejsChatDependenciesRequest: type: array items: $ref: '#/components/schemas/ChatRuntimeDependencyProperties' ThreadsSendReplyMessageRequest: required: - file type: object properties: file: type: string format: binary groupTag: type: string properties: type: string UsersUpdateDisplayPictureRequest: required: - file type: object properties: file: type: string format: binary UsersCheckExistsResponse: description: Empty object type: object UsersCheckExists200Response: description: Empty object type: object examples: SecretResource: value: secret: My secret is... well, I'd never tell. ChatUserResource: value: id: 1 type: PERSON name: jane@chatkitty.com displayName: Jane Doe displayPictureUrl: https://api.chatkitty.com/v1/picture/jane presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/1 channels: href: https://api.chatkitty.com/v1/applications/1/users/1/channels notifications: href: https://api.chatkitty.com/v1/applications/1/users/1/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/1/display-picture application: href: https://api.chatkitty.com/v1/applications/1 Link: value: href: https://api.chatkitty.com/v1/applications/1 ChatRuntimeScriptProperties: value: 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 };" ChatRuntimeDependencyProperties: value: version: ^9.8.2 name: firebase ChatRuntimeEnvironmentVariablesProperties: value: CUSTOM_ENV_AWS_REGION: us-east-1 ChatRuntimeProperties: value: version: v0.0.29 id: 1 type: NODEJS dependencies: - version: ^0.19.2 name: axios defaultDependency: true - version: ^0.2.0 name: axios-token-interceptor defaultDependency: true - version: 1.0.1 name: chatkitty-platform-sdk defaultDependency: true - version: 6.9.4 name: qs defaultDependency: true - version: ^9.8.2 name: firebase defaultDependency: false initializationScript: script: var foo = 8; environmentVariables: CHATKITTY_CLIENT_SECRET: 34e65736-70c2-4d30-b80a-8ad9887c860b CHATKITTY_CLIENT_ID: 19b458d0-2b50-491c-8f13-65ec12f3978e CHATKITTY_CHAT_SERVICE_BASE_URL: https://api.chatkitty.com CHATKITTY_APPLICATION_ID: '1' CHATKITTY_AUTHORIZATION_SERVICE_BASE_URL: https://authorization.chatkitty.com ChatRuntimeResource: value: version: v0.0.29 id: 1 type: NODEJS dependencies: - version: ^0.19.2 name: axios defaultDependency: true - version: ^0.2.0 name: axios-token-interceptor defaultDependency: true - version: 1.0.1 name: chatkitty-platform-sdk defaultDependency: true - version: 6.9.4 name: qs defaultDependency: true - version: ^9.8.2 name: firebase defaultDependency: false initializationScript: script: var foo = 8; environmentVariables: CHATKITTY_CLIENT_SECRET: 34e65736-70c2-4d30-b80a-8ad9887c860b CHATKITTY_CLIENT_ID: 19b458d0-2b50-491c-8f13-65ec12f3978e CHATKITTY_CHAT_SERVICE_BASE_URL: https://api.chatkitty.com CHATKITTY_APPLICATION_ID: '1' CHATKITTY_AUTHORIZATION_SERVICE_BASE_URL: https://authorization.chatkitty.com _links: self: href: https://api.chatkitty.com/v1/applications/1/runtimes/nodejs dependencies: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/dependencies initializationScript: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/initialization-script functions: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/functions application: href: https://api.chatkitty.com/v1/applications/1 ApplicationSettingsResource: value: features: guest_users: ENABLED user_created_channels: DISABLED CreateExternalFileProperties: value: url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 CreatePersonChatUserResource: value: name: jane@chatkitty.com displayName: Jane Doe isGuest: false properties: favoriteNumber: 42 FileChatUserMessageResource: value: id: 44904 type: FILE channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} file: url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44904 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 FileSystemMessageResource: value: id: 44905 type: SYSTEM_FILE channelId: 702 file: url: https://example.com/files/my-application-file.png name: file.png contentType: image/png size: 32768 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44905 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 MessageResource: value: id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 TextChatUserMessageResource: value: id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 TextSystemMessageResource: value: id: 44903 type: SYSTEM_TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: This is a system announcement. Keep calm and carry on. properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44903 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 ChatUserReference: value: username: jane@chatkitty.com CreateFileMessageResource: value: type: FILE file: url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 CreateTextMessageResource: value: type: TEXT body: Hello, World! CreateChatFunctionResource: value: type: user.attempted.start_session name: User Attempted Start Session ChatFunctionResource: value: id: 1 type: user.attempted.start_session runtime: version: v0.0.29 id: 1 type: NODEJS name: User Attempted Start Session enabled: true currentVersionNumber: 34 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/1 versions: href: https://api.chatkitty.com/v1/applications/1/functions/1/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/current-version application: href: https://api.chatkitty.com/v1/applications/1 ApplicationJobResource: value: id: 53 type: CHANNEL_IMPORT state: PENDING createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 CreateChatFunctionVersionResource: value: handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello ' + event.username); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } ChatFunctionVersionResource: value: id: 13515 versionNumber: 34 handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello ' + event.username); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/13515 application: href: https://api.chatkitty.com/v1/applications/1 ChannelResource: value: id: 55913 type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 displayName: Our public channel properties: {} createdTime: '2021-09-28T01:35:40.967Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55913 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/55913/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/55913/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/moderators application: href: https://api.chatkitty.com/v1/applications/1 DirectChannelResource: value: id: 19354 type: DIRECT creator: id: 20953 type: PERSON name: jake@giftata.com displayName: Jake displayPictureUrl: https://api.chatkitty.com/v1/picture/Jake presence: status: UNAVAILABLE online: false properties: {} members: - id: 2 type: PERSON name: aaron displayName: aaron displayPictureUrl: https://api.chatkitty.com/v1/picture/aaron isGuest: true presence: status: UNAVAILABLE online: false properties: {} - id: 20953 type: PERSON name: jake@giftata.com displayName: Jake displayPictureUrl: https://api.chatkitty.com/v1/picture/Jake presence: status: UNAVAILABLE online: false properties: {} properties: {} createdTime: '2021-05-18T20:40:29.472Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/19354 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/19354/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/19354/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/19354/events application: href: https://api.chatkitty.com/v1/applications/1 PrivateChannelResource: value: id: 55914 type: PRIVATE name: a3e9118e-4c60-4a87-a19f-cb8bf5351462 displayName: Our private channel properties: {} createdTime: '2021-09-28T01:45:20.542Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55914 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/55914/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/55914/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55914/moderators application: href: https://api.chatkitty.com/v1/applications/1 PublicChannelResource: value: id: 55913 type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 displayName: Our public channel properties: {} createdTime: '2021-09-28T01:35:40.967Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55913 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/55913/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/55913/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/moderators application: href: https://api.chatkitty.com/v1/applications/1 CreateChannelInviteResource: value: user: username: jane@chatkitty.com ChannelInviteResource: value: createdTime: '2022-06-02T16:51:03.206366286Z' _links: invitee: href: https://api.chatkitty.com/v1/applications/1/users/1054 channel: href: https://api.chatkitty.com/v1/applications/1/channels/67026 application: href: https://api.chatkitty.com/v1/applications/1 CreateChannelGenericEventResource: value: type: My Custom Event properties: payload: Boom! stuff: favoriteNumber: 42 favoriteMovie: Lilo and Stitch ChannelGenericEventResource: value: type: My Custom Event properties: payload: Boom! stuff: favoriteNumber: 42 favoriteMovie: Lilo and Stitch _links: application: href: https://api.chatkitty.com/v1/applications/1 CreateDirectChannelResource: value: type: DIRECT members: - username: jane@chatkitty.com - username: john@chatkitty.com CreatePrivateChannelResource: value: type: PRIVATE name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 CreatePublicChannelResource: value: type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 CursorPagedModelNotificationResource: value: _embedded: notifications: - title: System message sent id: 3256308 body: File attachment channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/85103 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: SYSTEM:SENT:MESSAGE _relays: message: /application/v1/messages/85103.relay createdTime: '2022-06-02T16:36:54.356152Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: System message sent id: 3255805 body: Hello, World! channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 85216 type: SYSTEM_TEXT channelId: 702 body: Hello, World! properties: {} createdTime: '2022-06-02T16:34:58.871950Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/85216 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: SYSTEM:SENT:MESSAGE _relays: message: /application/v1/messages/85216.relay createdTime: '2022-06-02T16:35:14.296158Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: hey sent a message id: 1750641 body: 🌞 channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T16:45:33.696Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: USER:SENT:MESSAGE _relays: message: /application/v1/messages/44902.relay createdTime: '2021-09-16T16:45:48.351Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: ho sent a message id: 1749995 body: ok channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 44759 type: TEXT channelId: 702 user: id: 39841 type: PERSON name: ho@mailinator.com displayName: ho displayPictureUrl: https://api.chatkitty.com/v1/picture/ho presence: status: UNAVAILABLE online: false properties: {} body: ok properties: {} createdTime: '2021-09-16T05:13:48.030Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/44759 user: href: https://api.chatkitty.com/v1/applications/1/users/39841 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: USER:SENT:MESSAGE _relays: message: /application/v1/messages/44759.relay createdTime: '2021-09-16T05:14:00.993Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 - title: Nisar sent a message id: 1749225 body: hi channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 44559 type: TEXT channelId: 702 user: id: 39827 type: PERSON name: ss@dd.com displayName: Nisar displayPictureUrl: https://api.chatkitty.com/v1/picture/Nisar presence: status: UNAVAILABLE online: false properties: {} body: hi properties: {} createdTime: '2021-09-14T20:13:37.357Z' _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/44559 user: href: https://api.chatkitty.com/v1/applications/1/users/39827 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: USER:SENT:MESSAGE _relays: message: /application/v1/messages/44559.relay createdTime: '2021-09-14T20:13:49.998Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=SELF next: href: >- https://api.chatkitty.com/v1/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=NEXT page: size: 5 NotificationResource: value: title: System message sent id: 3256308 body: File attachment channel: id: 702 type: PUBLIC name: Your Awesome Chat Room displayName: Your Awesome Chat Room creator: id: 352 type: PERSON name: aaron.nwabuoku@chatkitty.com displayName: aaron.nwabuoku@chatkitty.com displayPictureUrl: >- https://api.chatkitty.com/v1/picture/aaron.nwabuoku%40chatkitty.com isGuest: true presence: status: UNAVAILABLE online: false properties: {} lastReceivedMessage: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' properties: {} createdTime: '2020-11-23T13:03:17.292Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/702 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/messages events: href: https://api.chatkitty.com/v1/applications/1/channels/702/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships members: href: https://api.chatkitty.com/v1/applications/1/channels/702/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/moderators application: href: https://api.chatkitty.com/v1/applications/1 data: message: id: 85103 type: SYSTEM_FILE channelId: 702 file: type: EXTERNAL url: https://example.com/files/jane.png name: jane.png contentType: image/png size: 32768 properties: {} createdTime: '2022-06-02T16:36:39.169379Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/85103 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 channelId: 702 type: SYSTEM:SENT:MESSAGE _relays: message: /application/v1/messages/85103.relay createdTime: '2022-06-02T16:36:54.356152Z' _links: recipient: href: https://api.chatkitty.com/v1/applications/1/users/36309 application: href: https://api.chatkitty.com/v1/applications/1 CursorPagedModelMessageResource: value: _embedded: messages: - id: 44902 type: TEXT channelId: 702 user: id: 39953 type: PERSON name: hey@mailinator.com displayName: hey displayPictureUrl: https://api.chatkitty.com/v1/picture/hey presence: status: UNAVAILABLE online: false properties: {} body: 🌞 properties: {} createdTime: '2021-09-16T20:45:33.696Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44902 user: href: https://api.chatkitty.com/v1/applications/1/users/39953 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44701 type: TEXT channelId: 802 user: id: 39906 type: PERSON name: sean.donald@gmail.com displayName: zolo displayPictureUrl: https://api.chatkitty.com/v1/picture/zolo presence: status: UNAVAILABLE online: false properties: {} body: test properties: {} createdTime: '2021-09-16T14:57:55.903Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44701 user: href: https://api.chatkitty.com/v1/applications/1/users/39906 channel: href: https://api.chatkitty.com/v1/applications/1/channels/802 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44700 type: TEXT channelId: 802 user: id: 39906 type: PERSON name: sean.donald@gmail.com displayName: zolo displayPictureUrl: https://api.chatkitty.com/v1/picture/zolo presence: status: UNAVAILABLE online: false properties: {} body: hi properties: {} createdTime: '2021-09-16T14:57:46.056Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44700 user: href: https://api.chatkitty.com/v1/applications/1/users/39906 channel: href: https://api.chatkitty.com/v1/applications/1/channels/802 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44760 type: TEXT channelId: 1255 user: id: 39841 type: PERSON name: ho@mailinator.com displayName: ho displayPictureUrl: https://api.chatkitty.com/v1/picture/ho presence: status: UNAVAILABLE online: false properties: {} body: do? properties: {} createdTime: '2021-09-16T09:14:09.585Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44760 user: href: https://api.chatkitty.com/v1/applications/1/users/39841 channel: href: https://api.chatkitty.com/v1/applications/1/channels/1255 application: href: https://api.chatkitty.com/v1/applications/1 - id: 44759 type: TEXT channelId: 702 user: id: 39841 type: PERSON name: ho@mailinator.com displayName: ho displayPictureUrl: https://api.chatkitty.com/v1/picture/ho presence: status: UNAVAILABLE online: false properties: {} body: ok properties: {} createdTime: '2021-09-16T09:13:48.030Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/messages/44759 user: href: https://api.chatkitty.com/v1/applications/1/users/39841 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages?start=333582423138781125&next=327180758840001251&size=5&relation=SELF next: href: >- https://api.chatkitty.com/v1/applications/1/messages?start=333582423138781125&next=327180758840001251&size=5&relation=NEXT page: size: 5 PagedModelChannelResource: value: _embedded: channels: - id: 15252 type: DIRECT creator: id: 19652 type: PERSON name: rexyfexy@gmail.com displayName: doark displayPictureUrl: https://api.chatkitty.com/v1/picture/doark presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} members: - id: 19652 type: PERSON name: rexyfexy@gmail.com displayName: doark displayPictureUrl: https://api.chatkitty.com/v1/picture/doark presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} - id: 19452 type: PERSON name: aa displayName: emra displayPictureUrl: https://api.chatkitty.com/v1/picture/emra presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} properties: {} createdTime: '2021-05-05T00:38:24.888Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/15252 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/15252/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/15252/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/15252/events application: href: https://api.chatkitty.com/v1/applications/1 - id: 55913 type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 displayName: Our public channel properties: {} createdTime: '2021-09-28T01:35:40.967Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/55913 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/55913/moderators application: href: https://api.chatkitty.com/v1/applications/1 - id: 2402 type: PUBLIC name: '#test' displayName: Test Channel creator: id: 4153 type: PERSON name: test@mail.com displayName: mridx displayPictureUrl: https://api.chatkitty.com/v1/picture/mridx presence: status: UNAVAILABLE online: false callStatus: AVAILABLE properties: {} properties: {} createdTime: '2020-12-13T21:12:09.195Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/channels/2402 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/2402/moderators application: href: https://api.chatkitty.com/v1/applications/1 - id: 856 type: PUBLIC name: mkm displayName: Meme Channel creator: id: 1504 type: PERSON name: njnj@vghf.jk displayName: mkm displayPictureUrl: https://api.chatkitty.com/v1/picture/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 displayPictureUrl: https://api.chatkitty.com/v1/picture/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: self: href: https://api.chatkitty.com/v1/applications/1/channels/856 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/856/moderators application: href: https://api.chatkitty.com/v1/applications/1 - id: 1302 type: PUBLIC name: SONU KUMAR displayName: SONU KUMAR creator: id: 2302 type: PERSON name: '852122' displayName: SONU KUMAR displayPictureUrl: https://api.chatkitty.com/v1/picture/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 displayPictureUrl: https://api.chatkitty.com/v1/picture/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: self: href: https://api.chatkitty.com/v1/applications/1/channels/1302 participants: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/participants messages: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/messages events: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/events memberships: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/memberships members: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/members moderators: href: >- https://api.chatkitty.com/v1/applications/1/channels/1302/moderators application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: https://api.chatkitty.com/v1/applications/1/channels?page=0&size=5 self: href: https://api.chatkitty.com/v1/applications/1/channels?page=0&size=5 next: href: https://api.chatkitty.com/v1/applications/1/channels?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/channels?page=403&size=5 page: size: 5 totalElements: 2020 totalPages: 404 number: 0 PagedModelChatUserResource: value: _embedded: users: - id: 14503 type: PERSON name: jane@chatkitty.com displayName: Jane displayPictureUrl: https://api.chatkitty.com/v1/picture/Jane presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/14503 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/14503/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/14503/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/14503/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 3004 type: PERSON name: '1' displayName: ChatKittyUser displayPictureUrl: https://api.chatkitty.com/v1/picture/ChatKittyUser isGuest: true presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/3004 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/3004/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/3004/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/3004/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 6152 type: PERSON name: 10zxc13@gmail.com displayName: Jack displayPictureUrl: https://api.chatkitty.com/v1/picture/Jack presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/6152 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/6152/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/6152/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/6152/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 3353 type: PERSON name: '12121' displayName: '12121' displayPictureUrl: https://api.chatkitty.com/v1/picture/12121 isGuest: true presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/3353 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/3353/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/3353/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/3353/display-picture application: href: https://api.chatkitty.com/v1/applications/1 - id: 6602 type: PERSON name: '123' displayName: '123' displayPictureUrl: https://api.chatkitty.com/v1/picture/123 presence: status: UNAVAILABLE online: false properties: {} _links: self: href: https://api.chatkitty.com/v1/applications/1/users/6602 channels: href: >- https://api.chatkitty.com/v1/applications/1/users/6602/channels notifications: href: >- https://api.chatkitty.com/v1/applications/1/users/6602/notifications displayPicture: href: >- https://api.chatkitty.com/v1/applications/1/users/6602/display-picture application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: https://api.chatkitty.com/v1/applications/1/users?page=0&size=5 self: href: https://api.chatkitty.com/v1/applications/1/users?page=0&size=5 next: href: https://api.chatkitty.com/v1/applications/1/users?page=1&size=5 last: href: https://api.chatkitty.com/v1/applications/1/users?page=114&size=5 page: size: 5 totalElements: 571 totalPages: 115 number: 0 ChatUserSessionResource: value: id: 635627 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:25:27.253Z' createdTime: '2021-11-12T08:02:34.122Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 PagedModelChatUserSessionResource: value: _embedded: sessions: - id: 635627 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:25:27.253Z' createdTime: '2021-11-12T08:02:34.122Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635641 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:35:08.587Z' createdTime: '2021-11-12T08:25:33.885Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635669 user: id: 39806 type: PERSON name: c6f75947-af48-4893-a78e-0e0b9bd68580 displayName: Julie Jaxton displayPictureUrl: https://api.chatkitty.com/v1/picture/Julie+Jaxton isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:55:36.282Z' createdTime: '2021-11-12T08:38:54.982Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39806 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635644 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T08:54:48.309Z' createdTime: '2021-11-12T08:45:13.682Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 635651 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/Joni+Jordyn isGuest: true presence: status: UNAVAILABLE online: false properties: {} state: ENDED userAgent: ChatKitty-JS/1.50.0 endTime: '2021-11-12T09:06:40.409Z' createdTime: '2021-11-12T09:04:53.490Z' _links: user: href: https://api.chatkitty.com/v1/applications/14302/users/39805 application: href: https://api.chatkitty.com/v1/applications/14302 _links: first: href: https://api.chatkitty.com/v1/user-sessions?page=0&size=5 self: href: https://api.chatkitty.com/v1/user-sessions?page=0&size=5 next: href: https://api.chatkitty.com/v1/user-sessions?page=1&size=5 last: href: https://api.chatkitty.com/v1/user-sessions?page=328&size=5 page: size: 5 totalElements: 1645 totalPages: 329 number: 0 ReplyThreadResource: value: id: 67528 type: MAIN properties: {} createdTime: '2022-02-04T13:19:06.764939Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/threads/67528 channel: href: https://api.chatkitty.com/v1/applications/1/channels/67026 application: href: https://api.chatkitty.com/v1/applications/1 PagedModelChatFunctionResource: value: _embedded: functions: - id: 202 type: user.received.notification runtime: version: v0.0.29 id: 1 type: NODEJS name: User Received Notification enabled: true currentVersionNumber: 5 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/202 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/202/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/202/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/202/current-version application: href: https://api.chatkitty.com/v1/applications/1 - id: 4552 type: user.sent.message runtime: version: v0.0.29 id: 1 type: NODEJS name: User Sent Message enabled: false currentVersionNumber: 0 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/4552 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/4552/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/4552/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/4552/current-version application: href: https://api.chatkitty.com/v1/applications/1 - id: 6152 type: user.started.chat_session runtime: version: v0.0.29 id: 1 type: NODEJS name: User Started Chat Session enabled: false currentVersionNumber: 0 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/6152 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/6152/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/6152/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/6152/current-version application: href: https://api.chatkitty.com/v1/applications/1 - id: 1 type: user.attempted.start_session runtime: version: v0.0.29 id: 1 type: NODEJS name: User Attempted Start Session enabled: true currentVersionNumber: 34 _links: self: href: https://api.chatkitty.com/v1/applications/1/functions/1 versions: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions invocations: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations currentVersion: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/current-version application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/runtimes/nodejs/functions?page=0&size=5 page: size: 5 totalElements: 4 totalPages: 1 number: 0 MessageReadReceiptResource: value: user: id: 1 type: PERSON name: jane@chatkitty.com displayName: Jane Doe displayPictureUrl: https://api.chatkitty.com/v1/picture/jane presence: status: UNAVAILABLE online: false properties: {} createdTime: '2022-06-02T16:51:03.206366286Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/1 message: href: https://api.chatkitty.com/v1/applications/1/messages/67026 application: href: https://api.chatkitty.com/v1/applications/1 PagedModelMessageReadReceiptResource: value: _embedded: receipts: - user: id: 1 type: PERSON name: jane@chatkitty.com displayName: Jane Doe displayPictureUrl: https://api.chatkitty.com/v1/picture/jane presence: status: UNAVAILABLE online: false properties: {} createdTime: '2022-06-02T16:51:03.206366286Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/1 message: href: https://api.chatkitty.com/v1/applications/1/messages/67026 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/messages/67026/read-receipts?page=0&size=25 page: size: 1 totalElements: 1 totalPages: 1 number: 0 PagedModelApplicationJobResource: value: _embedded: jobs: - id: 1 type: CHANNEL_IMPORT state: FAILED createdTime: '2021-09-28T04:19:41.255Z' endedTime: '2021-09-28T04:19:42.230Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/1 application: href: https://api.chatkitty.com/v1/applications/1 - id: 52 type: CHANNEL_IMPORT state: FAILED createdTime: '2021-09-28T05:30:08.902Z' endedTime: '2021-09-28T05:30:09.571Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/52 application: href: https://api.chatkitty.com/v1/applications/1 - id: 53 type: CHANNEL_IMPORT state: FINISHED createdTime: '2021-09-28T05:30:44.265Z' endedTime: '2021-09-28T05:30:44.692Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/53 application: href: https://api.chatkitty.com/v1/applications/1 - id: 54 type: CHANNEL_IMPORT state: FINISHED createdTime: '2021-09-28T05:35:35.075Z' endedTime: '2021-09-28T05:36:15.755Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/54 application: href: https://api.chatkitty.com/v1/applications/1 - id: 102 type: CHANNEL_MEMBERS_IMPORT state: FINISHED createdTime: '2021-09-29T04:52:22.895Z' endedTime: '2021-09-29T04:52:58.941Z' _links: self: href: https://api.chatkitty.com/v1/applications/1/jobs/102 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/jobs?running=false&page=0&size=25 page: size: 25 totalElements: 5 totalPages: 1 number: 0 PagedModelChatFunctionVersionResource: value: _embedded: versions: - id: 13515 versionNumber: 34 handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello ' + event.username); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/13515 application: href: https://api.chatkitty.com/v1/applications/1 - id: 13461 versionNumber: 33 handlerScript: >- const logs = []; async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); logs.push('Hello!'); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return logs; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/13461 application: href: https://api.chatkitty.com/v1/applications/1 - id: 4802 versionNumber: 32 handlerScript: >- async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return {payload: true}; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/4802 application: href: https://api.chatkitty.com/v1/applications/1 - id: 4652 versionNumber: 31 handlerScript: >- async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return true; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/4652 application: href: https://api.chatkitty.com/v1/applications/1 - id: 4555 versionNumber: 30 handlerScript: >- async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) { let email = event.username; let displayName = event.authParams.displayName || email; let userApi = context.getUserApi(); await userApi.getUserExists(email) .catch(async () => { let user = await userApi.createUser( { 'name': email, 'displayName': displayName } ); let channelApi = context.getChannelApi(); await channelApi.createChannelMember(702, { 'id': user.data.id }); }); return { status: "SUCCESS" }; } _links: self: href: >- https://api.chatkitty.com/v1/applications/1/function-versions/4555 application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=0&size=5 self: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=0&size=5 next: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/versions?page=6&size=5 page: size: 5 totalElements: 35 totalPages: 7 number: 0 PagedModelChatFunctionInvocationResource: value: _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' _links: application: href: https://api.chatkitty.com/v1/applications/1 - id: 468453 versionNumber: 34 args: authParams: displayName: '' username: '' status: SUCCEEDED result: payload: - 'Hello ' - 'Hello ' createdTime: '2021-09-19T09:34:40.190Z' _links: application: href: https://api.chatkitty.com/v1/applications/1 - id: 468452 versionNumber: 34 args: authParams: displayName: '' username: '' status: SUCCEEDED result: payload: - 'Hello ' createdTime: '2021-09-19T09:34:26.890Z' _links: application: href: https://api.chatkitty.com/v1/applications/1 - id: 467243 versionNumber: 34 args: authParams: displayName: '' username: aaron status: SUCCEEDED result: payload: - Hello aaron createdTime: '2021-09-17T17:00:31.396Z' _links: application: href: https://api.chatkitty.com/v1/applications/1 - 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: application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=0&size=5 self: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=0&size=5 next: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/functions/1/invocations?page=1515&size=5 page: size: 5 totalElements: 7578 totalPages: 1516 number: 0 ChatSessionResource: value: id: 1480794 session: id: 544188 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544188 channel: href: https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 PagedModelChatSessionResource: value: _embedded: sessions: - id: 1480794 session: id: 544188 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544188 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1480795 session: id: 544188 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544188 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55052 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1480731 session: id: 544216 user: id: 39805 type: PERSON name: b2a6da08-88bf-4778-b993-7234e6d8a3ff displayName: Joni Jordyn displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/544216 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55052 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1481281 session: id: 545001 user: id: 39806 type: PERSON name: c6f75947-af48-4893-a78e-0e0b9bd68580 displayName: Julie Jaxton displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/545001 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 - id: 1481282 session: id: 545052 user: id: 39807 type: PERSON name: 8fadc920-f3e6-49ff-9398-1e58b3dc44dd displayName: Zaria Bria displayPictureUrl: https://api.chatkitty.com/v1/picture/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: session: href: >- https://api.chatkitty.com/v1/applications/14302/user-sessions/545052 channel: href: >- https://api.chatkitty.com/v1/applications/14302/channels/55002 application: href: https://api.chatkitty.com/v1/applications/14302 _links: first: href: https://api.chatkitty.com/v1/chat-sessions?page=0&size=5 self: href: https://api.chatkitty.com/v1/chat-sessions?page=0&size=5 next: href: https://api.chatkitty.com/v1/chat-sessions?page=1&size=5 last: href: https://api.chatkitty.com/v1/chat-sessions?page=1037&size=5 page: size: 5 totalElements: 5190 totalPages: 1038 number: 0 PagedModelChannelMembershipResource: value: _embedded: memberships: - createdTime: '2020-12-02T21:52:33.976Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/2 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/2 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-12-02T22:03:28.742Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/52 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/52 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-11-23T13:03:17.433Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/352 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/352 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-12-07T22:28:47.620Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/403 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/403 application: href: https://api.chatkitty.com/v1/applications/1 - createdTime: '2020-11-23T14:34:29.580Z' _links: user: href: https://api.chatkitty.com/v1/applications/1/users/452 channel: href: https://api.chatkitty.com/v1/applications/1/channels/702 member: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/members/452 application: href: https://api.chatkitty.com/v1/applications/1 _links: first: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=0&size=5 self: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=0&size=5 next: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=1&size=5 last: href: >- https://api.chatkitty.com/v1/applications/1/channels/702/memberships?page=107&size=5 page: size: 5 totalElements: 537 totalPages: 108 number: 0 PagedModelChannelInviteResource: value: _embedded: invites: - createdTime: '2022-06-02T16:51:03.206366Z' _links: invitee: href: https://api.chatkitty.com/v1/applications/1/users/1054 channel: href: https://api.chatkitty.com/v1/applications/1/channels/67026 application: href: https://api.chatkitty.com/v1/applications/1 _links: self: href: >- https://api.chatkitty.com/v1/applications/1/channels/67026/invites?page=0&size=25 page: size: 25 totalElements: 1 totalPages: 1 number: 0 ApplicationResource: value: id: 1 key: 19b458d0-2b50-491c-8f13-65ec12f3978e properties: {} created_time: '2020-10-02T20:29:25.316Z' _links: self: href: https://api.chatkitty.com/v1/applications/1 Links: value: first: href: https://api.chatkitty.com/v1/applications/1/channels?page=0&size=5 self: href: https://api.chatkitty.com/v1/applications/1/channels?page=0&size=5 next: href: https://api.chatkitty.com/v1/applications/1/channels?page=1&size=5 last: href: https://api.chatkitty.com/v1/applications/1/channels?page=403&size=5 MessageImport: value: idempotencyKey: unique-external-id type: TEXT body: Hello, World! ChatUserImport: value: name: jane@chatkitty.com displayName: Jane Doe isGuest: false properties: favoriteNumber: 42 ChannelMembershipImport: value: username: jane@chatkitty.com ChannelImport: value: idempotencyKey: unique-external-id type: DIRECT members: - jane@chatkitty.com - john@chatkitty.com DirectChannelImport: value: idempotencyKey: unique-external-id type: DIRECT members: - jane@chatkitty.com - john@chatkitty.com TextSystemMessageImport: value: type: TEXT body: Hello, World! TextChatUserMessageImport: value: type: TEXT body: Hello, World! user: jane@chatkitty.com PublicChannelImport: value: idempotencyKey: unique-external-id type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 PrivateChannelImport: value: idempotencyKey: unique-external-id type: PUBLIC name: b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7 securitySchemes: password_reset_token_authorization: type: apiKey name: X-Token in: header application_authorization: type: oauth2 flows: clientCredentials: tokenUrl: https://authorization.chatkitty.com/oauth/token refreshUrl: https://authorization.chatkitty.com/oauth/token scopes: create:*: Create application resources read:*: Read application resources update:*: Update application resources delete:*: Delete application resources externalDocs: description: Platform API Interactive Docs url: https://api.chatkitty.com/docs/reference