Download the PHP package crispchat/php-crisp-api without Composer
On this page you can find all versions of the php package crispchat/php-crisp-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-crisp-api
Crisp API PHP
The Crisp API PHP wrapper. Authenticate, send messages, fetch conversations, access your agent accounts from your PHP code.
Copyright 2023 Crisp IM SAS. See LICENSE for copying information.
- 📝 Implements: REST API Reference (V1) at revision: 12/31/2017
- 😘 Maintainer: @baptistejamin
Installation with composer
composer require crispchat/php-crisp-api
Authentication
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:
API Overview
You may follow the REST API Quickstart guide, which will get you running with the REST API in minutes.
Available resources & methods
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 (⭐).
Where you see params
it is a plain Array object, e.g. [email => '[email protected]' ]
⚠️ 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.
Website
-
Website Conversations
- ⭐ List Conversations [
user
,plugin
]: Reference CrispClient->websiteConversations->getList(websiteId, pageNumber)
-
See Example
- ⭐ Create a Conversation [
user
,plugin
]: Reference CrispClient->websiteConversations->create(websiteId)
-
See Example
- Initiate a Conversation [
user
,plugin
]: Reference CrispClient->websiteConversations->initiateOne(websiteId, sessionId)
-
See Example
- Find Conversations With Search [
user
,plugin
]: Reference CrispClient->websiteConversations->findWithSearch(websiteId, pageNumber, searchQuery, searchType, searchOperator, includeEmpty, filterUnread, filterResolved, filterNotResolved, filterMention, filterAssigned, filterUnassigned, filterDateStart, filterDateEnd, orderDateCreated, orderDateUpdated)
-
See Example
- ⭐ Get A Conversation [
user
,plugin
]: Reference CrispClient->websiteConversations->getOne(websiteId, sessionId)
-
See Example
- ⭐ Send a Message in Conversation [
user
,plugin
]: Reference CrispClient->websiteConversations->sendMessage(websiteId, sessionId, message)
-
See Example
- ⭐ Get Conversation Metas [
user
,plugin
]: Reference CrispClient->websiteConversations->getMeta(websiteId, sessionId)
-
See Example
- ⭐ Update Conversation Metas [
user
,plugin
]: Reference CrispClient->websiteConversations->updateMeta(websiteId, sessionId, params)
-
See Example
- ⭐ Get Messages in Conversation [
user
,plugin
]: Reference CrispClient->websiteConversations->getMessages(websiteId, sessionId, timestampBefore)
-
See Example
- Get Conversation Original Message [
user
,plugin
]: Reference CrispClient->websiteConversations->getOriginalMessage(websiteId, sessionId, originalId)
-
See Example
- ⭐ Change Conversation State [
user
,plugin
]: Reference CrispClient->websiteConversations->setState(websiteId, sessionId, state)
-
See Example
- Get Conversation Routing [
user
,plugin
]: Reference CrispClient->websiteConversations->getRouting(websiteId, sessionId)
-
See Example
- Assign Conversation Routing [
user
,plugin
]: Reference CrispClient->websiteConversations->assignRouting(websiteId, sessionId, params)
-
See Example
- Block Conversation: [
user
,plugin
]: Reference CrispClient->websiteConversations->setBlock(websiteId, sessionId, blocked)
-
See Example
- Delete Conversation: [
user
,plugin
]: Reference CrispClient->websiteConversations->deleteOne(websiteId, sessionId)
-
See Example
- Acknowledge Messages as Read: [
user
,plugin
]: Reference CrispClient->websiteConversations->acknowledgeMessages(websiteId, sessionId, fingerprints)
-
See Example
- Schedule a Reminder in a Conversation: [
user
,plugin
]: Reference CrispClient->websiteConversations->scheduleReminder(websiteId, sessionId, params)
-
See Example
- ⭐ List Conversations [
-
Website People (these are your end-users)
- Find By Email [
user
,plugin
]: Reference CrispClient->websitePeople->findByEmail(websiteId, email)
-
See Example
- Find With Search Text (Name, Email, Segments) [
user
,plugin
]: Reference CrispClient->websitePeople->findWithSearchText(websiteId, searchText)
-
See Example
- Create A New Profile [
user
,plugin
]: Reference CrispClient->websitePeople->createNewPeopleProfile(websiteId, params)
-
See Example
- ⭐ Check If Exists [
user
,plugin
]: Reference CrispClient->websitePeople->checkPeopleProfileExists(websiteId, peopleId)
-
See Example
- ⭐ Get People Profile [
user
,plugin
]: Reference CrispClient->websitePeople->getPeopleProfile(websiteId, peopleId)
-
See Example
- ⭐ List People Profiles [
user
,plugin
]: Reference CrispClient->websitePeople->listPeopleProfiles(websiteId, pageNumber)
-
See Example
- ⭐ Remove A Profile [
user
,plugin
]: Reference CrispClient->websitePeople->removePeopleProfile(websiteId, peopleId)
-
See Example
- ⭐ Save A Profile [
user
,plugin
]: Reference CrispClient->websitePeople->savePeopleProfile(websiteId, peopleId, params)
-
See Example
- ⭐ Update A Profile [
user
,plugin
]: Reference CrispClient->websitePeople->updatePeopleProfile(websiteId, peopleId, params)
-
See Example
- List Conversations [
user
,plugin
] Reference CrispClient->websitePeople->listPeopleConversations(websiteId, peopleId, pageNumber)
-
See Example
- List Segments [
user
,plugin
]: Reference CrispClient->websitePeople->listPeopleSegments(websiteId, peopleId, pageNumber)
-
See Example
- List Events [
user
,plugin
]: Reference CrispClient->websitePeople->listPeopleEvent(websiteId, peopleId, pageNumber)
-
See Example
- Add Event [
user
,plugin
]: Reference CrispClient->websitePeople->addPeopleEvent(websiteId, peopleId, event)
-
See Example
- Get Data [
user
,plugin
]: Reference CrispClient->websitePeople->getPeopleData(websiteId, peopleId)
-
See Example
- Save Data [
user
,plugin
]: Reference CrispClient->websitePeople->savePeopleData(websiteId, peopleId, params)
-
See Example
- Update Data [
user
,plugin
]: Reference CrispClient->websitePeople->updatePeopleData(websiteId, peopleId, params)
-
See Example
- Get Subscription Status [
user
,plugin
]: Reference CrispClient->websitePeople->getPeopleSubscriptionStatus(websiteId, peopleId)
-
See Example
- Update Subscription Status [
user
,plugin
]: Reference CrispClient->websitePeople->updatePeopleSubscriptionStatus(websiteId, peopleId, params)
-
See Example
- Find By Email [
👉 Notice: The peopleID
argument can be an email or the peopleID
.
-
Website Base
-
Website Settings
-
Website Verify
- Get Verify Settings [
user
,plugin
]: Reference CrispClient->websiteVerify->getSettings(websiteId)
-
See Example
- Update Verify Settings [
user
,plugin
]: Reference CrispClient->websiteVerify->updateSettings(websiteId, params)
-
See Example
- Get Verify Key [
user
,plugin
]: Reference CrispClient->websiteVerify->getKey(websiteId)
-
See Example
- Roll Key [
user
,plugin
]: Reference CrispClient->websiteVerify->rollKey(websiteId)
-
See Example
- Get Verify Settings [
-
Website Operators
- Get All Operators [
user
,plugin
]: Reference CrispClient->websiteOperators->getList(websiteId)
-
See Example
- Get One Operators [
user
,plugin
]: Reference CrispClient->websiteOperators->getOne(websiteId, operatorId)
-
See Example
- Delete One Operators [
user
,plugin
]: Reference CrispClient->websiteOperators->deleteOne(websiteId, operatorId)
-
See Example
- Update An Operator [
user
,plugin
]: Reference CrispClient->websiteOperators->updateOne(websiteId, operatorId, parameters)
-
See Example
- Get All Operators [
-
Website Visitors
- List Visitors [
user
,plugin
]: Reference CrispClient->websiteVisitors->listVisitors(websiteId, pageNumber)
-
See Example
- List Visitors [
-
Website Availability
Plugins
-
Plugin Subscriptions
- List All Active Subsciptions [
user
]: Reference CrispClient->pluginSubscriptions->listAllActiveSubscriptions()
-
See Example
- Get All Subscriptions For Website [
user
]: Reference CrispClient->pluginSubscriptions->listSubscriptionsForWebsite(websiteId)
-
See Example
- Get Subscription Details [
user
,plugin
]: Reference CrispClient->pluginSubscriptions->getSubscriptionDetails(websiteId)
-
See Example
- Subscribe Website To Plugin [
user
]: Reference CrispClient->pluginSubscriptions->subscribeWebsiteToPlugin(websiteId, pluginId)
-
See Example
- Unsubscribe Plugin From Website [
user
]: Reference CrispClient->pluginSubscriptions->unsubscribePluginFromWebsite(websiteId, pluginId)
-
See Example
- Get Subscription Settings [
user
,plugin
]: Reference CrispClient->pluginSubscriptions->getSubscriptionSettings(websiteId, pluginId)
-
See Example
- Save Subscription Settings [
user
,plugin
]: Reference CrispClient->pluginSubscriptions->saveSubscriptionSettings(websiteId, pluginId, settings)
-
See Example
- List All Active Subsciptions [
All versions of php-crisp-api with dependencies
php Version >=5.5
php-http/client-implementation Version ^1.0
php-http/discovery Version ^1.0