The Crisp API Node wrapper. Authenticate, send messages, fetch conversations, access your agent accounts from your JavaScript code.
Copyright 2024 Crisp IM SAS. See LICENSE for copying information.
npm install --save crisp-api
To authenticate against the API, obtain your authentication token keypair by following the REST API Authentication guide. You'll get a token keypair made of 2 values.
Keep your token keypair values private, and store them safely for long-term use.
Then, add authentication parameters to your client
instance right after you create it:
var Crisp = require("crisp-api");
var CrispClient = new Crisp();
// Authenticate to API with your plugin token (identifier, key)
// eg. CrispClient.authenticate("7c3ef21c-1e04-41ce-8c06-5605c346f73e", "cc29e1a5086e428fcc6a697d5837a66d82808e65c5cce006fbf2191ceea80a0a");
CrispClient.authenticateTier("plugin", identifier, key);
// Now, you can use authenticated API sections.
You may follow the REST API Quickstart guide, which will get you running with the REST API in minutes.
var Crisp = require("crisp-api");
var CrispClient = new Crisp();
CrispClient.authenticateTier("plugin", identifier, key);
CrispClient.website.listConversations(websiteID, 1)
.then(function(conversations) {
console.log("Listed conversations:", conversations);
})
.catch(function(error) {
console.error("Error listing conversations:", error);
});
var Crisp = require("crisp-api");
var CrispClient = new Crisp();
CrispClient.authenticateTier("plugin", identifier, key);
// Notice: make sure to authenticate before listening for an event
CrispClient.on("message:send", function(message) {
CrispClient.website.sendMessageInConversation(
message.website_id, message.session_id,
{
type : "text",
content : "I'm a bot",
from : "operator", // or user
origin : "chat"
}
)
.then(function(message) {
console.log("Message sent:", message);
})
.catch(function(error) {
console.error("Error sending message:", error);
});
})
.then(function() {
console.error("Requested to listen to sent messages");
})
.catch(function(error) {
console.error("Failed listening to sent messages:", error);
});
All the available Crisp API resources are fully implemented. Programmatic methods names are named after their label name in the REST API Reference.
All methods that you will most likely need when building a Crisp integration are prefixed with a star symbol (⭐).
⚠️ Note that, depending on your authentication token tier, which is either user
or plugin
, you may not be allowed to use all methods from the library. When in doubt, refer to the library method descriptions below. Most likely, you are using a plugin
token.
⭐ List Conversations [user
, plugin
]: Reference
CrispClient.website.listConversations(websiteID, pageNumber)
List Suggested Conversation Segments [user
, plugin
]: Reference
CrispClient.website.listSuggestedConversationSegments(websiteID, pageNumber)
Delete Suggested Conversation Segment [user
, plugin
]: Reference
CrispClient.website.deleteSuggestedConversationSegment(websiteID, segment)
List Suggested Conversation Data Keys [user
, plugin
]: Reference
CrispClient.website.listSuggestedConversationDataKeys(websiteID, pageNumber)
Delete Suggested Conversation Data Key [user
, plugin
]: Reference
CrispClient.website.deleteSuggestedConversationDataKey(websiteID, key)
List Spam Conversations [user
]: Reference
CrispClient.website.listSpamConversations(websiteID, pageNumber)
Resolve Spam Conversation Content [user
]: Reference
CrispClient.website.resolveSpamConversationContent(websiteID, spamID)
Submit Spam Conversation Decision [user
]: Reference
CrispClient.website.submitSpamConversationDecision(websiteID, spamID, action)
⭐ Create A New Conversation [user
, plugin
]: Reference
CrispClient.website.createNewConversation(websiteID)
Check If Conversation Exists [user
, plugin
]: Reference
CrispClient.website.checkConversationExists(websiteID, sessionID)
⭐ Get A Conversation [user
, plugin
]: Reference
CrispClient.website.getConversation(websiteID, sessionID)
Remove A Conversation [user
, plugin
]: Reference
CrispClient.website.removeConversation(websiteID, sessionID)
Initiate A Conversation With Existing Session [user
, plugin
]: Reference
CrispClient.website.initiateConversationWithExistingSession(websiteID, sessionID)
⭐ Get Messages In Conversation [user
, plugin
]: Reference
CrispClient.website.getMessagesInConversation(websiteID, sessionID, timestampBefore)
⭐ Send A Message In Conversation [user
, plugin
]: Reference
CrispClient.website.sendMessageInConversation(websiteID, sessionID, message)
Get A Message In Conversation [user
, plugin
]: Reference
CrispClient.website.getMessageInConversation(websiteID, sessionID, fingerprint)
Update A Message In Conversation [user
, plugin
]: Reference
CrispClient.website.updateMessageInConversation(websiteID, sessionID, fingerprint, content)
Remove A Message In Conversation [user
, plugin
]: Reference
CrispClient.website.removeMessageInConversation(websiteID, sessionID, fingerprint)
Compose A Message In Conversation [user
, plugin
]: Reference
CrispClient.website.composeMessageInConversation(websiteID, sessionID, compose)
⭐ Mark Messages As Read In Conversation [user
, plugin
]: Reference
CrispClient.website.markMessagesReadInConversation(websiteID, sessionID, read)
⭐ Mark Messages As Delivered In Conversation [user
, plugin
]: Reference
CrispClient.website.markMessagesDeliveredInConversation(websiteID, sessionID, delivered)
Update Conversation Open State [user
, plugin
]: Reference
CrispClient.website.updateConversationOpenState(websiteID, sessionID, opened)
⭐ Get Conversation Routing Assign [user
, plugin
]: Reference
CrispClient.website.getConversationRoutingAssign(websiteID, sessionID)
⭐ Assign Conversation Routing [user
, plugin
]: Reference
CrispClient.website.assignConversationRouting(websiteID, sessionID, assign)
Update Conversation Inbox [user
, plugin
]: Reference
CrispClient.website.updateConversationInbox(websiteID, sessionID, inboxID)
⭐ Get Conversation Metas [user
, plugin
]: Reference
CrispClient.website.getConversationMetas(websiteID, sessionID)
⭐ Update Conversation Metas [user
, plugin
]: Reference
CrispClient.website.updateConversationMetas(websiteID, sessionID, metas)
Get An Original Message In Conversation [user
, plugin
]: Reference
CrispClient.website.getOriginalMessageInConversation(websiteID, sessionID, originalID)
List Conversation Pages [user
, plugin
]: Reference
CrispClient.website.listConversationPages(websiteID, sessionID, pageNumber)
List Conversation Events [user
, plugin
]: Reference
CrispClient.website.listConversationEvents(websiteID, sessionID, pageNumber)
List Conversation Files [user
, plugin
]: Reference
CrispClient.website.listConversationFiles(websiteID, sessionID, pageNumber)
Get Conversation State [user
, plugin
]: Reference
CrispClient.website.getConversationState(websiteID, sessionID)
⭐ Change Conversation State [user
, plugin
]: Reference
CrispClient.website.changeConversationState(websiteID, sessionID, state)
Get Conversation Participants [user
, plugin
]: Reference
CrispClient.website.getConversationParticipants(websiteID, sessionID)
Save Conversation Participants [user
, plugin
]: Reference
CrispClient.website.saveConversationParticipants(websiteID, sessionID, participants)
Get Block Status For Conversation [user
, plugin
]: Reference
CrispClient.website.getBlockStatusForConversation(websiteID, sessionID)
Block Incoming Messages For Conversation [user
, plugin
]: Reference
CrispClient.website.blockIncomingMessagesForConversation(websiteID, sessionID, blocked)
Get Verify Status For Conversation [user
, plugin
]: Reference
CrispClient.website.getVerifyStatusForConversation(websiteID, sessionID)
Update Verify Status For Conversation [user
, plugin
]: Reference
CrispClient.website.updateVerifyStatusForConversation(websiteID, sessionID, verified)
Request Email Transcript For Conversation [user
, plugin
]: Reference
CrispClient.website.requestEmailTranscriptForConversation(websiteID, sessionID, to, email)
Request Chatbox Binding Purge For Conversation [user
, plugin
]: Reference
CrispClient.website.requestChatboxBindingPurgeForConversation(websiteID, sessionID)
Request User Feedback For Conversation [user
, plugin
]: Reference
CrispClient.website.requestUserFeedbackForConversation(websiteID, sessionID)
List Browsing Sessions For Conversation [user
, plugin
]: Reference
CrispClient.website.listBrowsingSessionsForConversation(websiteID, sessionID)
Initiate Browsing Session For Conversation [user
, plugin
]: Reference
CrispClient.website.initiateBrowsingSessionForConversation(websiteID, sessionID)
Send Action To An Existing Browsing Session [user
, plugin
]: Reference
CrispClient.website.sendActionToExistingBrowsingSession(websiteID, sessionID, browsingID, action)
Assist Existing Browsing Session [user
, plugin
]: Reference
CrispClient.website.assistExistingBrowsingSession(websiteID, sessionID, browsingID, assist)
Initiate New Call Session For Conversation [user
, plugin
]: Reference
CrispClient.website.initiateNewCallSessionForConversation(websiteID, sessionID, mode)
Get Ongoing Call Session For Conversation [user
, plugin
]: Reference
CrispClient.website.getOngoingCallSessionForConversation(websiteID, sessionID)
Abort Ongoing Call Session For Conversation [user
, plugin
]: Reference
CrispClient.website.abortOngoingCallSessionForConversation(websiteID, sessionID, callID)
Transmit Signaling On Ongoing Call Session [user
, plugin
]: Reference
CrispClient.website.transmitSignalingOnOngoingCallSession(websiteID, sessionID, callID, payload)
Deliver Widget Button Action For Conversation [user
]: Reference
CrispClient.website.deliverWidgetButtonActionForConversation(websiteID, sessionID, pluginID, sectionID, itemID, data, value)
Deliver Widget Data Fetch Action For Conversation [user
]: Reference
CrispClient.website.deliverWidgetDataFetchActionForConversation(websiteID, sessionID, pluginID, sectionID, itemID, data)
Deliver Widget Data Edit Action For Conversation [user
]: Reference
CrispClient.website.deliverWidgetDataEditActionForConversation(websiteID, sessionID, pluginID, sectionID, itemID, value)
Schedule A Reminder For Conversation [user
, plugin
]: Reference
CrispClient.website.scheduleReminderForConversation(websiteID, sessionID, date, note)
Get People Statistics [user
, plugin
]: Reference
CrispClient.website.getPeopleStatistics(websiteID)
List Suggested People Segments [user
, plugin
]: Reference
CrispClient.website.listSuggestedPeopleSegments(websiteID, pageNumber)
Delete Suggested People Segment [user
, plugin
]: Reference
CrispClient.website.deleteSuggestedPeopleSegment(websiteID, segment)
List Suggested People Data Keys [user
, plugin
]: Reference
CrispClient.website.listSuggestedPeopleDataKeys(websiteID, pageNumber)
Delete Suggested People Data Key [user
, plugin
]: Reference
CrispClient.website.deleteSuggestedPeopleDataKey(websiteID, key)
List Suggested People Events [user
, plugin
]: Reference
CrispClient.website.listSuggestedPeopleEvents(websiteID, pageNumber)
Delete Suggested People Event [user
, plugin
]: Reference
CrispClient.website.deleteSuggestedPeopleEvent(websiteID, text)
⭐ List People Profiles [user
, plugin
]: Reference
CrispClient.website.listPeopleProfiles(websiteID, pageNumber, searchField, searchOrder, searchOperator, searchFilter, searchText)
⭐ Add New People Profile [user
, plugin
]: Reference
CrispClient.website.addNewPeopleProfile(websiteID, peopleProfile)
⭐ Check If People Profile Exists [user
, plugin
]: Reference
CrispClient.website.checkPeopleProfileExists(websiteID, peopleID)
⭐ Get People Profile [user
, plugin
]: Reference
CrispClient.website.getPeopleProfile(websiteID, peopleID)
⭐ Save People Profile [user
, plugin
]: Reference
CrispClient.website.savePeopleProfile(websiteID, peopleID, peopleProfile)
⭐ Update People Profile [user
, plugin
]: Reference
CrispClient.website.updatePeopleProfile(websiteID, peopleID, peopleProfile)
⭐ Remove People Profile [user
, plugin
]: Reference
CrispClient.website.removePeopleProfile(websiteID, peopleID)
List People Conversations [user
, plugin
]: Reference
CrispClient.website.listPeopleConversations(websiteID, peopleID, pageNumber)
List People Campaigns [user
]: Reference
CrispClient.website.listPeopleCampaigns(websiteID, peopleID, pageNumber)
Add A People Event [user
, plugin
]: Reference
CrispClient.website.addPeopleEvent(websiteID, peopleID, peopleEvent)
List People Events [user
, plugin
]: Reference
CrispClient.website.listPeopleEvents(websiteID, peopleID, pageNumber)
Get People Data [user
, plugin
]: Reference
CrispClient.website.getPeopleData(websiteID, peopleID)
Save People Data [user
, plugin
]: Reference
CrispClient.website.savePeopleData(websiteID, peopleID, peopleData)
Update People Data [user
, plugin
]: Reference
CrispClient.website.updatePeopleData(websiteID, peopleID, peopleData)
Get People Subscription Status [user
, plugin
]: Reference
CrispClient.website.getPeopleSubscriptionStatus(websiteID, peopleID)
Update People Subscription Status [user
, plugin
]: Reference
CrispClient.website.updatePeopleSubscriptionStatus(websiteID, peopleID, peopleSubscription)
Export People Profiles [user
]: Reference
CrispClient.website.exportPeopleProfiles(websiteID)
Import People Profiles [user
]: Reference
CrispClient.website.importPeopleProfiles(websiteID, profileImportSetup)
👉 Notice: The peopleID
argument can be an email or the peopleID
.
Check If Helpdesk Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskExists(websiteID)
Resolve Helpdesk [user
, plugin
]: Reference
CrispClient.website.resolveHelpdesk(websiteID)
Initialize Helpdesk [user
]: Reference
CrispClient.website.initializeHelpdesk(websiteID, name, domainBasic)
Delete Helpdesk [user
]: Reference
CrispClient.website.deleteHelpdesk(websiteID, verify)
List Helpdesk Locales [user
, plugin
]: Reference
CrispClient.website.listHelpdeskLocales(websiteID, pageNumber, options={})
Add Helpdesk Locale [user
, plugin
]: Reference
CrispClient.website.addHelpdeskLocale(websiteID, locale)
Check If Helpdesk Locale Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskLocaleExists(websiteID, locale)
Resolve Helpdesk Locale [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocale(websiteID, locale)
Delete Helpdesk Locale [user
, plugin
]: Reference
CrispClient.website.deleteHelpdeskLocale(websiteID, locale)
List Helpdesk Locale Articles [user
, plugin
]: Reference
CrispClient.website.listHelpdeskLocaleArticles(websiteID, locale, pageNumber)
Add A New Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.addNewHelpdeskLocaleArticle(websiteID, locale, title)
Check If Helpdesk Locale Article Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskLocaleArticleExists(websiteID, locale, articleId)
Resolve Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocaleArticle(websiteID, locale, articleId)
Save Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.saveHelpdeskLocaleArticle(websiteID, locale, articleId, article)
Update Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.updateHelpdeskLocaleArticle(websiteID, locale, articleId, article)
Delete Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.deleteHelpdeskLocaleArticle(websiteID, locale, articleId)
Resolve Helpdesk Locale Article Page [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocaleArticlePage(websiteID, locale, articleId)
Resolve Helpdesk Locale Article Category [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocaleArticleCategory(websiteID, locale, articleId)
Update Helpdesk Locale Article Category [user
, plugin
]: Reference
CrispClient.website.updateHelpdeskLocaleArticleCategory(websiteID, locale, articleId, categoryId, sectionId)
List Helpdesk Locale Article Alternates [user
, plugin
]: Reference
CrispClient.website.listHelpdeskLocaleArticleAlternates(websiteID, locale, articleId)
Check If Helpdesk Locale Article Alternate Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskLocaleArticleAlternateExists(websiteID, locale, articleId, localeLinked)
Resolve Helpdesk Locale Article Alternate [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocaleArticleAlternate(websiteID, locale, articleId, localeLinked)
Save Helpdesk Locale Article Alternate [user
, plugin
]: Reference
CrispClient.website.saveHelpdeskLocaleArticleAlternate(websiteID, locale, articleId, localeLinked, articleIdLinked)
Delete Helpdesk Locale Article Alternate [user
, plugin
]: Reference
CrispClient.website.deleteHelpdeskLocaleArticleAlternate(websiteID, locale, articleId, localeLinked)
Publish Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.publishHelpdeskLocaleArticle(websiteID, locale, articleId)
Unpublish Helpdesk Locale Article [user
, plugin
]: Reference
CrispClient.website.unpublishHelpdeskLocaleArticle(websiteID, locale, articleId)
List Helpdesk Locale Categories [user
, plugin
]: Reference
CrispClient.website.listHelpdeskLocaleCategories(websiteID, locale, pageNumber)
Add Helpdesk Locale Category [user
, plugin
]: Reference
CrispClient.website.addHelpdeskLocaleCategory(websiteID, locale, name)
Check If Helpdesk Locale Category Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskLocaleCategoryExists(websiteID, locale, categoryId)
Resolve Helpdesk Locale Category [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocaleCategory(websiteID, locale, categoryId)
Save Helpdesk Locale Category [user
, plugin
]: Reference
CrispClient.website.saveHelpdeskLocaleCategory(websiteID, locale, categoryId, category)
Update Helpdesk Locale Category [user
, plugin
]: Reference
CrispClient.website.updateHelpdeskLocaleCategory(websiteID, locale, categoryId, category)
Delete Helpdesk Locale Category [user
, plugin
]: Reference
CrispClient.website.deleteHelpdeskLocaleCategory(websiteID, locale, categoryId)
List Helpdesk Locale Sections [user
, plugin
]: Reference
CrispClient.website.listHelpdeskLocaleSections(websiteID, locale, categoryId, pageNumber)
Add Helpdesk Locale Section [user
, plugin
]: Reference
CrispClient.website.addHelpdeskLocaleSection(websiteID, locale, categoryId, name)
Check If Helpdesk Locale Section Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskLocaleSectionExists(websiteID, locale, categoryId, sectionId)
Resolve Helpdesk Locale Section [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskLocaleSection(websiteID, locale, categoryId, sectionId)
Save Helpdesk Locale Section [user
, plugin
]: Reference
CrispClient.website.saveHelpdeskLocaleSection(websiteID, locale, categoryId, sectionId, section)
Update Helpdesk Locale Section [user
, plugin
]: Reference
CrispClient.website.updateHelpdeskLocaleSection(websiteID, locale, categoryId, sectionId, section)
Delete Helpdesk Locale Section [user
, plugin
]: Reference
CrispClient.website.deleteHelpdeskLocaleSection(websiteID, locale, categoryId, sectionId)
Map Helpdesk Locale Feedback Ratings [user
, plugin
]: Reference
CrispClient.website.mapHelpdeskLocaleFeedbackRatings(websiteID, locale, filterDateStart, filterDateEnd)
List Helpdesk Locale Feedbacks [user
, plugin
]: Reference
CrispClient.website.listHelpdeskLocaleFeedbacks(websiteID, locale, pageNumber, filterDateStart, filterDateEnd)
Import External Helpdesk To Locale [user
]: Reference
CrispClient.website.importExternalHelpdeskToLocale(websiteID, locale, helpdeskUrl)
Export Helpdesk Locale Articles [user
]: Reference
CrispClient.website.exportHelpdeskLocaleArticles(websiteID, locale)
List Helpdesk Redirections [user
, plugin
]: Reference
CrispClient.website.listHelpdeskRedirections(websiteID, pageNumber)
Add Helpdesk Redirection [user
, plugin
]: Reference
CrispClient.website.addHelpdeskRedirection(websiteID, redirectionPath, redirectionTarget)
Check If Helpdesk Redirection Exists [user
, plugin
]: Reference
CrispClient.website.checkHelpdeskRedirectionExists(websiteID, redirectionId)
Resolve Helpdesk Redirection [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskRedirection(websiteID, redirectionId)
Delete Helpdesk Redirection [user
, plugin
]: Reference
CrispClient.website.deleteHelpdeskRedirection(websiteID, redirectionId)
Resolve Helpdesk Settings [user
, plugin
]: Reference
CrispClient.website.resolveHelpdeskSettings(websiteID)
Save Helpdesk Settings [user
, plugin
]: Reference
CrispClient.website.saveHelpdeskSettings(websiteID, settings)
Resolve Helpdesk Domain [user
]: Reference
CrispClient.website.resolveHelpdeskDomain(websiteID)
Request Helpdesk Domain Change [user
]: Reference
CrispClient.website.requestHelpdeskDomainChange(websiteID, basic, custom)
Generate Helpdesk Domain Setup Flow [user
]: Reference
CrispClient.website.generateHelpdeskDomainSetupFlow(websiteID, custom)
Check If Website Exists [user
, plugin
]: Reference
CrispClient.website.checkWebsiteExists(domain)
Create Website [user
]: Reference
CrispClient.website.createWebsite(websiteData)
Get A Website [user
, plugin
]: Reference
CrispClient.website.getWebsite(websiteID)
Delete A Website [user
]: Reference
CrispClient.website.deleteWebsite(websiteID, verify)
Abort Website Deletion [user
]: Reference
CrispClient.website.abortWebsiteDeletion(websiteID)
Get Website Settings [user
, plugin
]: Reference
CrispClient.website.getWebsiteSettings(websiteID)
Update Website Settings [user
, plugin
]: Reference
CrispClient.website.updateWebsiteSettings(websiteID, settings)
List Website Operators [user
, plugin
]: Reference
CrispClient.website.listWebsiteOperators(websiteID)
List Last Active Website Operators [user
, plugin
]: Reference
CrispClient.website.listLastActiveWebsiteOperators(websiteID)
Flush Last Active Website Operators [user
]: Reference
CrispClient.website.flushLastActiveWebsiteOperators(websiteID)
Send Email To Website Operators [user
, plugin
]: Reference
CrispClient.website.sendEmailToWebsiteOperators(websiteID, emailData)
Get A Website Operator [user
, plugin
]: Reference
CrispClient.website.getWebsiteOperator(websiteID, userID)
Invite A Website Operator [user
]: Reference
CrispClient.website.inviteWebsiteOperator(websiteID, email, role, verify)
Change Operator Membership [user
]: Reference
CrispClient.website.changeOperatorMembership(websiteID, userID, role, title)
Unlink Operator From Website [user
]: Reference
CrispClient.website.unlinkOperatorFromWebsite(websiteID, userID)
Count Visitors [user
, plugin
]: Reference
CrispClient.website.countVisitors(websiteID)
List Visitors [user
, plugin
]: Reference
CrispClient.website.listVisitors(websiteID, pageNumber)
Pinpoint Visitors On A Map [user
, plugin
]: Reference
CrispClient.website.pinpointVisitorsOnMap(websiteID, centerLongitude, centerLatitude, centerRadius)
Get Session Identifier From Token [user
, plugin
]: Reference
CrispClient.website.getSessionIdentifierFromToken(websiteID, tokenID)
Count Blocked Visitors [user
]: Reference
CrispClient.website.countBlockedVisitors(websiteID)
Count Blocked Visitors In Rule [user
]: Reference
CrispClient.website.countBlockedVisitorsInRule(websiteID, rule)
Clear Blocked Visitors In Rule [user
]: Reference
CrispClient.website.clearBlockedVisitorsInRule(websiteID, rule)
Get Website Availability Status [user
, plugin
]: Reference
CrispClient.website.getWebsiteAvailabilityStatus(websiteID)
List Website Operator Availabilities [user
, plugin
]: Reference
CrispClient.website.listWebsiteOperatorAvailabilities(websiteID)
user
]: ReferenceCrispClient.website.generateAnalytics(websiteID, query)
Batch Resolve Conversations [user
]: Reference
CrispClient.website.batchResolveConversations(websiteID, operation)
Batch Read Conversations [user
]: Reference
CrispClient.website.batchReadConversations(websiteID, operation)
Batch Remove Conversations [user
]: Reference
CrispClient.website.batchRemoveConversations(websiteID, operation)
Batch Remove People [user
]: Reference
CrispClient.website.batchRemovePeople(websiteID, people)
Get Verify Settings [user
, plugin
]: Reference
CrispClient.website.getVerifySettings(websiteID)
Update Verify Settings [user
, plugin
]: Reference
CrispClient.website.updateVerifySettings(websiteID, settings)
Get Verify Key [user
, plugin
]: Reference
CrispClient.website.getVerifyKey(websiteID)
Roll Verify Key [user
, plugin
]: Reference
CrispClient.website.rollVerifyKey(websiteID)
List Campaigns [user
]: Reference
CrispClient.website.listCampaigns(websiteID, pageNumber)
List Campaign Tags [user
]: Reference
CrispClient.website.listCampaignTags(websiteID)
List Campaign Templates [user
, plugin
]: Reference
CrispClient.website.listCampaignTemplates(websiteID, pageNumber)
Create A New Campaign Template [user
, plugin
]: Reference
CrispClient.website.createNewCampaignTemplate(websiteID, templateFormat, templateName)
Check If Campaign Template Exists [user
, plugin
]: Reference
CrispClient.website.checkCampaignTemplateExists(websiteID, templateID)
Get A Campaign Template [user
, plugin
]: Reference
CrispClient.website.getCampaignTemplate(websiteID, templateID)
Save A Campaign Template [user
, plugin
]: Reference
CrispClient.website.saveCampaignTemplate(websiteID, templateID, template)
Update A Campaign Template [user
, plugin
]: Reference
CrispClient.website.updateCampaignTemplate(websiteID, templateID, template)
Remove A Campaign Template [user
, plugin
]: Reference
CrispClient.website.removeCampaignTemplate(websiteID, templateID)
Create A New Campaign [user
]: Reference
CrispClient.website.createNewCampaign(websiteID, campaignType, campaignName)
Check If Campaign Exists [user
]: Reference
CrispClient.website.checkCampaignExists(websiteID, campaignID)
Get A Campaign [user
]: Reference
CrispClient.website.getCampaign(websiteID, campaignID)
Save A Campaign [user
]: Reference
CrispClient.website.saveCampaign(websiteID, campaignID, campaign)
Update A Campaign [user
]: Reference
CrispClient.website.updateCampaign(websiteID, campaignID, campaign)
Remove A Campaign [user
]: Reference
CrispClient.website.removeCampaign(websiteID, campaignID)
Dispatch A Campaign [user
]: Reference
CrispClient.website.dispatchCampaign(websiteID, campaignID)
Resume A Campaign [user
]: Reference
CrispClient.website.resumeCampaign(websiteID, campaignID)
Pause A Campaign [user
]: Reference
CrispClient.website.pauseCampaign(websiteID, campaignID)
Test A Campaign [user
]: Reference
CrispClient.website.testCampaign(websiteID, campaignID)
List Campaign Recipients [user
]: Reference
CrispClient.website.listCampaignRecipients(websiteID, campaignID, pageNumber)
List Campaign Statistics [user
]: Reference
CrispClient.website.listCampaignStatistics(websiteID, campaignID, action, pageNumber)
⭐ Get Connect Account [plugin
]: Reference
CrispClient.plugin.getConnectAccount()
⭐ Check Connect Session Validity [plugin
]: Reference
CrispClient.plugin.checkConnectSessionValidity()
⭐ List All Connect Websites [plugin
]: Reference
CrispClient.plugin.listAllConnectWebsites(pageNumber, filterConfigured)
⭐ List Connect Websites Since [plugin
]: Reference
CrispClient.plugin.listConnectWebsitesSince(dateSince, filterConfigured)
⭐ Get Connect Endpoints [plugin
]: Reference
CrispClient.plugin.getConnectEndpoints()
List All Active Subscriptions [user
]: Reference
CrispClient.plugin.listAllActiveSubscriptions()
List Subscriptions For A Website [user
]: Reference
CrispClient.plugin.listSubscriptionsForWebsite(websiteID)
Get Subscription Details [user
, plugin
]: Reference
CrispClient.plugin.getSubscriptionDetails(websiteID, pluginID)
Subscribe Website To Plugin [user
]: Reference
CrispClient.plugin.subscribeWebsiteToPlugin(websiteID, pluginID)
Unsubscribe Plugin From Website [user
]: Reference
CrispClient.plugin.unsubscribePluginFromWebsite(websiteID, pluginID)
Get Subscription Settings [user
, plugin
]: Reference
CrispClient.plugin.getSubscriptionSettings(websiteID, pluginID)
Save Subscription Settings [user
, plugin
]: Reference
CrispClient.plugin.saveSubscriptionSettings(websiteID, pluginID, settings)
Update Subscription Settings [user
, plugin
]: Reference
CrispClient.plugin.updateSubscriptionSettings(websiteID, pluginID, settings)
Get Plugin Usage Bills [user
, plugin
]: Reference
CrispClient.plugin.getPluginUsageBills(websiteID, pluginID)
Report Plugin Usage To Bill [plugin
]: Reference
CrispClient.plugin.reportPluginUsageToBill(websiteID, pluginID, usage)
Forward Plugin Payload To Channel [user
, plugin
]: Reference
CrispClient.plugin.forwardPluginPayloadToChannel(websiteID, pluginID, payload)
Dispatch Plugin Event [user
, plugin
]: Reference
CrispClient.plugin.dispatchPluginEvent(websiteID, pluginID, payload)
user
]: ReferenceCrispClient.media.listAnimationMedias(pageNumber, listID, searchQuery)
user
, plugin
]: ReferenceCrispClient.bucket.generateBucketURL(data)
You can bind to realtime events from Crisp, in order to get notified of incoming messages and updates in websites.
You won't receive any event if you don't explicitly subscribe to realtime events, as the library doesn't connect to the realtime backend automatically.
There are two ways to receive realtime events:
Before you start with RTM events, please consider the following:
CrispClient.on()
, as the library doesn't connect to the realtime backend automatically. This method returns a Promise
object.CrispClient.rebindSocket()
. This method also returns a Promise
object. This only applies to WebSockets with the RTM API.To start listening for events and bind a handler, check out the events over Web Hooks example.
You will need to adjust your code so that:
CrispClient.setRtmMode(Crisp.RTM_MODES.WebHooks)
CrispClient.verifyHook(secret, body, timestamp, signature)
CrispClient.receiveHook(body)
Plugin Web Hooks will need to be configured first for this to work. Check out our Web Hooks Quickstart guide and our Web Hooks Reference to get started.
To start listening for events and bind a handler, check out the events over WebSockets example.
You will need to adjust your code so that:
CrispClient.setRtmMode(Crisp.RTM_MODES.WebSockets)
Available events are listed below:
user
, plugin
]:session:update_availability
user
, plugin
]:session:update_verify
user
, plugin
]:session:request:initiated
user
, plugin
]:session:set_email
user
, plugin
]:session:set_phone
user
, plugin
]:session:set_address
user
, plugin
]:session:set_subject
user
, plugin
]:session:set_avatar
user
, plugin
]:session:set_nickname
user
, plugin
]:session:set_data
user
, plugin
]:session:sync:pages
user
, plugin
]:session:sync:events
user
, plugin
]:session:sync:capabilities
user
, plugin
]:session:sync:geolocation
user
, plugin
]:session:sync:system
user
, plugin
]:session:sync:network
user
, plugin
]:session:sync:timezone
user
, plugin
]:session:sync:locales
user
, plugin
]:session:sync:rating
user
, plugin
]:session:sync:topic
user
, plugin
]:session:set_state
user
, plugin
]:session:set_block
user
, plugin
]:session:set_segments
user
, plugin
]:session:set_opened
user
, plugin
]:session:set_closed
user
, plugin
]:session:set_participants
user
, plugin
]:session:set_mentions
user
, plugin
]:session:set_routing
user
, plugin
]:session:set_inbox
user
, plugin
]:session:removed
user
, plugin
]:message:updated
user
, plugin
]:message:send
user
, plugin
]:message:received
user
, plugin
]:message:removed
user
, plugin
]:message:compose:send
user
, plugin
]:message:compose:receive
user
, plugin
]:message:acknowledge:read:send
user
, plugin
]:message:acknowledge:read:received
user
, plugin
]:message:acknowledge:delivered
user
, plugin
]:message:notify:unread:send
user
, plugin
]:message:notify:unread:received
user
]:spam:message
user
]:spam:decision
user
, plugin
]:people:profile:created
user
, plugin
]:people:profile:updated
user
, plugin
]:people:profile:removed
user
, plugin
]:people:bind:session
user
, plugin
]:people:sync:profile
user
]:people:import:progress
user
]:people:import:done
user
]:campaign:progress
user
]:campaign:dispatched
user
]:campaign:running
user
, plugin
]:browsing:request:initiated
user
, plugin
]:browsing:request:rejected
user
, plugin
]:call:request:initiated
user
, plugin
]:call:request:rejected
user
]:widget:action:processed
user
]:status:health:changed
user
, plugin
]:website:update_visitors_count
user
, plugin
]:website:update_operators_availability
user
, plugin
]:website:users:available
user
, plugin
]:bucket:url:upload:generated
user
, plugin
]:bucket:url:avatar:generated
user
, plugin
]:bucket:url:website:generated
user
, plugin
]:bucket:url:campaign:generated
user
, plugin
]:bucket:url:helpdesk:generated
user
, plugin
]:bucket:url:status:generated
user
, plugin
]:bucket:url:processing:generated
user
]:media:animation:listed
user
, plugin
]:email:subscribe
user
, plugin
]:email:track:view
user
, plugin
]:plugin:channel
user
, plugin
]:plugin:event
user
, plugin
]:plugin:settings:saved