{"openapi":"3.0.1","info":{"title":"ChatKitty Platform API","description":"OpenAPI specification (OAS) for the ChatKitty Platform API.\nSee the Interactive Docs to try ChatKitty API methods without writing code,\nand get the complete schema of resources exposed by the API.","termsOfService":"https://chatkitty.com/terms-of-service","contact":{"name":"Support","url":"mailto:support@chatkitty.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"version":"2.112.3"},"externalDocs":{"description":"Platform API Interactive Docs","url":"https://api.chatkitty.com/docs/reference"},"servers":[{"url":"https://api.chatkitty.com"}],"tags":[{"name":"analytics","description":"Export analytics data from your ChatKitty application","x-displayName":"Analytics"},{"name":"application","description":"Configure and manage your ChatKitty application","x-displayName":"Application"},{"name":"channels","description":"Operations to create, retrieve, update and delete channels","x-displayName":"Channels"},{"name":"chat-sessions","description":"Chat session operations","x-displayName":"Chat Sessions"},{"name":"function-versions","description":"Chat function version operations","x-displayName":"Chat Function Versions"},{"name":"functions","description":"Chat function operations","x-displayName":"Chat Functions"},{"name":"imports","description":"Import user, channel, message data into your ChatKitty application","x-displayName":"Imports"},{"name":"jobs","description":"Retrieve information about long running scheduled jobs like imports and exports","x-displayName":"Jobs"},{"name":"messages","description":"Operations to retrieve, update and delete messages","x-displayName":"Messages"},{"name":"runtime","description":"Chat runtime operations","x-displayName":"Chat Runtime"},{"name":"threads","description":"Message thread operations","x-displayName":"Threads"},{"name":"user-sessions","description":"User session operations","x-displayName":"User Sessions"},{"name":"users","description":"User operations","x-displayName":"Users"}],"paths":{"/analytics/messages":{"post":{"tags":["analytics"],"summary":"Export message analytics","description":"Batch export message analytics data","operationId":"export-message-analytics","responses":{"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"}}}},"202":{"description":"Export job accepted","content":{"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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"application/vnd.chatkitty.v1+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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}}}}},"security":[{"application_authorization":["read:message"]}],"x-codeSamples":[]}},"/analytics/users":{"post":{"tags":["analytics"],"summary":"Export user analytics","description":"Batch export user analytics data","operationId":"export-user-analytics","responses":{"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"}}}},"202":{"description":"Export job accepted","content":{"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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"application/vnd.chatkitty.v1+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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}}}}},"security":[{"application_authorization":["read:user"]}],"x-codeSamples":[]}},"/application":{"get":{"tags":["application"],"summary":"Retrieve the authenticated application","description":"Returns the ChatKitty application associated with the authentication credentials used.\n\nYou must use an **OAuth V2 Bearer token** to access this endpoint.","operationId":"retrieve-application","responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}}}}},"security":[{"application_authorization":["read:application"]}],"x-codeSamples":[{"lang":"cURL","source":"curl -X 'GET' \\\n  'https://api.chatkitty.com/application' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Application.retrieveApplication()\n"}]}},"/application/message-read-receipt-summaries":{"get":{"tags":["application"],"summary":"Retrieve the authenticated application message read receipt summaries","description":"Returns the message read receipt summaries for the authenticated application","operationId":"retrieve-application-message-read-receipt-summaries","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageReadReceiptSummaryResource"}}}}},"security":[{"application_authorization":["read:application","read:message"]}],"x-codeSamples":[]}},"/application/settings":{"get":{"tags":["application"],"summary":"Retrieve the authenticated application settings","description":"Returns the current settings configuring this application","operationId":"retrieve-application-settings","responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationSettingsResource"}}}}},"security":[{"application_authorization":["read:application"]}],"x-codeSamples":[{"lang":"cURL","source":"curl -X 'GET' \\\n  'https://api.chatkitty.com/application/settings' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Application.retrieveApplicationSettings()\n"}]},"put":{"tags":["application"],"summary":"Update the authenticated application settings","description":"Update the settings configuring this application","operationId":"update-application-settings","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ApplicationSettingsResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationSettingsResource"}}}}},"security":[{"application_authorization":["update:application"]}],"x-codeSamples":[{"lang":"cURL","source":"curl -X 'PUT' \\\n  'https://api.chatkitty.com/application/settings' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"guestUsers\": \"DISABLED\",\n  \"userCreatedChannels\": \"DISABLED\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Application.updateApplicationSettings({\n  guestUsers: 'DISABLED',\n  userCreatedChannels: 'DISABLED'\n})\n"}]}},"/channels":{"get":{"tags":["channels"],"summary":"List channels","description":"Returns a page of channels belonging to this application","operationId":"list-channels","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"type","in":"query","description":"Filters by channel type","required":false,"schema":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]}},{"name":"members","in":"query","description":"Filters by channel members using their usernames","required":false,"schema":{"uniqueItems":true,"type":"array","items":{"type":"string"}}},{"name":"startTime","in":"query","description":"Filters for channels created within a time range: start time","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endTime","in":"query","description":"Filters for channels created within a time range: end time","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"properties","in":"query","description":"Filters by channel custom properties","required":false,"schema":{"type":"string"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}}}}},"security":[{"application_authorization":["read:channel"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels?page=0&size=5' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannels()\n"}]},"post":{"tags":["channels"],"summary":"Create a channel","description":"Creates a new channel or returns an equivalent existing channel","operationId":"create-channel","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CreateChannelResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}}}}},"security":[{"application_authorization":["create:channel"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/channels' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"PUBLIC\",\n  \"name\": \"b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.createChannel({\n  type: \"PUBLIC\",\n  name: \"b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7\"\n})\n"}]}},"/channels/{id}":{"get":{"tags":["channels"],"summary":"Retrieve a channel","description":"Returns a channel by ID","operationId":"retrieve-channel","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}}}}},"security":[{"application_authorization":["read:channel"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/55913' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.retrieveChannel(55913)\n"}]},"delete":{"tags":["channels"],"summary":"Delete a channel","description":"Deletes a channel by ID","operationId":"delete-channel","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}}}}},"security":[{"application_authorization":["read:channel","delete:channel"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/channels/55913' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.deleteChannel(55913)\n"}]},"patch":{"tags":["channels"],"summary":"Update a channel","description":"Updates a channel properties","operationId":"update-channel","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json+merge-patch":{"schema":{"$ref":"#/components/schemas/JsonMergePatch"}}}},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}}}}},"security":[{"application_authorization":["read:channel","update:channel"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'PATCH' \\\n  'https://api.chatkitty.com/channels/55913' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json+merge-patch' \\\n  -d '{\n  \"displayName\": \"A chatty channel\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.updateChannel(55913, {\n  displayName: \"A chatty channel\"\n})\n"}]}},"/channels/{id}/events":{"post":{"tags":["channels"],"summary":"Send a channel event","description":"Sends a custom channel event","operationId":"send-channel-event","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CreateChannelGenericEventResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelGenericEventResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelGenericEventResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelGenericEventResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelGenericEventResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelGenericEventResource"}}}}},"security":[{"application_authorization":["read:channel","create:channel_event"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/channels/55913/events' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"My Custom Event\",\n  \"properties\": {\n    \"payload\": \"Boom!\",\n    \"stuff\": {\n      \"favoriteNumber\": 42,\n      \"favoriteMovie\": \"Lilo and Stitch\"\n    }\n  }\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.sendChannelEvent(55913, {\n  type: \"My Custom Event\",\n  properties: {\n    payload: \"Boom!\",\n    stuff: {\n      \"favoriteNumber\": 42,\n      \"favoriteMovie\": \"Lilo and Stitch\"\n    }\n  }\n})\n"}]}},"/channels/{id}/invites":{"get":{"tags":["channels"],"summary":"List channel invites","description":"Returns a page of invites sent to join this channel","operationId":"list-channel-invites","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelInviteResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelInviteResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelInviteResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelInviteResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelInviteResource"}}}}},"security":[{"application_authorization":["read:channel_invite"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/67026/invites?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannelInvites(67026)\n"}]},"post":{"tags":["channels"],"summary":"Send a channel invite","description":"Sends a channel invite to user","operationId":"send-channel-invite","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CreateChannelInviteResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelInviteResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelInviteResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelInviteResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelInviteResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelInviteResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","create:channel_invite"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/channels/67026/invites' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  user: {\n    \"username\": \"jane@chatkitty.com\"\n  }\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.sendChannelInvite(67026, {\n  user: {\n    username: \"jane@chatkitty.com\"\n  }\n})\n"}]}},"/channels/{id}/keystrokes":{"post":{"tags":["channels"],"summary":"Send channel keystrokes","description":"Sends keystrokes in this channel on behalf of a user","operationId":"send-channel-keystrokes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDelegatedReplyThreadKeystrokesResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","create:keystrokes"]}],"x-codeSamples":[]}},"/channels/{id}/members":{"get":{"tags":["channels"],"summary":"List a channel's members","description":"Returns a page of channel members","operationId":"list-channel-members","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}}}}},"security":[{"application_authorization":["read:channel","read:channel_membership"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/67026/members?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannelMembers(67026)\n"}]},"post":{"tags":["channels"],"summary":"Add a channel member","description":"Makes a user a group channel member","operationId":"add-channel-member","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserReference"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","create:channel_membership"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/channels/55913/members' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"username\": \"jane@chatkitty.com\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.addChannelMember(55913, {\n  username: \"jane@chatkitty.com\"\n})\n"}]}},"/channels/{id}/members/{user_id}":{"delete":{"tags":["channels"],"summary":"Remove a channel member","description":"Removes a member from a group channel","operationId":"remove-channel-member","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"user_id","in":"path","description":"User ID of member to be removed","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","delete:channel_membership"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/channels/55913/members/14503' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.removeChannelMember(55913, 14503)\n"}]}},"/channels/{id}/memberships":{"get":{"tags":["channels"],"summary":"List channel memberships","description":"Returns a page of channel membership info for this channel","operationId":"list-channel-memberships","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelMembershipResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelMembershipResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelMembershipResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelMembershipResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelMembershipResource"}}}}},"security":[{"application_authorization":["read:channel","read:channel_membership"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/702/memberships?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannelMemberships(702)\n"}]}},"/channels/{id}/messages":{"get":{"tags":["channels"],"summary":"List channel messages","description":"Returns a page of messages sent in this channel","operationId":"list-channel-messages","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","description":"Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"next","in":"query","description":"Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"relation","in":"query","description":"Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","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":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}}}}},"security":[{"application_authorization":["read:channel","read:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/702/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannelMessages(702)\n"}]},"post":{"tags":["channels"],"summary":"Send a channel message","description":"Sends a message in this channel as the system or on behalf of a user","operationId":"send-channel-message","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageResource"}},"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"},"groupTag":{"type":"string"},"username":{"type":"string"},"properties":{"type":"string"}}}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","create:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/channels/702/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"type\": \"TEXT\",\n    \"body\": \"🌞\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.sendChannelMessage(702, {\n  \"type\": \"TEXT\",\n  \"body\": \"🌞\"\n})\n"}]}},"/channels/{id}/moderators":{"get":{"tags":["channels"],"summary":"Lists a channel's moderators","description":"Returns a page of channel moderators","operationId":"list-channel-moderators","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}}}}},"security":[{"application_authorization":["read:channel","read:channel_moderator"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/67026/moderators?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannelModerators(67026)\n"}]},"post":{"tags":["channels"],"summary":"Add a channel moderator","description":"Makes a user a group channel moderator","operationId":"add-channel-moderator","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserReference"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","read:channel_membership","create:channel_moderator"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/channels/55913/moderators' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"username\": \"jane@chatkitty.com\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.addChannelModerator(55913, {\n  username: \"jane@chatkitty.com\"\n})\n"}]}},"/channels/{id}/moderators/{user_id}":{"delete":{"tags":["channels"],"summary":"Remove a channel moderator","description":"Removes a moderator from a group channel","operationId":"remove-channel-moderator","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"user_id","in":"path","description":"User ID of moderator to be removed","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChannelResource"}}}}},"security":[{"application_authorization":["read:channel","read:user","delete:channel_moderator"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/channels/55913/moderators/14503' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.removeChannelModerator(55913, 14503)\n"}]}},"/channels/{id}/participants":{"get":{"tags":["channels"],"summary":"List channel participants","description":"Returns a page of channel active participants: members that currently online","operationId":"list-channel-participants","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}}}}},"security":[{"application_authorization":["read:channel","read:chat_session"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/channels/702/participants?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Channels.listChannelParticipants(702)\n"}]}},"/channels/{id}/reported-messages":{"get":{"tags":["channels"],"summary":"List channel reported messages","description":"Returns a page of reported messages in this channel","operationId":"list-channel-reported-messages","parameters":[{"name":"id","in":"path","description":"Channel ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageResource"}}}}},"security":[{"application_authorization":["read:channel","read:message_report"]}],"x-codeSamples":[]}},"/chat-sessions":{"get":{"tags":["chat-sessions"],"summary":"List chat sessions","description":"Returns a page of chat sessions belonging to this application","operationId":"list-chat-sessions","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"state","in":"query","description":"Filters by state","required":false,"schema":{"type":"string","enum":["ACTIVE","ENDED"]}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatSessionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatSessionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatSessionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatSessionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatSessionResource"}}}}},"security":[{"application_authorization":["read:chat_session"]}],"x-codeSamples":[]}},"/function-versions/{id}":{"get":{"tags":["function-versions"],"summary":"Retrieve a chat function version","description":"Returns a chat function version by ID","operationId":"retrieve-function-version","parameters":[{"name":"id","in":"path","description":"Chat function version ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}}}}},"security":[{"application_authorization":["read:function_version"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/function-versions/13515' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.FunctionVersions.retrieveFunctionVersion(13515)\n"}]}},"/functions/{id}":{"get":{"tags":["functions"],"summary":"Retrieve a chat function","description":"Returns a chat function by ID","operationId":"retrieve-function","parameters":[{"name":"id","in":"path","description":"Chat function ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}}}}},"security":[{"application_authorization":["read:function"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/functions/1' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Functions.retrieveFunction(1)\n\n\n"}]}},"/functions/{id}/current-version":{"get":{"tags":["functions"],"summary":"Retrieve chat function current version","description":"Returns the version of this chat function currently deployed","operationId":"retrieve-function-current-version","parameters":[{"name":"id","in":"path","description":"Chat function ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}}}}},"security":[{"application_authorization":["read:function","read:function_version"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/functions/13515/current-version' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Functions.retrieveFunctionCurrentVersion(13515)\n\n\n"}]}},"/functions/{id}/invocations":{"get":{"tags":["functions"],"summary":"List chat function invocations","description":"Returns a page of invocations of this chat function. A log of previous runs of the function","operationId":"list-function-invocations","parameters":[{"name":"id","in":"path","description":"Chat function ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionInvocationResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionInvocationResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionInvocationResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionInvocationResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionInvocationResource"}}}}},"security":[{"application_authorization":["read:function","read:function_invocation"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/functions/1/invocations?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Functions.listFunctionInvocations(1)\n"}]}},"/functions/{id}/versions":{"get":{"tags":["functions"],"summary":"List chat function versions","description":"Returns a page of versions of this chat function","operationId":"list-function-versions","parameters":[{"name":"id","in":"path","description":"Chat function ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionVersionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionVersionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionVersionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionVersionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionVersionResource"}}}}},"security":[{"application_authorization":["read:function","read:function_version"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/functions/1/versions?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\n\nawait chatkitty.Functions.listFunctionVersions(1)\n\n"}]},"post":{"tags":["functions"],"summary":"Create a chat function version","description":"Creates a new version of this chat function","operationId":"create-function-version","parameters":[{"name":"id","in":"path","description":"Chat function ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CreateChatFunctionVersionResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionVersionResource"}}}}},"security":[{"application_authorization":["read:function","create:function_version"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/functions/1/versions' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"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}\"\n}\n\n'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\n\nawait chatkitty.Functions.createFunctionVersion(13515,{\n  \"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}\"\n})\n"}]}},"/imports/channels":{"post":{"tags":["imports"],"summary":"Import channels","description":"Batch imports channels from a JSON array file","externalDocs":{"description":"Learn more about importing channels and the channel import JSON array file format","url":"https://chatkitty.com/docs/concepts/imports#importing-channels"},"operationId":"import-channels","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"JSON array file with channels","format":"binary"}}}}}},"responses":{"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"}}}},"202":{"description":"Import job accepted","content":{"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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"application/vnd.chatkitty.v1+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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}}}}},"security":[{"application_authorization":["create:channel"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/imports/channels' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'file=@channels_import_file.json;type=application/json\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nconst file = new File(\n    ['[{\"idempotencyKey\":\"unique-external-id\",\"type\":\"DIRECT\",\"members\":[\"jane@chatkitty.com\",\"john@chatkitty.com\"]}]'],\n    \"import.json\",\n    {\n      type: \"application/json\"\n    })\n\nawait chatkitty.Imports.importChannels(file)\n"}]}},"/imports/channels/{id}/members":{"post":{"tags":["imports"],"summary":"Import channel members","description":"Batch imports channel members from a JSON array file","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"},"operationId":"import-channel-members","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"JSON array file with user references to be added as members","format":"binary"}}}}}},"responses":{"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"}}}},"202":{"description":"Import job accepted","content":{"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/applications/1/jobs/205"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"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/applications/1/jobs/205"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"application/vnd.chatkitty.v1+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/applications/1/jobs/205"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/205"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/205"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}}}}},"security":[{"application_authorization":["create:channel_membership"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/imports/channels/1/members' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'file=@members_import_file.json;type=application/json\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nconst file = new File(\n    ['[{\"idempotencyKey\":\"unique-external-id\",\"type\":\"DIRECT\",\"members\":[\"b2a6da08-88bf-4778-b993-7234e6d8a3ff\",\"c6f75947-af48-4893-a78e-0e0b9bd68580\"]}]'],\n    \"import.json\",\n    {\n      type: \"application/json\"\n    })\n\nawait chatkitty.Imports.importChannelMembers(1, [{\n  idempotencyKey: \"123\",\n  username: \"string\"\n}])\n"}]}},"/imports/messages":{"post":{"tags":["imports"],"summary":"Import messages","description":"Batch imports messages from a JSON array file","externalDocs":{"description":"Learn more about importing messages and the message import JSON array file format","url":"https://chatkitty.com/docs/concepts/imports#importing-messages"},"operationId":"import-messages","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"JSON array file with messages","format":"binary"}}}}}},"responses":{"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"}}}},"202":{"description":"Import job accepted","content":{"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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"application/vnd.chatkitty.v1+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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/203"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}}}}},"security":[{"application_authorization":["create:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/imports/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'file=@messages_import_file.json;type=application/json\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nconst file = new File(\n    ['[{\"type\":\"TEXT\",\"body\":\"Hello, World!\"}]'],\n    \"import.json\",\n    {\n      type: \"application/json\"\n    })\n\nawait chatkitty.Imports.importMessages(file)\n"}]}},"/imports/users":{"post":{"tags":["imports"],"summary":"Import users","description":"Batch imports users from a JSON array file","externalDocs":{"description":"Learn more about importing users and the user import JSON array file format","url":"https://chatkitty.com/docs/concepts/imports#importing-users"},"operationId":"import-users","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"JSON array file with users","format":"binary"}}}}}},"responses":{"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"}}}},"202":{"description":"Import job accepted","content":{"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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"application/vnd.chatkitty.v1+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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/202"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}}}}},"security":[{"application_authorization":["create:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/imports/users' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'file=@users_import_file.json;type=application/json\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nconst file = new File(\n    ['[{name:\"jane@chatkitty.com\",displayName:\"JaneDoe\",isGuest:false,properties:{favoriteNumber:42}}]'],\n    \"import.json\",\n    {\n      type: \"application/json\"\n    })\n\n\nawait chatkitty.Imports.importUsers(file)\n"}]}},"/jobs":{"get":{"tags":["jobs"],"summary":"List jobs","description":"Returns a page of jobs created for this application","operationId":"list-jobs","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"running","in":"query","description":"Filters for jobs currently running","required":false,"schema":{"type":"boolean"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelApplicationJobResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelApplicationJobResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelApplicationJobResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelApplicationJobResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelApplicationJobResource"}}}}},"security":[{"application_authorization":["read:job"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/jobs' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Jobs.listJobs()\n"}]}},"/jobs/{id}":{"get":{"tags":["jobs"],"summary":"Retrieve a job","description":"Returns a job by ID","operationId":"retrieve-job","parameters":[{"name":"id","in":"path","description":"Job ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ApplicationJobResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationJobResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationJobResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationJobResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationJobResource"}}}}},"security":[{"application_authorization":["read:job"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/jobs/1' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Jobs.retrieveJob(1)\n"}]}},"/messages":{"get":{"tags":["messages"],"summary":"List messages","description":"Returns a page of messages belonging to this application","operationId":"list-messages","parameters":[{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","description":"Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"next","in":"query","description":"Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"relation","in":"query","description":"Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"string","enum":["SELF","PREVIOUS","NEXT"]}},{"name":"username","in":"query","description":"Filters messages by a sender's username","required":false,"schema":{"type":"string"}},{"name":"query","in":"query","description":"Filters text messages by text contained in the message body","required":false,"schema":{"type":"string"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}}}}},"security":[{"application_authorization":["read:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request  'GET' \\\n  'https://api.chatkitty.com/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Messages.listMessages()\n"}]},"delete":{"tags":["messages"],"summary":"Delete messages","description":"Deletes all messages belonging to this application","operationId":"delete-messages","responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}}}}},"security":[{"application_authorization":["read:message","delete:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Messages.deleteMessages()\n"}]}},"/messages/{id}":{"get":{"tags":["messages"],"summary":"Retrieve a message","description":"Returns a message by ID","operationId":"retrieve-message","parameters":[{"name":"id","in":"path","description":"Message ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}}}}},"security":[{"application_authorization":["read:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/messages/44902' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Messages.retrieveMessage(44902)\n"}]},"delete":{"tags":["messages"],"summary":"Delete a message","description":"Deletes a message by ID","operationId":"delete-message","parameters":[{"name":"id","in":"path","description":"Message ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}}}}},"security":[{"application_authorization":["read:message","delete:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/messages/67528' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Messages.deleteMessage(67528)\n\n"}]},"patch":{"tags":["messages"],"summary":"Update a message","description":"Updates a message properties","operationId":"update-message","parameters":[{"name":"id","in":"path","description":"Message ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json+merge-patch":{"schema":{"$ref":"#/components/schemas/JsonMergePatch"}}}},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}}}}},"security":[{"application_authorization":["read:message","update:message"]}],"x-codeSamples":[]}},"/messages/{id}/read-receipts":{"get":{"tags":["messages"],"summary":"List message read receipts","description":"Returns a page of read receipts for this message","operationId":"list-message-read-receipts","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageReadReceiptResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageReadReceiptResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageReadReceiptResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageReadReceiptResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelMessageReadReceiptResource"}}}}},"security":[{"application_authorization":["read:message","read:read_receipt"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/messages/1/read-receipts?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Messages.listMessageReadReceipts(1)\n\n"}]}},"/runtimes/nodejs":{"get":{"tags":["runtime"],"summary":"Retrieve NodeJS chat runtime","description":"Return this application's NodeJS chat runtime","operationId":"retrieve-nodejs-runtime","responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}}}}},"security":[{"application_authorization":["read:runtime","update:runtime"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/runtimes/nodejs' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Runtime.retrieveNodejsRuntime()\n\n"}]}},"/runtimes/nodejs/dependencies":{"put":{"tags":["runtime"],"summary":"Update NodeJS chat runtime NPM dependencies","description":"Updates the NPM dependencies for this application's NodeJS chat runtime","operationId":"update-nodejs-runtime-dependencies","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatRuntimeDependencyProperties"}}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}}}}},"security":[{"application_authorization":["read:runtime","update:runtime"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'PUT' \\\n  'https://api.chatkitty.com/runtimes/nodejs/dependencies' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '[\n  {\n    \"name\": \"firebase\",\n    \"version\": \"^9.8.2\"\n  }\n]'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait  chatkitty.Runtime.updateNodejsRuntimeDependencies([\n  {\n    \"name\": \"firebase\",\n    \"version\": \"^9.8.2\"\n  }\n])\n"}]}},"/runtimes/nodejs/environment-variables":{"put":{"tags":["runtime"],"summary":"Update NodeJS chat runtime environment variables","description":"Updates the runtime environment variables of this application's NodeJS chat runtime","operationId":"update-nodejs-runtime-environment-variables","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeEnvironmentVariablesProperties"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}}}}},"security":[{"application_authorization":["read:runtime","update:runtime"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'PUT' \\\n  'https://api.chatkitty.com/runtimes/nodejs/environment-variables' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"CUSTOM_ENV_AWS_REGION\": \"us-east-1\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Runtime.updateNodejsRuntimeEnvironmentVariables({\n  \"CUSTOM_ENV_AWS_REGION\": \"us-east-1\"\n})\n"}]}},"/runtimes/nodejs/functions":{"get":{"tags":["runtime"],"summary":"List NodeJS chat runtime functions","description":"Returns a page of functions for this application's NodeJS chat runtime","operationId":"list-nodejs-runtime-functions","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatFunctionResource"}}}}},"security":[{"application_authorization":["read:runtime","read:function"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/runtimes/nodejs/functions?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Runtime.listNodejsRuntimeFunctions()\n\n"}]},"post":{"tags":["runtime"],"summary":"Create a NodeJS chat runtime function","description":"Creates a NodeJS chat function for this runtime","operationId":"create-nodejs-runtime-function","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CreateChatFunctionResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatFunctionResource"}}}}},"security":[{"application_authorization":["read:runtime","read:function"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/runtimes/nodejs/functions' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"user.attempted.start_session\",\n  \"name\": \"User Attempted Start Session\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\n\nawait chatkitty.Runtime.createNodejsRuntimeFunction({\n  \"type\": \"user.attempted.start_session\",\n  \"name\": \"User Attempted Start Session\"\n})\n\n"}]}},"/runtimes/nodejs/initialization-script":{"put":{"tags":["runtime"],"summary":"Update NodeJS chat runtime initialization script","description":"Updates the initialization script for this application's NodeJS chat runtime","operationId":"update-nodejs-runtime-initialization-script","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeScriptProperties"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatRuntimeResource"}}}}},"security":[{"application_authorization":["read:runtime","update:runtime"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'PUT' \\\n  'https://api.chatkitty.com/runtimes/nodejs/initialization-script' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"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 };\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Runtime.updateNodejsRuntimeInitializationScript({\n  \"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 };\"\n})\n"}]}},"/threads/{id}":{"get":{"tags":["threads"],"summary":"Retrieve a thread","description":"Returns a thread by ID","operationId":"retrieve-thread","parameters":[{"name":"id","in":"path","description":"Reply thread ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadResource"}}}}},"security":[{"application_authorization":["read:thread"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/threads/67528' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Threads.retrieveThread(67528)\n\n"}]}},"/threads/{id}/keystrokes":{"post":{"tags":["threads"],"summary":"Send thread keystrokes","description":"Sends keystrokes in this thread on behalf of a user","operationId":"send-thread-keystrokes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDelegatedReplyThreadKeystrokesResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ReplyThreadKeystrokesResource"}}}}},"security":[{"application_authorization":["read:thread","read:user","create:keystrokes"]}],"x-codeSamples":[]}},"/threads/{id}/messages":{"get":{"tags":["threads"],"summary":"List reply thread messages","description":"Returns a page of replies sent in this thread","operationId":"list-thread-messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","description":"Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"next","in":"query","description":"Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"relation","in":"query","description":"Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"string","enum":["SELF","PREVIOUS","NEXT"]}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}}}}},"security":[{"application_authorization":["read:thread","read:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/threads/1/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Threads.listThreadMessages(1)\n"}]},"post":{"tags":["threads"],"summary":"Send a reply thread message","description":"Sends a reply message in this thread as the system or on behalf of a user","operationId":"send-thread-message","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":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"},"groupTag":{"type":"string"},"properties":{"type":"string"}}}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/MessageResource"}}}}},"security":[{"application_authorization":["read:thread","read:user","create:message"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/threads/44902/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"TEXT\",\n  \"body\": \"🌞\",\n\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Threads.sendThreadMessage(44902, {\n  \"type\": \"TEXT\",\n  \"body\": \"🌞\",\n\n})\n"}]}},"/user-sessions":{"get":{"tags":["user-sessions"],"summary":"List user sessions","description":"Returns a page of user sessions belonging to this application","operationId":"list-user-sessions","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"state","in":"query","description":"Filters by state","required":false,"schema":{"type":"string","enum":["ACTIVE","ENDED"]}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserSessionResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserSessionResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserSessionResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserSessionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserSessionResource"}}}}},"security":[{"application_authorization":["read:user_session"]}],"x-codeSamples":[]}},"/users":{"get":{"tags":["users"],"summary":"List users","description":"Returns a page of users belonging to this application","operationId":"list-users","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"name","in":"query","description":"Filters by username","required":false,"schema":{"type":"string"}},{"name":"unread","in":"query","description":"Filters by unread","required":false,"schema":{"type":"boolean"}},{"name":"properties","in":"query","description":"Filters by user custom properties","required":false,"schema":{"type":"string"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChatUserResource"}}}}},"security":[{"application_authorization":["read:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/users?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.listUsers()\n"}]},"post":{"tags":["users"],"summary":"Create a user","description":"Creates a new user","operationId":"create-user","requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CreatePersonChatUserResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["create:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/users' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"jane@chatkitty.com\",\n  \"displayName\": \"Jane Doe\",\n  \"isGuest\": false,\n  \"properties\": {\n    \"favoriteNumber\": 42\n  }\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.createUser({\n  \"name\": \"jane@chatkitty.com\",\n  \"displayName\": \"Jane Doe\",\n  \"isGuest\": false,\n  \"properties\": {\n    \"favoriteNumber\": 42\n  }\n})\n"}]},"head":{"tags":["users"],"summary":"Check a user exists","description":"Checks if a user exists","operationId":"check-user-exists","parameters":[{"name":"name","in":"query","description":"Username of the user","required":true,"schema":{"type":"string"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"type":"object","description":"Empty object"}},"application/json":{"schema":{"type":"object","description":"Empty object"}},"application/vnd.chatkitty.v1+json":{"schema":{"type":"object","description":"Empty object"}},"application/vnd.hal+json":{"schema":{"type":"object","description":"Empty object"}},"application/hal+json":{"schema":{"type":"object","description":"Empty object"}}}}},"security":[{"application_authorization":["read:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'HEAD' \\\n  'https://api.chatkitty.com/users?name=Jane%20Doe' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.checkUserExists(\"Jane Doe\")\n"}]}},"/users/{id}":{"get":{"tags":["users"],"summary":"Retrieve a user","description":"Returns a user by ID","operationId":"retrieve-user","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["read:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/users/1' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.retrieveUser(1)\n"}]},"delete":{"tags":["users"],"summary":"Delete a user","description":"Deletes a user","operationId":"delete-user","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApplicationResource"}}}}},"security":[{"application_authorization":["read:user","delete:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/users/1' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.deleteUser(1)\n"}]},"patch":{"tags":["users"],"summary":"Update a user","description":"Updates a user","operationId":"update-user","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json+merge-patch":{"schema":{"$ref":"#/components/schemas/JsonMergePatch"}}}},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["read:user","update:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'PATCH' \\\n  'https://api.chatkitty.com/users/1' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json+merge-patch' \\\n  -d '{\n  \"displayName\": \"Jane Doe\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.updateUser(1)\n"}]}},"/users/{id}/channels":{"get":{"tags":["users"],"summary":"List a user's channels","description":"Returns a page of channels for this user created or joined","operationId":"list-user-channels","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":25}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelChannelResource"}}}}},"security":[{"application_authorization":["read:user","read:channels"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/users/1/channels?page=0&size=25' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.listUserChannels(1)\n"}]}},"/users/{id}/display-picture":{"post":{"tags":["users"],"summary":"Update a user's display picture","description":"Updates a user's display picture","operationId":"update-user-display-picture","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExternalFileProperties"}},"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["read:user","update:user"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'POST' \\\n  'https://api.chatkitty.com/users/1/display-picture' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"url\": \"https://example.com/files/jane.png\",\n  \"name\": \"jane.png\",\n  \"contentType\": \"image/png\",\n  \"size\": 32768\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.updateUserDisplayPicture(1, {\n  \"url\": \"https://example.com/files/jane.png\",\n  \"name\": \"jane.png\",\n  \"contentType\": \"image/png\",\n  \"size\": 32768\n})\n"}]}},"/users/{id}/messages":{"get":{"tags":["users"],"summary":"List a user's messages","description":"Returns a page of messages for a user","operationId":"list-user-messages","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","description":"Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"next","in":"query","description":"Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"relation","in":"query","description":"Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"string","enum":["SELF","PREVIOUS","NEXT"]}},{"name":"unread","in":"query","description":"Filters by returning unread messages","required":false,"schema":{"type":"boolean"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelMessageResource"}}}}},"security":[{"application_authorization":["read:user","read:channels"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/users/1/messages' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.listUserMessages(1)\n"}]}},"/users/{id}/messages/unread/count":{"get":{"tags":["users"],"summary":"Counts the number of unread messages for a user","description":"Returns a count of unread messages for this user","operationId":"count-user-unread-messages","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CountResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/CountResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/CountResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/CountResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CountResource"}}}}},"security":[{"application_authorization":["read:user","read:messages"]}],"x-codeSamples":[]}},"/users/{id}/notifications":{"get":{"tags":["users"],"summary":"List a user's notifications","description":"Returns a page of notifications received by this user","operationId":"list-user-notifications","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"start","in":"query","description":"Start cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"next","in":"query","description":"Next page cursor value. Do not set manually. Provided by the Platform API pagination engine to fetch subsequent pages","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"relation","in":"query","description":"Page cursor relation. Do not set manually. Provided by the Platform API pagination engine to fetch previous or next pages","required":false,"schema":{"type":"string","enum":["SELF","PREVIOUS","NEXT"]}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelNotificationResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelNotificationResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelNotificationResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelNotificationResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CursorPagedModelNotificationResource"}}}}},"security":[{"application_authorization":["read:user","read:notifications"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/users/1/notifications' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.listUserNotifications(1)\n"}]}},"/users/{id}/secrets/{name}":{"get":{"tags":["users"],"summary":"Retrieve a user secret","description":"Returns a user secret","operationId":"retrieve-user-secret","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"name","in":"path","description":"The secret's name","required":true,"schema":{"type":"string"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/SecretResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/SecretResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/SecretResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/SecretResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SecretResource"}}}}},"security":[{"application_authorization":["read:user_secret"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'GET' \\\n  'https://api.chatkitty.com/users/1/secrets/Secret%20Name' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.retrieveUserSecret(1,\"Secret Name\")\n"}]},"put":{"tags":["users"],"summary":"Set a user secret","description":"Sets a user secret's value","operationId":"set-user-secret","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"name","in":"path","description":"The secret's name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/SecretResource"}}},"required":true},"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["read:user","update:user_secret"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'PUT' \\\n  'https://api.chatkitty.com/users/1/secrets/Jane%20Doe' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"secret\": \"My secret is... well, I'\\''d never tell.\"\n}'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.setUserSecret(1, \"Jane Doe\", {\n  \"secret\": \"My secret is... well, I'd never tell.\"\n})\n"}]},"delete":{"tags":["users"],"summary":"Remove a user secret","description":"Removes a user secret's value","operationId":"remove-user-secret","parameters":[{"name":"id","in":"path","description":"User ID","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"name","in":"path","description":"The secret's name","required":true,"schema":{"type":"string"}}],"responses":{"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"}}}},"200":{"description":"OK","content":{"application/vnd.chatkitty+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.chatkitty.v1+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/vnd.hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChatUserResource"}}}}},"security":[{"application_authorization":["read:user","delete:user_secret"]}],"x-codeSamples":[{"lang":"cURL","source":"curl --location --request 'DELETE' \\\n  'https://api.chatkitty.com/users/1/secrets/Secret%20Name' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer ACCESS-TOKEN'\n"},{"lang":"JavaScript","source":"// npm install chatkitty\n\nconst chatkitty = new ChatKitty({\n  clientId: 'CLIENT-ID',\n  clientSecret: 'CLIENT-SECRET'\n})\n\nawait chatkitty.Users.removeUserSecret(1,\"Secret Name\")\n"}]}}},"components":{"schemas":{"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"}}},"AuthenticationError":{"required":["error","error_description"],"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}}},"SecretResource":{"type":"object","properties":{"secret":{"type":"object","description":"Secret value"}},"example":{"secret":"My secret is... well, I'd never tell."}},"ChatUserPresenceProperties":{"required":["online","status"],"type":"object","properties":{"online":{"type":"boolean","description":"True if this user has an active user session"},"status":{"type":"string","description":"The availability status of this user"}},"description":"Presence status of this user"},"ChatUserProperties":{"required":["display_name","display_picture_url","id","isGuest","name","presence","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"Type of user","enum":["PERSON","BOT"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"call_status":{"type":"string","description":"Call presence status of this user","enum":["AVAILABLE","IN_CALL"]},"display_name":{"type":"string","description":"Human readable name of this user. Shown to other users"},"display_picture_url":{"type":"string","description":"URL for this user's display picture"},"isGuest":{"type":"boolean","description":"True if this user was created by a guest user session"},"name":{"type":"string","description":"The unique name used to identify this user across ChatKitty. Also known as username"},"presence":{"$ref":"#/components/schemas/ChatUserPresenceProperties"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this user"},"description":"Custom data associated with this user"}}},"ChatUserResource":{"required":["display_name","display_picture_url","id","isGuest","name","presence","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"Type of user","enum":["PERSON","BOT"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"call_status":{"type":"string","description":"Call presence status of this user","enum":["AVAILABLE","IN_CALL"]},"display_name":{"type":"string","description":"Human readable name of this user. Shown to other users"},"display_picture_url":{"type":"string","description":"URL for this user's display picture"},"isGuest":{"type":"boolean","description":"True if this user was created by a guest user session"},"name":{"type":"string","description":"The unique name used to identify this user across ChatKitty. Also known as username"},"presence":{"$ref":"#/components/schemas/ChatUserPresenceProperties"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this user"},"description":"Custom data associated with this user"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"id":1,"type":"PERSON","name":"jane@chatkitty.com","displayName":"Jane Doe","displayPictureUrl":"https://api.chatkitty.com/picture/jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/1"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/1/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/1/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/1/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"Link":{"type":"object","properties":{"href":{"type":"string"},"hreflang":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"deprecation":{"type":"string"},"profile":{"type":"string"},"name":{"type":"string"},"templated":{"type":"boolean"}}},"ChatRuntimeScriptProperties":{"required":["script"],"type":"object","properties":{"script":{"type":"string","description":"The JavaScript/TypeScript source of this script"}},"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":{"required":["default_dependency","name","version"],"type":"object","properties":{"default_dependency":{"type":"boolean","description":"True if this NPM package is automatically installed by ChatKitty and available by default in your chat functions"},"name":{"type":"string","description":"The name of the dependency NPM package"},"version":{"type":"string","description":"The version of the NPM package"}},"description":"The NPM dependencies version of this runtime","example":{"name":"firebase","version":"^9.8.2"}},"ChatRuntimeEnvironmentVariablesProperties":{"type":"object","additionalProperties":{"type":"string","description":"Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime"},"description":"Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime","example":{"CUSTOM_ENV_AWS_REGION":"us-east-1"}},"ChatRuntimeProperties":{"required":["dependencies","environment_variables","id","type","version"],"type":"object","properties":{"type":{"type":"string","description":"The type of this runtime. Always NODEJS","enum":["NODEJS"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"dependencies":{"type":"array","description":"The NPM dependencies version of this runtime","items":{"$ref":"#/components/schemas/ChatRuntimeDependencyProperties"}},"environment_variables":{"type":"object","additionalProperties":{"type":"string","description":"Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime"},"description":"Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime"},"initialization_script":{"$ref":"#/components/schemas/ChatRuntimeScriptProperties"},"version":{"type":"string","description":"The semantic version of this runtime"}},"example":{"id":1,"type":"NODEJS","version":"v0.0.29","dependencies":[{"name":"axios","version":"^0.19.2","defaultDependency":true},{"name":"axios-token-interceptor","version":"^0.2.0","defaultDependency":true},{"name":"chatkitty","version":"1.0.1","defaultDependency":true},{"name":"qs","version":"6.9.4","defaultDependency":true},{"name":"firebase","version":"^9.8.2","defaultDependency":false}],"initializationScript":{"script":"var foo = 8;"},"environmentVariables":{"CHATKITTY_CLIENT_SECRET":"34e65736-70c2-4d30-b80a-8ad9887c860b","CHATKITTY_CLIENT_ID":"19b458d0-2b50-491c-8f13-65ec12f3978e","CHATKITTY_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":{"type":{"type":"string","description":"The type of this runtime. Always NODEJS","enum":["NODEJS"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"dependencies":{"type":"array","description":"The NPM dependencies version of this runtime","items":{"$ref":"#/components/schemas/ChatRuntimeDependencyProperties"}},"environment_variables":{"type":"object","additionalProperties":{"type":"string","description":"Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime"},"description":"Environment variable set for this runtime. Accessible in the initialization script and chat functions associated with this runtime"},"initialization_script":{"$ref":"#/components/schemas/ChatRuntimeScriptProperties"},"version":{"type":"string","description":"The semantic version of this runtime"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"id":1,"type":"NODEJS","version":"v0.0.29","dependencies":[{"name":"axios","version":"^0.19.2","defaultDependency":true},{"name":"axios-token-interceptor","version":"^0.2.0","defaultDependency":true},{"name":"chatkitty","version":"1.0.1","defaultDependency":true},{"name":"qs","version":"6.9.4","defaultDependency":true},{"name":"firebase","version":"^9.8.2","defaultDependency":false}],"initializationScript":{"script":"var foo = 8;"},"environmentVariables":{"CHATKITTY_CLIENT_SECRET":"34e65736-70c2-4d30-b80a-8ad9887c860b","CHATKITTY_CLIENT_ID":"19b458d0-2b50-491c-8f13-65ec12f3978e","CHATKITTY_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/applications/1/runtimes/nodejs"},"dependencies":{"href":"https://api.chatkitty.com/applications/1/runtimes/nodejs/dependencies"},"initializationScript":{"href":"https://api.chatkitty.com/applications/1/runtimes/nodejs/initialization-script"},"functions":{"href":"https://api.chatkitty.com/applications/1/runtimes/nodejs/functions"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"ApplicationSettingsProperties":{"required":["guest_users","user_created_channels"],"type":"object","properties":{"guest_users":{"type":"string","description":"Toggle state of this settings option","enum":["DISABLED","ENABLED"]},"user_created_channels":{"type":"string","description":"Toggle state of this settings option","enum":["DISABLED","ENABLED"]}}},"ApplicationSettingsResource":{"required":["guest_users","user_created_channels"],"type":"object","properties":{"guest_users":{"type":"string","description":"Toggle state of this settings option","enum":["DISABLED","ENABLED"]},"user_created_channels":{"type":"string","description":"Toggle state of this settings option","enum":["DISABLED","ENABLED"]},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"features":{"guest_users":"ENABLED","user_created_channels":"DISABLED"}}},"ApplicationFeatureSettingsProperties":{"required":["guest_users","user_created_channels"],"type":"object","properties":{"guest_users":{"type":"string","description":"Toggle state of this settings option","enum":["DISABLED","ENABLED"]},"user_created_channels":{"type":"string","description":"Toggle state of this settings option","enum":["DISABLED","ENABLED"]}},"description":"Application features that are enabled or disabled"},"CreateExternalFileProperties":{"required":["content_type","name","size","url"],"type":"object","properties":{"content_type":{"type":"string","description":"File MIME content type"},"name":{"type":"string","description":"File name"},"size":{"type":"integer","description":"File size in bytes","format":"int64"},"url":{"type":"string","description":"External file URL"}},"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":{"type":"string","description":"Human readable name of this user. Shown to other users"},"is_guest":{"type":"boolean","description":"True if this user was created by a guest user session"},"name":{"type":"string","description":"The unique name used to identify this user across ChatKitty. Also known as username"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this user"},"description":"Custom data associated with this user"}},"example":{"name":"jane@chatkitty.com","displayName":"Jane Doe","isGuest":false,"properties":{"favoriteNumber":42}}},"ChannelMessageMentionProperties":{"required":["channel","end_position","start_position","tag","type"],"type":"object","description":"A channel mention","allOf":[{"$ref":"#/components/schemas/MessageMentionProperties"},{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/MessageMentionChannelProperties"}}}]},"ChatUserMessageMentionProperties":{"required":["end_position","start_position","tag","type","user"],"type":"object","description":"A user mention","allOf":[{"$ref":"#/components/schemas/MessageMentionProperties"},{"type":"object","properties":{"user":{"$ref":"#/components/schemas/ChatUserProperties"}}}]},"EmojiProperties":{"required":["aliases","character","description","tags"],"type":"object","properties":{"aliases":{"uniqueItems":true,"type":"array","description":"List of possible aliases for this emoji","items":{"type":"string","description":"List of possible aliases for this emoji"}},"character":{"type":"string","description":"The unicode character of this emoji"},"description":{"type":"string","description":"Description of this emoji"},"tags":{"uniqueItems":true,"type":"array","description":"Tags used to describe this emoji","items":{"type":"string","description":"Tags used to describe this emoji"}}},"description":"The emoji these users reacted with"},"FileChatUserMessageProperties":{"required":["channel_id","created_time","file","id","nested_level","properties","type","user"],"type":"object","description":"A file message sent by or behalf of a user","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":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"file":{"$ref":"#/components/schemas/FileProperties"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/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/applications/1/messages/44904"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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":{"required":["content_type","name","size","type","url"],"type":"object","properties":{"type":{"type":"string","description":"The type of this file. Either external or hosted by ChatKitty","enum":["HOSTED","EXTERNAL"]},"content_type":{"type":"string","description":"The mime type of this file"},"name":{"type":"string","description":"The file name"},"size":{"type":"integer","description":"The size of this file in bytes","format":"int64"},"url":{"type":"string","description":"The file URL"}},"description":"The file data of this message"},"FileSystemMessageProperties":{"required":["channel_id","created_time","file","id","nested_level","properties","type"],"type":"object","description":"A file message sent by this application itself. Used for systems announcements independent of any user","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":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"file":{"$ref":"#/components/schemas/FileProperties"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/messages/44905"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"MessageLinkPreviewImageProperties":{"required":["source"],"type":"object","properties":{"source":{"type":"string","description":"The url source of this image"}},"description":"Image data of this link preview"},"MessageLinkPreviewProperties":{"required":["image","title","url"],"type":"object","properties":{"description":{"type":"string","description":"Description of this link preview"},"image":{"$ref":"#/components/schemas/MessageLinkPreviewImageProperties"},"site_name":{"type":"string","description":"The name of the site linked"},"title":{"type":"string","description":"The title of this link"},"url":{"type":"string","description":"The URL of the link being previewed"}},"description":"Embedded link preview data"},"MessageLinkProperties":{"required":["end_position","source","start_position"],"type":"object","properties":{"end_position":{"type":"integer","description":"The ending index of this link within the message","format":"int32"},"preview":{"$ref":"#/components/schemas/MessageLinkPreviewProperties"},"source":{"type":"string","description":"The href of the URL this message link represents"},"start_position":{"type":"integer","description":"The starting index of this link within the message","format":"int32"}},"description":"Link previews in this message"},"MessageMentionChannelProperties":{"required":["created_time","id","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this channel was created","format":"date-time"},"creator":{"$ref":"#/components/schemas/ChatUserProperties"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users. Present if this is a group channel"},"name":{"type":"string","description":"The unique name of this channel used to reference the channel. Present if this is a group channel"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"}},"description":"Channel properties embedded in channel mentions"},"MessageMentionProperties":{"required":["end_position","start_position","tag","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this message mention","enum":["CHANNEL","USER"]},"end_position":{"type":"integer","description":"The ending position of this mention reference inside its message","format":"int32"},"start_position":{"type":"integer","description":"The starting position of this mention reference inside its message","format":"int32"},"tag":{"type":"string","description":"The literal text referencing the mentioned entity inside the message"}},"description":"Mentions in this message","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":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","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":{"required":["count","emoji","users"],"type":"object","properties":{"count":{"type":"integer","description":"The number of users that reacted with this emoji","format":"int64"},"emoji":{"$ref":"#/components/schemas/EmojiProperties"},"users":{"type":"array","description":"The users that reacted with this emoji","items":{"$ref":"#/components/schemas/ChatUserProperties"}}},"description":"Reactions to this message"},"MessageResource":{"required":["channel_id","created_time","id","nested_level","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T20:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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":{"required":["body","channel_id","created_time","id","nested_level","properties","type","user"],"type":"object","description":"A text message sent by or behalf of a user","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":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"body":{"type":"string","description":"The text body of this message"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"links":{"type":"array","description":"Link previews in this message","items":{"$ref":"#/components/schemas/MessageLinkProperties"}},"mentions":{"type":"array","description":"Mentions in this message","items":{"$ref":"#/components/schemas/MessageMentionProperties"}},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T20:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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":{"type":"string","description":"The text body of this message"},"links":{"type":"array","description":"Link previews in this message","items":{"$ref":"#/components/schemas/MessageLinkProperties"}},"mentions":{"type":"array","description":"Mentions in this message","items":{"$ref":"#/components/schemas/MessageMentionProperties"}}}}]},"TextSystemMessageProperties":{"required":["body","channel_id","created_time","id","nested_level","properties","type"],"type":"object","description":"A text message sent by this application itself. Used for systems announcements independent of any user","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":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"body":{"type":"string","description":"The text body of this message"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"links":{"type":"array","description":"Link previews in this message","items":{"$ref":"#/components/schemas/MessageLinkProperties"}},"mentions":{"type":"array","description":"Mentions in this message","items":{"$ref":"#/components/schemas/MessageMentionProperties"}},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/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/applications/1/messages/44903"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"ChatUserIdReference":{"required":["id"],"type":"object","description":"Reference to a user by ID","allOf":[{"$ref":"#/components/schemas/ChatUserReference"},{"type":"object","properties":{"id":{"type":"integer","description":"User ID associated with this user ","format":"int64"}}}]},"ChatUserReference":{"type":"object","description":"Reference to a user","example":{"username":"jane@chatkitty.com"}},"ChatUserUsernameReference":{"required":["username"],"type":"object","description":"Reference to a user by username","allOf":[{"$ref":"#/components/schemas/ChatUserReference"},{"type":"object","properties":{"username":{"type":"string","description":"Username associated with this user"}}}]},"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":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"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":{"type":"string","description":"The text body of this message"}}}]},"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":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}}},"CreateChatFunctionResource":{"required":["initialize_asynchronously","name","type"],"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"initialize_asynchronously":{"type":"boolean"},"name":{"type":"string"}},"example":{"type":"user.attempted.start_session","name":"User Attempted Start Session"}},"ChatFunctionChatRuntimeProperties":{"required":["id","type","version"],"type":"object","properties":{"type":{"type":"string","description":"The type of this runtime. Always NODEJS","enum":["NODEJS"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"version":{"type":"string","description":"The semantic version of this runtime"}},"description":"The runtime this function executes on. Always a NodeJS runtime"},"ChatFunctionResource":{"required":["current_version_number","enabled","id","name","runtime","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this function"},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"current_version_number":{"type":"integer","description":"The current version number of this function. Incremented every time a new version is deployed","format":"int64"},"description":{"type":"string","description":"Optional description of this function"},"enabled":{"type":"boolean","description":"True if this function is enabled"},"name":{"type":"string","description":"The name of this function"},"runtime":{"$ref":"#/components/schemas/ChatFunctionChatRuntimeProperties"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"id":1,"type":"user.attempted.start_session","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Attempted Start Session","enabled":true,"currentVersionNumber":34,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/1"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/1/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"ApplicationJobResource":{"required":["created_time","id","state","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of application job","enum":["CHANNEL_IMPORT","CHANNEL_MEMBERS_IMPORT","MESSAGE_IMPORT","USER_IMPORT","MESSAGE_ANALYTICS_EXPORT"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","format":"date-time"},"ended_time":{"type":"string","format":"date-time"},"file":{"type":"string"},"state":{"type":"string","description":"The running state of an application job","enum":["PENDING","RUNNING","FINISHED","FAILED"]},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"CreateChatFunctionVersionResource":{"required":["handler_script"],"type":"object","properties":{"handler_script":{"type":"string","description":"JavaScript/TypeScript code that runs when this function is executed"}},"example":{"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}"}},"ChatFunctionVersionResource":{"required":["handler_script","id","version_number"],"type":"object","properties":{"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"handler_script":{"type":"string","description":"JavaScript/TypeScript code that runs when this function is executed"},"version_number":{"type":"integer","description":"The version number of this function version. Incremented from the previous version","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"id":13515,"versionNumber":34,"handlerScript":"const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    logs.push('Hello ' + event.username);\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return logs;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/13515"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"ChannelProperties":{"required":["created_time","id","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this channel was created","format":"date-time"},"creator":{"$ref":"#/components/schemas/ChatUserProperties"},"last_received_message":{"$ref":"#/components/schemas/MessageProperties"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"}},"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":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this channel was created","format":"date-time"},"creator":{"$ref":"#/components/schemas/ChatUserProperties"},"last_received_message":{"$ref":"#/components/schemas/MessageProperties"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/channels/55913"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55913/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55913/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55913/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55913/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55913/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55913/moderators"},"application":{"href":"https://api.chatkitty.com/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":{"required":["created_time","id","members","properties","type"],"type":"object","description":"A direct channel","allOf":[{"$ref":"#/components/schemas/ChannelProperties"},{"type":"object","properties":{"members":{"type":"array","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)","items":{"$ref":"#/components/schemas/ChatUserProperties"}}}}]},"DirectChannelResource":{"required":["created_time","id","members","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this channel was created","format":"date-time"},"creator":{"$ref":"#/components/schemas/ChatUserProperties"},"last_received_message":{"$ref":"#/components/schemas/MessageProperties"},"members":{"type":"array","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)","items":{"$ref":"#/components/schemas/ChatUserProperties"}},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/picture/Jake","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"members":[{"id":2,"type":"PERSON","name":"aaron","displayName":"aaron","displayPictureUrl":"https://api.chatkitty.com/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/picture/Jake","presence":{"status":"UNAVAILABLE","online":false},"properties":{}}],"properties":{},"createdTime":"2021-05-18T20:40:29.472Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/channels/19354"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/19354/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/19354/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/19354/events"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"PrivateChannelProperties":{"required":["created_time","display_name","id","name","properties","type"],"type":"object","description":"A private channel","allOf":[{"$ref":"#/components/schemas/GroupChannelProperties"},{"$ref":"#/components/schemas/ChannelProperties"}]},"PrivateChannelResource":{"required":["created_time","display_name","id","name","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this channel was created","format":"date-time"},"creator":{"$ref":"#/components/schemas/ChatUserProperties"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users"},"last_received_message":{"$ref":"#/components/schemas/MessageProperties"},"name":{"type":"string","description":"The unique name of this channel used to reference the channel"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/channels/55914"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55914/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55914/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55914/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55914/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55914/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55914/moderators"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"PublicChannelProperties":{"required":["created_time","display_name","id","name","properties","type"],"type":"object","description":"A public channel","allOf":[{"$ref":"#/components/schemas/GroupChannelProperties"},{"$ref":"#/components/schemas/ChannelProperties"}]},"PublicChannelResource":{"required":["created_time","display_name","id","name","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this channel","enum":["DIRECT","PUBLIC","PRIVATE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this channel was created","format":"date-time"},"creator":{"$ref":"#/components/schemas/ChatUserProperties"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users"},"last_received_message":{"$ref":"#/components/schemas/MessageProperties"},"name":{"type":"string","description":"The unique name of this channel used to reference the channel"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/channels/55913"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55913/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55913/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55913/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55913/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55913/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55913/moderators"},"application":{"href":"https://api.chatkitty.com/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":{"type":"string","description":"The time this invite was created","format":"date-time"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"createdTime":"2022-06-02T16:51:03.206366286Z","_links":{"invitee":{"href":"https://api.chatkitty.com/applications/1/users/1054"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"CreateChannelGenericEventResource":{"required":["properties","type"],"type":"object","properties":{"type":{"type":"string","description":"Custom type of this event"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this event"},"description":"Custom data associated with this event"}},"example":{"type":"My Custom Event","properties":{"payload":"Boom!","stuff":{"favoriteNumber":42,"favoriteMovie":"Lilo and Stitch"}}}},"ChannelGenericEventResource":{"required":["properties","type"],"type":"object","properties":{"type":{"type":"string","description":"Custom type of this event"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this event"},"description":"Custom data associated with this event"},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1"}}}},"CreateChannelResource":{"required":["type"],"type":"object","properties":{"type":{"type":"string"},"creator":{"$ref":"#/components/schemas/ChatUserReference"},"members":{"uniqueItems":true,"type":"array","description":"List of user references of members of this channel","items":{"$ref":"#/components/schemas/ChatUserReference"}},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"}},"discriminator":{"propertyName":"type","mapping":{"PUBLIC":"#/components/schemas/CreatePublicChannelResource","PRIVATE":"#/components/schemas/CreatePrivateChannelResource","DIRECT":"#/components/schemas/CreateDirectChannelResource"}}},"CreateDirectChannelResource":{"required":["members"],"type":"object","description":"Creates a direct channel","example":{"type":"DIRECT","members":[{"username":"jane@chatkitty.com"},{"username":"john@chatkitty.com"}]},"allOf":[{"$ref":"#/components/schemas/CreateChannelResource"}]},"CreateGroupChannelResource":{"type":"object","allOf":[{"$ref":"#/components/schemas/CreateChannelResource"},{"type":"object","properties":{"name":{"type":"string","description":"The unique name of this channel used to reference the channel. If absent defaults to a random UUID"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users. If absent defaults to the channel name"}}}]},"CreatePrivateChannelResource":{"type":"object","description":"Creates a private channel","example":{"type":"PRIVATE","name":"b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7"},"allOf":[{"$ref":"#/components/schemas/CreateGroupChannelResource"},{"$ref":"#/components/schemas/CreateChannelResource"}]},"CreatePublicChannelResource":{"type":"object","description":"Creates a public channel","example":{"type":"PUBLIC","name":"b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7"},"allOf":[{"$ref":"#/components/schemas/CreateGroupChannelResource"},{"$ref":"#/components/schemas/CreateChannelResource"}]},"JsonMergePatch":{"type":"object"},"ApplicationSentSystemMessageNotificationData":{"required":["channel_id","message","type"],"type":"object","properties":{"type":{"type":"string"},"channel_id":{"type":"integer","description":"The ID channel the message was sent. Deprecated: Use the channel property of this notification","format":"int64","deprecated":true},"message":{"$ref":"#/components/schemas/SystemMessageResource"}},"description":"Sent when a system message is sent"},"ChatUserMentionedChannelNotificationData":{"required":["channel_id","mentioned_channel","message","type"],"type":"object","properties":{"type":{"type":"string"},"channel_id":{"type":"integer","description":"The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification","format":"int64","deprecated":true},"mentioned_channel":{"$ref":"#/components/schemas/ChannelResource"},"message":{"$ref":"#/components/schemas/TextMessageResource"}},"description":"Sent when a user mentions a channel in a message"},"ChatUserMentionedChatUserNotificationData":{"required":["channel_id","mentioned_user","message","type"],"type":"object","properties":{"type":{"type":"string"},"channel_id":{"type":"integer","description":"The ID of the channel the mentioning message was sent. Deprecated: Use the channel property of this notification","format":"int64","deprecated":true},"mentioned_user":{"$ref":"#/components/schemas/ChatUserResource"},"message":{"$ref":"#/components/schemas/TextMessageResource"}},"description":"Sent when a user mentions a user in a message"},"ChatUserMessageResource":{"required":["channel_id","created_time","id","nested_level","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"description":"The message that was sent","discriminator":{"propertyName":"type","mapping":{"TEXT":"#/components/schemas/TextChatUserMessageResource","FILE":"#/components/schemas/FileChatUserMessageResource"}},"oneOf":[{"$ref":"#/components/schemas/TextChatUserMessageResource"},{"$ref":"#/components/schemas/FileChatUserMessageResource"}]},"ChatUserRepliedToChatUserMessageNotificationData":{"required":["channel_id","message","parent","type"],"type":"object","properties":{"type":{"type":"string"},"channel_id":{"type":"integer","description":"The ID of channel the reply message was sent. Deprecated: Use the channel property of this notification","format":"int64","deprecated":true},"message":{"$ref":"#/components/schemas/MessageResource"},"parent":{"$ref":"#/components/schemas/MessageResource"}},"description":"Sent when a user replies to a message"},"ChatUserSentChatUserMessageNotificationData":{"required":["channel_id","message","type"],"type":"object","properties":{"type":{"type":"string"},"channel_id":{"type":"integer","description":"The ID channel the message was sent. Deprecated: Use the channel property of this notification","format":"int64","deprecated":true},"message":{"$ref":"#/components/schemas/ChatUserMessageResource"}},"description":"Sent when a user sends a message"},"CursorPageMetadata":{"required":["size","total"],"type":"object","properties":{"next":{"type":"string"},"size":{"type":"integer","format":"int64"},"start":{"type":"string"},"total":{"type":"integer","format":"int64"}}},"CursorPagedModelNotificationResource":{"required":["page"],"type":"object","properties":{"_embedded":{"type":"object","properties":{"notifications":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResource"}}}},"page":{"$ref":"#/components/schemas/CursorPageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"_embedded":{"notifications":[{"id":3256308,"title":"System message sent","body":"File attachment","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/85103"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"SYSTEM:SENT:MESSAGE","_relays":{"message":"/application/messages/85103.relay"}},"createdTime":"2022-06-02T16:36:54.356152Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":3255805,"title":"System message sent","body":"Hello, World!","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/85216"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"SYSTEM:SENT:MESSAGE","_relays":{"message":"/application/messages/85216.relay"}},"createdTime":"2022-06-02T16:35:14.296158Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1750641,"title":"hey sent a message","body":"🌞","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T16:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"USER:SENT:MESSAGE","_relays":{"message":"/application/messages/44902.relay"}},"createdTime":"2021-09-16T16:45:48.351Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1749995,"title":"ho sent a message","body":"ok","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44759"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39841"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"USER:SENT:MESSAGE","_relays":{"message":"/application/messages/44759.relay"}},"createdTime":"2021-09-16T05:14:00.993Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1749225,"title":"Nisar sent a message","body":"hi","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44559"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39827"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"USER:SENT:MESSAGE","_relays":{"message":"/application/messages/44559.relay"}},"createdTime":"2021-09-14T20:13:49.998Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=SELF"},"next":{"href":"https://api.chatkitty.com/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=NEXT"}},"page":{"size":5}}},"NotificationData":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"The type of notification that was received. This specifies the schema of the notification data"}},"description":"Additional context data of this notification","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":{"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"body":{"type":"string","description":"The text body of this notification"},"channel":{"$ref":"#/components/schemas/ChannelProperties"},"created_time":{"type":"string","description":"Time this notification was created","format":"date-time"},"data":{"$ref":"#/components/schemas/NotificationData"},"muted":{"type":"boolean","description":"True if this notification should be muted"},"read_time":{"type":"string","description":"Time this notification was read","format":"date-time"},"title":{"type":"string","description":"The title of this notification"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"id":3256308,"title":"System message sent","body":"File attachment","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/85103"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"SYSTEM:SENT:MESSAGE","_relays":{"message":"/application/messages/85103.relay"}},"createdTime":"2022-06-02T16:36:54.356152Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"SystemMessageResource":{"required":["channel_id","created_time","id","nested_level","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"description":"The message that was sent","discriminator":{"propertyName":"type","mapping":{"SYSTEM_TEXT":"#/components/schemas/TextSystemMessageResource","SYSTEM_FILE":"#/components/schemas/FileSystemMessageResource"}},"oneOf":[{"$ref":"#/components/schemas/TextSystemMessageResource"},{"$ref":"#/components/schemas/FileSystemMessageResource"}]},"TextMessageResource":{"required":["channel_id","created_time","id","nested_level","properties","type"],"type":"object","properties":{"type":{"type":"string","description":"The type of this message","enum":["TEXT","FILE","SYSTEM_TEXT","SYSTEM_FILE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"channel_id":{"type":"integer","description":"The ID of the channel this message belongs to","format":"int64"},"created_time":{"type":"string","description":"The time this message was created","format":"date-time"},"group_tag":{"type":"string","description":"Optional string to associate this message with other messages. Can be used to group messages into a gallery"},"last_edited_time":{"type":"string","description":"The time this message was last edited","format":"date-time"},"nested_level":{"type":"integer","description":"The nested thread level of this message","format":"int32"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this message"},"description":"Custom data associated with this message"},"reactions":{"type":"array","description":"Reactions to this message","items":{"$ref":"#/components/schemas/MessageReactionsSummaryProperties"}},"replies_count":{"type":"integer","description":"The number of replies to this message","format":"int64"},"report_count":{"type":"integer","description":"The number of times this message has been reported","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"description":"The message in which the user was mentioned","discriminator":{"propertyName":"type","mapping":{"TEXT":"#/components/schemas/TextChatUserMessageResource","SYSTEM_TEXT":"#/components/schemas/TextSystemMessageResource"}},"oneOf":[{"$ref":"#/components/schemas/TextChatUserMessageResource"},{"$ref":"#/components/schemas/TextSystemMessageResource"}]},"CountResource":{"required":["count"],"type":"object","properties":{"count":{"type":"number","description":"The number of items"}}},"CursorPagedModelMessageResource":{"required":["page"],"type":"object","properties":{"_embedded":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageResource"}}}},"page":{"$ref":"#/components/schemas/CursorPageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T20:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44701"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39906"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/802"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44700"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39906"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/802"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":44760,"type":"TEXT","channelId":1255,"user":{"id":39841,"type":"PERSON","name":"ho@mailinator.com","displayName":"ho","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/messages/44760"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39841"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/1255"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":44759,"type":"TEXT","channelId":702,"user":{"id":39841,"type":"PERSON","name":"ho@mailinator.com","displayName":"ho","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/messages/44759"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39841"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages?start=333582423138781125&next=327180758840001251&size=5&relation=SELF"},"next":{"href":"https://api.chatkitty.com/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":{"type":"array","description":"Hypermedia control links for this resource","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/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/picture/doark","presence":{"status":"UNAVAILABLE","online":false},"callStatus":"AVAILABLE","properties":{}},{"id":19452,"type":"PERSON","name":"aa","displayName":"emra","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/15252"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/15252/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/15252/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/15252/events"},"application":{"href":"https://api.chatkitty.com/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/applications/1/channels/55913"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55913/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55913/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55913/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55913/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55913/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55913/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/channels/2402"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/2402/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/2402/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/2402/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/2402/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/2402/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/2402/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/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/applications/1/channels/856"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/856/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/856/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/856/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/856/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/856/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/856/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/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/applications/1/channels/1302"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/1302/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/1302/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/1302/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/1302/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/1302/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/1302/moderators"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/channels?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/channels?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/channels?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"_embedded":{"users":[{"id":14503,"type":"PERSON","name":"jane@chatkitty.com","displayName":"Jane","displayPictureUrl":"https://api.chatkitty.com/picture/Jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/14503"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/14503/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/14503/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/14503/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":3004,"type":"PERSON","name":"1","displayName":"ChatKittyUser","displayPictureUrl":"https://api.chatkitty.com/picture/ChatKittyUser","isGuest":true,"presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/3004"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/3004/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/3004/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/3004/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":6152,"type":"PERSON","name":"10zxc13@gmail.com","displayName":"Jack","displayPictureUrl":"https://api.chatkitty.com/picture/Jack","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/6152"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/6152/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/6152/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/6152/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":3353,"type":"PERSON","name":"12121","displayName":"12121","displayPictureUrl":"https://api.chatkitty.com/picture/12121","isGuest":true,"presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/3353"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/3353/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/3353/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/3353/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":6602,"type":"PERSON","name":"123","displayName":"123","displayPictureUrl":"https://api.chatkitty.com/picture/123","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/6602"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/6602/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/6602/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/6602/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/users?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/users?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/users?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"Time this session was created","format":"date-time"},"end_time":{"type":"string","description":"Time this session ended. Present if state is ENDED","format":"date-time"},"state":{"type":"string","description":"State of this session. ACTIVE or ENDED","enum":["ACTIVE","ENDED"]},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"user_agent":{"type":"string","description":"User agent used to start this session"}}},"ChatUserSessionResource":{"required":["created_time","id","state","user"],"type":"object","properties":{"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"Time this session was created","format":"date-time"},"end_time":{"type":"string","description":"Time this session ended. Present if state is ENDED","format":"date-time"},"state":{"type":"string","description":"State of this session. ACTIVE or ENDED","enum":["ACTIVE","ENDED"]},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"user_agent":{"type":"string","description":"User agent used to start this session"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}}},"PagedModelChatUserSessionResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/ChatUserSessionResource"}}}},"page":{"$ref":"#/components/schemas/PageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635641,"user":{"id":39805,"type":"PERSON","name":"b2a6da08-88bf-4778-b993-7234e6d8a3ff","displayName":"Joni Jordyn","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635669,"user":{"id":39806,"type":"PERSON","name":"c6f75947-af48-4893-a78e-0e0b9bd68580","displayName":"Julie Jaxton","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39806"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635644,"user":{"id":39805,"type":"PERSON","name":"b2a6da08-88bf-4778-b993-7234e6d8a3ff","displayName":"Joni Jordyn","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635651,"user":{"id":39805,"type":"PERSON","name":"b2a6da08-88bf-4778-b993-7234e6d8a3ff","displayName":"Joni Jordyn","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/user-sessions?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/user-sessions?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/user-sessions?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"string","description":"The type of this thread","enum":["MAIN","STANDALONE","MESSAGE"]},"id":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"The ISO date-time this thread was created","format":"date-time"},"name":{"type":"string","description":"The name of this thread"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this thread"},"description":"Custom data associated with this thread"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/threads/67528"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"PagedModelChatFunctionResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"functions":{"type":"array","items":{"$ref":"#/components/schemas/ChatFunctionResource"}}}},"page":{"$ref":"#/components/schemas/PageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"_embedded":{"functions":[{"id":202,"type":"user.received.notification","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Received Notification","enabled":true,"currentVersionNumber":5,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/202"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/202/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/202/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/202/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4552,"type":"user.sent.message","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Sent Message","enabled":false,"currentVersionNumber":0,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/4552"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/4552/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/4552/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/4552/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":6152,"type":"user.started.chat_session","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Started Chat Session","enabled":false,"currentVersionNumber":0,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/6152"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/6152/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/6152/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/6152/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1,"type":"user.attempted.start_session","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Attempted Start Session","enabled":true,"currentVersionNumber":34,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/1"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/1/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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":{"type":"string","description":"Time the user read this message","format":"date-time"},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"user":{"id":1,"type":"PERSON","name":"jane@chatkitty.com","displayName":"Jane Doe","displayPictureUrl":"https://api.chatkitty.com/picture/jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"createdTime":"2022-06-02T16:51:03.206366286Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/1"},"message":{"href":"https://api.chatkitty.com/applications/1/messages/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"PagedModelMessageReadReceiptResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"receipts":{"type":"array","items":{"$ref":"#/components/schemas/MessageReadReceiptResource"}}}},"page":{"$ref":"#/components/schemas/PageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/picture/jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"createdTime":"2022-06-02T16:51:03.206366286Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/1"},"message":{"href":"https://api.chatkitty.com/applications/1/messages/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1/jobs/1"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/52"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/54"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/102"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"_embedded":{"versions":[{"id":13515,"versionNumber":34,"handlerScript":"const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    logs.push('Hello ' + event.username);\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return logs;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/13515"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":13461,"versionNumber":33,"handlerScript":"const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    logs.push('Hello!');\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return logs;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/13461"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4802,"versionNumber":32,"handlerScript":"async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return {payload: true};\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/4802"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4652,"versionNumber":31,"handlerScript":"async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return true;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/4652"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4555,"versionNumber":30,"handlerScript":"async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return {\n            status: \"SUCCESS\"\n        };\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/4555"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"args":{"type":"object","additionalProperties":{"type":"object","description":"The function arguments passed into this function for this invocation"},"description":"The function arguments passed into this function for this invocation"},"created_time":{"type":"string","description":"The ISO date-time of this invocation when the function was called","format":"date-time"},"result":{"type":"object","additionalProperties":{"type":"object","description":"The result of this invocation when it completed"},"description":"The result of this invocation when it completed"},"status":{"type":"string","description":"The running status of this invocation","enum":["RUNNING","SUCCEEDED","FAILED"]},"version_number":{"type":"integer","description":"The version number of this function version when this invocation occured","format":"int64"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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":{"type":"array","description":"Hypermedia control links for this resource","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/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/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/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/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/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"Time this session was created","format":"date-time"},"end_time":{"type":"string","description":"Time this session ended. Present if state is ENDED","format":"date-time"},"session":{"$ref":"#/components/schemas/ChatUserSessionProperties"},"state":{"type":"string","description":"State of this session. ACTIVE or ENDED","enum":["ACTIVE","ENDED"]},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/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/applications/14302/user-sessions/544188"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}}},"PagedModelChatSessionResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/ChatSessionResource"}}}},"page":{"$ref":"#/components/schemas/PageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/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/applications/14302/user-sessions/544188"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/544188"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55052"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/544216"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55052"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/545001"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/545052"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/chat-sessions?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/chat-sessions?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/chat-sessions?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}}},"ChannelMembershipResource":{"required":["created_time"],"type":"object","properties":{"created_time":{"type":"string","format":"date-time"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"_embedded":{"memberships":[{"createdTime":"2020-12-02T21:52:33.976Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/2"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/2"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-12-02T22:03:28.742Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/52"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/52"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-11-23T13:03:17.433Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/352"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/352"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-12-07T22:28:47.620Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/403"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/403"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-11-23T14:34:29.580Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/452"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/452"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}},"example":{"_embedded":{"invites":[{"createdTime":"2022-06-02T16:51:03.206366Z","_links":{"invitee":{"href":"https://api.chatkitty.com/applications/1/users/1054"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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":{"type":"integer","description":"64-bit integer identifier associated with this resource","format":"int64"},"created_time":{"type":"string","description":"ISO date-time this application was created","format":"date-time"},"key":{"type":"string","description":"Primary API key assigned to this application"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom properties attached to this application"},"description":"Custom properties attached to this application"},"_links":{"type":"array","description":"Hypermedia control links for this resource","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/applications/1"}}}},"Pageable":{"type":"object","properties":{"page":{"minimum":0,"type":"integer","format":"int32"},"size":{"minimum":1,"type":"integer","format":"int32"},"sort":{"type":"array","items":{"type":"string"}}}},"GroupChannelProperties":{"required":["created_time","display_name","id","name","properties","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/ChannelProperties"},{"type":"object","properties":{"display_name":{"type":"string","description":"Human readable name of this channel shown to users"},"name":{"type":"string","description":"The unique name of this channel used to reference the channel"}}}]},"MessageReadReceiptSummaryResource":{"required":["channel","count","user"],"type":"object","properties":{"channel":{"$ref":"#/components/schemas/ChannelProperties"},"count":{"type":"integer","description":"Number of unread messages","format":"int64"},"user":{"$ref":"#/components/schemas/ChatUserProperties"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}}},"PagedModelMessageReadReceiptSummaryResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"summaries":{"type":"array","items":{"$ref":"#/components/schemas/MessageReadReceiptSummaryResource"}}}},"page":{"$ref":"#/components/schemas/PageMetadata"},"_links":{"type":"array","description":"Hypermedia control links for this resource","items":{"$ref":"#/components/schemas/Link"}}}},"Links":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Link"}},"MessageImport":{"required":["channel_id","type"],"type":"object","properties":{"type":{"type":"string"},"channel_id":{"type":"integer","description":"ID of the channel this message belongs to","format":"int64"},"group_tag":{"type":"string","description":"Tag identifying the message group this message belongs to"},"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Map of custom data attached to this message"},"description":"Map of custom data attached to this message"}},"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":{"type":"string","description":"Human readable name of this user. Shown to other users"},"display_picture":{"$ref":"#/components/schemas/FileImport"},"guest":{"type":"boolean","description":"True if this user was created by a guest user session"},"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"name":{"type":"string","description":"The unique name used to identify this user across ChatKitty. Also known as username"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this user"},"description":"Custom data associated with this user"}},"example":{"name":"jane@chatkitty.com","displayName":"Jane Doe","isGuest":false,"properties":{"favoriteNumber":42}}},"ChannelMembershipImport":{"required":["username"],"type":"object","properties":{"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"username":{"type":"string","description":"Username of the user to be added as a member"}},"example":{"username":"jane@chatkitty.com"}},"FileImport":{"required":["content_type","name","size","url"],"type":"object","properties":{"content_type":{"type":"string","description":"The mime type of this file"},"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"name":{"type":"string","description":"The file name"},"size":{"type":"integer","description":"The size of this file in bytes","format":"int64"},"url":{"type":"string","description":"The file URL"}},"description":"External file properties"},"ChannelImport":{"required":["members","type"],"type":"object","properties":{"type":{"type":"string"},"creator":{"type":"string","description":"Username of the user who created this channel"},"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"members":{"type":"array","description":"List of usernames of members of this channel","items":{"type":"string","description":"List of usernames of members of this channel"}},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"}},"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":{"type":"string","description":"The text body of this message"},"channel_id":{"type":"integer","description":"ID of the channel this message belongs to","format":"int64"},"group_tag":{"type":"string","description":"Tag identifying the message group this message belongs to"},"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Map of custom data attached to this message"},"description":"Map of custom data attached to this message"}}},"DirectChannelImport":{"required":["members"],"type":"object","description":"Imports a direct channel","example":{"idempotencyKey":"unique-external-id","type":"DIRECT","members":["jane@chatkitty.com","john@chatkitty.com"]},"allOf":[{"$ref":"#/components/schemas/ChannelImport"}]},"GroupChannelImport":{"required":["members"],"type":"object","properties":{"creator":{"type":"string","description":"Username of the user who created this channel"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users. If absent defaults to the channel name"},"idempotency_key":{"type":"string","description":"Unique value generated by the client which ChatKitty uses to recognize subsequent retries of the same request. Optional but recommended"},"members":{"type":"array","description":"List of usernames of members of this channel","items":{"type":"string","description":"List of usernames of members of this channel"}},"name":{"type":"string","description":"The unique name of this channel used to reference the channel. If absent defaults to a random UUID"},"properties":{"type":"object","additionalProperties":{"type":"object","description":"Custom data associated with this channel"},"description":"Custom data associated with this channel"}}},"TextSystemMessageImport":{"required":["body","channel_id"],"type":"object","description":"Imports a system text message","example":{"type":"TEXT","body":"Hello, World!"},"allOf":[{"$ref":"#/components/schemas/MessageImport"},{"type":"object","properties":{"body":{"type":"string","description":"The text body of this message"}}}]},"TextChatUserMessageImport":{"required":["body","channel_id","user"],"type":"object","description":"Imports a user text message","example":{"type":"TEXT","body":"Hello, World!","user":"jane@chatkitty.com"},"allOf":[{"$ref":"#/components/schemas/MessageImport"},{"type":"object","properties":{"body":{"type":"string","description":"The text body of this message"},"user":{"type":"string","description":"Username of the user who sent this message"}}}]},"PublicChannelImport":{"required":["members"],"type":"object","description":"Imports a public channel","example":{"idempotencyKey":"unique-external-id","type":"PUBLIC","name":"b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7"},"allOf":[{"$ref":"#/components/schemas/ChannelImport"},{"type":"object","properties":{"name":{"type":"string","description":"The unique name of this channel used to reference the channel. If absent defaults to a random UUID"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users. If absent defaults to the channel name"}}}]},"PrivateChannelImport":{"required":["members"],"type":"object","description":"Imports a private channel","example":{"idempotencyKey":"unique-external-id","type":"PUBLIC","name":"b0a0bd55-921a-4f72-8ee3-f26c6fda0bb7"},"allOf":[{"$ref":"#/components/schemas/ChannelImport"},{"type":"object","properties":{"name":{"type":"string","description":"The unique name of this channel used to reference the channel. If absent defaults to a random UUID"},"display_name":{"type":"string","description":"Human readable name of this channel shown to users. If absent defaults to the channel name"}}}]}},"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/picture/jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/1"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/1/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/1/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/1/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"Link":{"value":{"href":"https://api.chatkitty.com/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":{"name":"firebase","version":"^9.8.2"}},"ChatRuntimeEnvironmentVariablesProperties":{"value":{"CUSTOM_ENV_AWS_REGION":"us-east-1"}},"ChatRuntimeProperties":{"value":{"id":1,"type":"NODEJS","version":"v0.0.29","dependencies":[{"name":"axios","version":"^0.19.2","defaultDependency":true},{"name":"axios-token-interceptor","version":"^0.2.0","defaultDependency":true},{"name":"chatkitty","version":"1.0.1","defaultDependency":true},{"name":"qs","version":"6.9.4","defaultDependency":true},{"name":"firebase","version":"^9.8.2","defaultDependency":false}],"initializationScript":{"script":"var foo = 8;"},"environmentVariables":{"CHATKITTY_CLIENT_SECRET":"34e65736-70c2-4d30-b80a-8ad9887c860b","CHATKITTY_CLIENT_ID":"19b458d0-2b50-491c-8f13-65ec12f3978e","CHATKITTY_CHAT_SERVICE_BASE_URL":"https://api.chatkitty.com","CHATKITTY_APPLICATION_ID":"1","CHATKITTY_AUTHORIZATION_SERVICE_BASE_URL":"https://authorization.chatkitty.com"}}},"ChatRuntimeResource":{"value":{"id":1,"type":"NODEJS","version":"v0.0.29","dependencies":[{"name":"axios","version":"^0.19.2","defaultDependency":true},{"name":"axios-token-interceptor","version":"^0.2.0","defaultDependency":true},{"name":"chatkitty","version":"1.0.1","defaultDependency":true},{"name":"qs","version":"6.9.4","defaultDependency":true},{"name":"firebase","version":"^9.8.2","defaultDependency":false}],"initializationScript":{"script":"var foo = 8;"},"environmentVariables":{"CHATKITTY_CLIENT_SECRET":"34e65736-70c2-4d30-b80a-8ad9887c860b","CHATKITTY_CLIENT_ID":"19b458d0-2b50-491c-8f13-65ec12f3978e","CHATKITTY_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/applications/1/runtimes/nodejs"},"dependencies":{"href":"https://api.chatkitty.com/applications/1/runtimes/nodejs/dependencies"},"initializationScript":{"href":"https://api.chatkitty.com/applications/1/runtimes/nodejs/initialization-script"},"functions":{"href":"https://api.chatkitty.com/applications/1/runtimes/nodejs/functions"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44904"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/44905"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T20:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T20:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44903"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Attempted Start Session","enabled":true,"currentVersionNumber":34,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/1"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/1/current-version"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"CreateChatFunctionVersionResource":{"value":{"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}"}},"ChatFunctionVersionResource":{"value":{"id":13515,"versionNumber":34,"handlerScript":"const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    logs.push('Hello ' + event.username);\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return logs;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/13515"},"application":{"href":"https://api.chatkitty.com/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/applications/1/channels/55913"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55913/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55913/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55913/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55913/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55913/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55913/moderators"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"DirectChannelResource":{"value":{"id":19354,"type":"DIRECT","creator":{"id":20953,"type":"PERSON","name":"jake@giftata.com","displayName":"Jake","displayPictureUrl":"https://api.chatkitty.com/picture/Jake","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"members":[{"id":2,"type":"PERSON","name":"aaron","displayName":"aaron","displayPictureUrl":"https://api.chatkitty.com/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/picture/Jake","presence":{"status":"UNAVAILABLE","online":false},"properties":{}}],"properties":{},"createdTime":"2021-05-18T20:40:29.472Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/channels/19354"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/19354/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/19354/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/19354/events"},"application":{"href":"https://api.chatkitty.com/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/applications/1/channels/55914"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55914/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55914/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55914/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55914/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55914/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55914/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/channels/55913"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55913/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55913/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55913/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55913/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55913/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55913/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/users/1054"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/67026"},"application":{"href":"https://api.chatkitty.com/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/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":[{"id":3256308,"title":"System message sent","body":"File attachment","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/85103"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"SYSTEM:SENT:MESSAGE","_relays":{"message":"/application/messages/85103.relay"}},"createdTime":"2022-06-02T16:36:54.356152Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":3255805,"title":"System message sent","body":"Hello, World!","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/85216"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"SYSTEM:SENT:MESSAGE","_relays":{"message":"/application/messages/85216.relay"}},"createdTime":"2022-06-02T16:35:14.296158Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1750641,"title":"hey sent a message","body":"🌞","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T16:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"USER:SENT:MESSAGE","_relays":{"message":"/application/messages/44902.relay"}},"createdTime":"2021-09-16T16:45:48.351Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1749995,"title":"ho sent a message","body":"ok","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44759"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39841"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"USER:SENT:MESSAGE","_relays":{"message":"/application/messages/44759.relay"}},"createdTime":"2021-09-16T05:14:00.993Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1749225,"title":"Nisar sent a message","body":"hi","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44559"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39827"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"USER:SENT:MESSAGE","_relays":{"message":"/application/messages/44559.relay"}},"createdTime":"2021-09-14T20:13:49.998Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=SELF"},"next":{"href":"https://api.chatkitty.com/applications/1/users/36309/notifications?start=521294853996293169&next=331552160323555076&size=5&relation=NEXT"}},"page":{"size":5}}},"NotificationResource":{"value":{"id":3256308,"title":"System message sent","body":"File attachment","channel":{"id":702,"type":"PUBLIC","name":"Your Awesome Chat Room","displayName":"Your Awesome Chat Room","creator":{"id":352,"type":"PERSON","name":"aaron.nwabuoku@chatkitty.com","displayName":"aaron.nwabuoku@chatkitty.com","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/702"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/702/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/702/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/702/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/702/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/702/moderators"},"application":{"href":"https://api.chatkitty.com/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/applications/1/messages/85103"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},"channelId":702,"type":"SYSTEM:SENT:MESSAGE","_relays":{"message":"/application/messages/85103.relay"}},"createdTime":"2022-06-02T16:36:54.356152Z","_links":{"recipient":{"href":"https://api.chatkitty.com/applications/1/users/36309"},"application":{"href":"https://api.chatkitty.com/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/picture/hey","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"body":"🌞","properties":{},"createdTime":"2021-09-16T20:45:33.696Z","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages/44902"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39953"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44701"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39906"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/802"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/messages/44700"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39906"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/802"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":44760,"type":"TEXT","channelId":1255,"user":{"id":39841,"type":"PERSON","name":"ho@mailinator.com","displayName":"ho","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/messages/44760"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39841"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/1255"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":44759,"type":"TEXT","channelId":702,"user":{"id":39841,"type":"PERSON","name":"ho@mailinator.com","displayName":"ho","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/messages/44759"},"user":{"href":"https://api.chatkitty.com/applications/1/users/39841"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/messages?start=333582423138781125&next=327180758840001251&size=5&relation=SELF"},"next":{"href":"https://api.chatkitty.com/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/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/picture/doark","presence":{"status":"UNAVAILABLE","online":false},"callStatus":"AVAILABLE","properties":{}},{"id":19452,"type":"PERSON","name":"aa","displayName":"emra","displayPictureUrl":"https://api.chatkitty.com/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/applications/1/channels/15252"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/15252/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/15252/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/15252/events"},"application":{"href":"https://api.chatkitty.com/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/applications/1/channels/55913"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/55913/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/55913/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/55913/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/55913/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/55913/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/55913/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/applications/1/channels/2402"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/2402/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/2402/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/2402/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/2402/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/2402/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/2402/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/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/applications/1/channels/856"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/856/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/856/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/856/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/856/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/856/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/856/moderators"},"application":{"href":"https://api.chatkitty.com/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/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/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/applications/1/channels/1302"},"participants":{"href":"https://api.chatkitty.com/applications/1/channels/1302/participants"},"messages":{"href":"https://api.chatkitty.com/applications/1/channels/1302/messages"},"events":{"href":"https://api.chatkitty.com/applications/1/channels/1302/events"},"memberships":{"href":"https://api.chatkitty.com/applications/1/channels/1302/memberships"},"members":{"href":"https://api.chatkitty.com/applications/1/channels/1302/members"},"moderators":{"href":"https://api.chatkitty.com/applications/1/channels/1302/moderators"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/channels?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/channels?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/channels?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/picture/Jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/14503"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/14503/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/14503/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/14503/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":3004,"type":"PERSON","name":"1","displayName":"ChatKittyUser","displayPictureUrl":"https://api.chatkitty.com/picture/ChatKittyUser","isGuest":true,"presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/3004"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/3004/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/3004/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/3004/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":6152,"type":"PERSON","name":"10zxc13@gmail.com","displayName":"Jack","displayPictureUrl":"https://api.chatkitty.com/picture/Jack","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/6152"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/6152/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/6152/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/6152/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":3353,"type":"PERSON","name":"12121","displayName":"12121","displayPictureUrl":"https://api.chatkitty.com/picture/12121","isGuest":true,"presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/3353"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/3353/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/3353/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/3353/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":6602,"type":"PERSON","name":"123","displayName":"123","displayPictureUrl":"https://api.chatkitty.com/picture/123","presence":{"status":"UNAVAILABLE","online":false},"properties":{},"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/users/6602"},"channels":{"href":"https://api.chatkitty.com/applications/1/users/6602/channels"},"notifications":{"href":"https://api.chatkitty.com/applications/1/users/6602/notifications"},"displayPicture":{"href":"https://api.chatkitty.com/applications/1/users/6602/display-picture"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/users?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/users?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/users?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635641,"user":{"id":39805,"type":"PERSON","name":"b2a6da08-88bf-4778-b993-7234e6d8a3ff","displayName":"Joni Jordyn","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635669,"user":{"id":39806,"type":"PERSON","name":"c6f75947-af48-4893-a78e-0e0b9bd68580","displayName":"Julie Jaxton","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39806"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635644,"user":{"id":39805,"type":"PERSON","name":"b2a6da08-88bf-4778-b993-7234e6d8a3ff","displayName":"Joni Jordyn","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}},{"id":635651,"user":{"id":39805,"type":"PERSON","name":"b2a6da08-88bf-4778-b993-7234e6d8a3ff","displayName":"Joni Jordyn","displayPictureUrl":"https://api.chatkitty.com/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/applications/14302/users/39805"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/user-sessions?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/user-sessions?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/user-sessions?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/applications/1/threads/67528"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"PagedModelChatFunctionResource":{"value":{"_embedded":{"functions":[{"id":202,"type":"user.received.notification","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Received Notification","enabled":true,"currentVersionNumber":5,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/202"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/202/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/202/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/202/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4552,"type":"user.sent.message","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Sent Message","enabled":false,"currentVersionNumber":0,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/4552"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/4552/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/4552/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/4552/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":6152,"type":"user.started.chat_session","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Started Chat Session","enabled":false,"currentVersionNumber":0,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/6152"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/6152/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/6152/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/6152/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":1,"type":"user.attempted.start_session","runtime":{"id":1,"type":"NODEJS","version":"v0.0.29"},"name":"User Attempted Start Session","enabled":true,"currentVersionNumber":34,"_links":{"self":{"href":"https://api.chatkitty.com/applications/1/functions/1"},"versions":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions"},"invocations":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations"},"currentVersion":{"href":"https://api.chatkitty.com/applications/1/functions/1/current-version"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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/picture/jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"createdTime":"2022-06-02T16:51:03.206366286Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/1"},"message":{"href":"https://api.chatkitty.com/applications/1/messages/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}},"PagedModelMessageReadReceiptResource":{"value":{"_embedded":{"receipts":[{"user":{"id":1,"type":"PERSON","name":"jane@chatkitty.com","displayName":"Jane Doe","displayPictureUrl":"https://api.chatkitty.com/picture/jane","presence":{"status":"UNAVAILABLE","online":false},"properties":{}},"createdTime":"2022-06-02T16:51:03.206366286Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/1"},"message":{"href":"https://api.chatkitty.com/applications/1/messages/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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/applications/1/jobs/1"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/52"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/53"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/54"},"application":{"href":"https://api.chatkitty.com/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/applications/1/jobs/102"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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 = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    logs.push('Hello ' + event.username);\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return logs;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/13515"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":13461,"versionNumber":33,"handlerScript":"const logs = [];\n\nasync function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    logs.push('Hello!');\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return logs;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/13461"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4802,"versionNumber":32,"handlerScript":"async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return {payload: true};\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/4802"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4652,"versionNumber":31,"handlerScript":"async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return true;\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/4652"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"id":4555,"versionNumber":30,"handlerScript":"async function handleEvent(event: UserAttemptedStartSessionEvent, context: Context) {\n    let email = event.username;\n    let displayName = event.authParams.displayName || email;\n\n    let userApi = context.getUserApi();\n\n    await userApi.getUserExists(email)\n        .catch(async () => {\n            let user = await userApi.createUser(\n                {\n                    'name': email,\n                    'displayName': displayName\n                }\n            );\n\n            let channelApi = context.getChannelApi();\n\n            await channelApi.createChannelMember(702, { 'id': user.data.id });\n        });\n\n        return {\n            status: \"SUCCESS\"\n        };\n}","_links":{"self":{"href":"https://api.chatkitty.com/applications/1/function-versions/4555"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/functions/1/versions?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/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/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/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/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/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/functions/1/invocations?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/544188"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/544188"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/544188"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55052"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/544216"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55052"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/545001"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/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/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/applications/14302/user-sessions/545052"},"channel":{"href":"https://api.chatkitty.com/applications/14302/channels/55002"},"application":{"href":"https://api.chatkitty.com/applications/14302"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/chat-sessions?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/chat-sessions?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/chat-sessions?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/applications/1/users/2"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/2"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-12-02T22:03:28.742Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/52"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/52"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-11-23T13:03:17.433Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/352"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/352"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-12-07T22:28:47.620Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/403"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/403"},"application":{"href":"https://api.chatkitty.com/applications/1"}}},{"createdTime":"2020-11-23T14:34:29.580Z","_links":{"user":{"href":"https://api.chatkitty.com/applications/1/users/452"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/702"},"member":{"href":"https://api.chatkitty.com/applications/1/channels/702/members/452"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"first":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/channels/702/memberships?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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/applications/1/users/1054"},"channel":{"href":"https://api.chatkitty.com/applications/1/channels/67026"},"application":{"href":"https://api.chatkitty.com/applications/1"}}}]},"_links":{"self":{"href":"https://api.chatkitty.com/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/applications/1"}}}},"Links":{"value":{"first":{"href":"https://api.chatkitty.com/applications/1/channels?page=0&size=5"},"self":{"href":"https://api.chatkitty.com/applications/1/channels?page=0&size=5"},"next":{"href":"https://api.chatkitty.com/applications/1/channels?page=1&size=5"},"last":{"href":"https://api.chatkitty.com/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"}}}}}}}