Skip to content

crisp-im/php-crisp-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crisp API PHP

Build and Release Version Downloads

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.

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:

require __DIR__ . '/vendor/autoload.php';
$CrispClient = new \Crisp\CrispClient;

// Authenticate to API with your plugin token (identifier, key)
// eg. $CrispClient->authenticate("7c3ef21c-1e04-41ce-8c06-5605c346f73e", "cc29e1a5086e428fcc6a697d5837a66d82808e65c5cce006fbf2191ceea80a0a");
$CrispClient->setTier("plugin");
$CrispClient->authenticate(identifier, key);

// Now, you can use authenticated API sections.

API Overview

You may follow the REST API Quickstart guide, which will get you running with the REST API in minutes.

require __DIR__ . '/vendor/autoload.php';
$CrispClient = new \Crisp\CrispClient;

$CrispClient->setTier("plugin");
$CrispClient->authenticate(identifier, key);

$conversations = $CrispClient->websiteConversations->getList(websiteId, 1);
echo $conversations;

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 => 'foo@example.com' ]

⚠️ 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
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pageNumber = 1;
        
        CrispClient->websiteConversations->getList(websiteId, pageNumber);
    • Create a Conversation [user, plugin]: Reference

      • CrispClient->websiteConversations->create(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteConversations->create(websiteId);
    • Initiate a Conversation [user, plugin]: Reference

      • CrispClient->websiteConversations->initiateOne(websiteId, sessionId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        CrispClient->websiteConversations->initiateOne(websiteId, sessionId);
    • 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
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pageNumber = 1;
        
        CrispClient->websiteConversations->getList(websiteId, pageNumber);
    • Get A Conversation [user, plugin]: Reference

      • CrispClient->websiteConversations->getOne(websiteId, sessionId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        CrispClient->websiteConversations->getOne(websiteId, sessionId);
    • Send a Message in Conversation [user, plugin]: Reference

      • CrispClient->websiteConversations->sendMessage(websiteId, sessionId, message)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        $message = [
          "type" => "text",
          "from" => "operator",
          "origin" => "chat",
          "content" => "Hey there! Need help?"
        ];
        
        CrispClient->websiteConversations->sendMessage(websiteId, sessionId, message);
    • Get Conversation Metas [user, plugin]: Reference

      • CrispClient->websiteConversations->getMeta(websiteId, sessionId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        CrispClient->websiteConversations->getMeta(websiteId, sessionId);
    • Update Conversation Metas [user, plugin]: Reference

      • CrispClient->websiteConversations->updateMeta(websiteId, sessionId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        $params = [
          "nickname" => "John Doe",
          "email" => "john.doe@acme-inc.com",
          "segments" => [
            "happy",
            "customer",
            "love"
          ],
          "data" => [
            "type" => "customer",
            "signup" => "finished"
          ]
        ];
        
        CrispClient->websiteConversations->updateMeta(websiteId, sessionId, params);
    • Get Messages in Conversation [user, plugin]: Reference

      • CrispClient->websiteConversations->getMessages(websiteId, sessionId, timestampBefore)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        $timestampBefore = 1641206011000;
        
        CrispClient->websiteConversations->getMessages(websiteId, sessionId, timestampBefore);
    • Get Conversation Original Message [user, plugin]: Reference

      • CrispClient->websiteConversations->getOriginalMessage(websiteId, sessionId, originalId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        $originalId = "2325a3c0-9b47-4fc6-b00e-111b752e44cd";
        
        CrispClient->websiteConversations->getOriginalMessage(websiteId, sessionId, originalId);
    • Change Conversation State [user, plugin]: Reference

      • CrispClient->websiteConversations->setState(websiteId, sessionId, state)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        $state = true;
        
        CrispClient->websiteConversations->setState(websiteId, sessionId, state);
    • Get Conversation Routing [user, plugin]: Reference

      • CrispClient->websiteConversations->getRouting(websiteId, sessionId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        CrispClient->websiteConversations->getRouting(websiteId, sessionId);
    • Assign Conversation Routing [user, plugin]: Reference

      • CrispClient->websiteConversations->assignRouting(websiteId, sessionId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        $params = [
          "assigned" => [
            "user_id" => "a4c32c68-be91-4e29-8a05-976e93abbe3f"
          ]
        ];
        
        CrispClient->websiteConversations->assignRouting(websiteId, sessionId, params);
    • Block Conversation: [user, plugin]: Reference

      • CrispClient->websiteConversations->setBlock(websiteId, sessionId, blocked)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        $blocked = true;
        
        CrispClient->websiteConversations->setBlock(websiteId, sessionId, blocked);
    • Delete Conversation: [user, plugin]: Reference

      • CrispClient->websiteConversations->deleteOne(websiteId, sessionId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        CrispClient->websiteConversations->deleteOne(websiteId, sessionId);
    • Acknowledge Messages as Read: [user, plugin]: Reference

      • CrispClient->websiteConversations->acknowledgeMessages(websiteId, sessionId, fingerprints)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        $fingerprint = 524653764345;
        
        $fingerprints = [
          "from" => "operator",
          "origin" => "urn:crisp.im:slack:0",
          "fingerprints" => [
            "5719231201"
          ]
        ];
        
        CrispClient->websiteConversations->acknowledgeMessages(websiteId, sessionId, fingerprints);
    • Schedule a Reminder in a Conversation: [user, plugin]: Reference

      • CrispClient->websiteConversations->scheduleReminder(websiteId, sessionId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $sessionId = "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881";
        
        $params = [
          "date" => "2018-05-29T09:00:00Z",
          "note" => "Call this customer."
        ];
        
        CrispClient->websiteConversations->scheduleReminder(websiteId, sessionId, params);
  • Website People (these are your end-users)

    • Find By Email [user, plugin]: Reference

      • CrispClient->websitePeople->findByEmail(websiteId, email)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websitePeople->findByEmail(websiteId, email);
    • Find With Search Text (Name, Email, Segments) [user, plugin]: Reference

      • CrispClient->websitePeople->findWithSearchText(websiteId, searchText)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websitePeople->findWithSearchText(websiteId, searchText);
    • Create A New Profile [user, plugin]: Reference

      • CrispClient->websitePeople->createNewPeopleProfile(websiteId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        $params = [
          "email" => "valerian@crisp.chat",
          "person" => [
            "nickname" => "Valerian Saliou"
          ]
        ];
        
        CrispClient->websitePeople->createNewPeopleProfile(websiteId, params);
    • Check If Exists [user, plugin]: Reference

      • CrispClient->websitePeople->checkPeopleProfileExists(websiteId, peopleId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        CrispClient->websitePeople->checkPeopleProfileExists(websiteId, peopleId);
    • Get People Profile [user, plugin]: Reference

      • CrispClient->websitePeople->getPeopleProfile(websiteId, peopleId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websitePeople->findByEmail(websiteId, email);
    • List People Profiles [user, plugin]: Reference

      • CrispClient->websitePeople->listPeopleProfiles(websiteId, pageNumber)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websitePeople->findWithSearchText(websiteId, searchText);
    • Remove A Profile [user, plugin]: Reference

      • CrispClient->websitePeople->removePeopleProfile(websiteId, peopleId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        CrispClient->websitePeople->removePeopleProfile(websiteId, peopleId);
    • Save A Profile [user, plugin]: Reference

      • CrispClient->websitePeople->savePeopleProfile(websiteId, peopleId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        $params = [
          "email" => "valerian@crisp.chat",
          "person" => [
            "nickname" => "Valerian Saliou"
          ]
        ];
        
        CrispClient->websitePeople->savePeopleProfile(websiteId, peopleId, params);
    • Update A Profile [user, plugin]: Reference

      • CrispClient->websitePeople->updatePeopleProfile(websiteId, peopleId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        $params = [
          "email" => "valerian@crisp.chat",
          "person" => [
            "nickname" => "Valerian Saliou"
          ]
        ];
        
        CrispClient->websitePeople->updatePeopleProfile(websiteId, peopleId, params);
    • List Conversations [user, plugin] Reference

      • CrispClient->websitePeople->listPeopleConversations(websiteId, peopleId, pageNumber)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        $pageNumber = 1;
        
        CrispClient->websitePeople->listPeopleConversations(websiteId, peopleId, pageNumber);
    • List Segments [user, plugin]: Reference

      • CrispClient->websitePeople->listPeopleSegments(websiteId, peopleId, pageNumber)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        $pageNumber = 1;
        
        CrispClient->websitePeople->listPeopleSegments(websiteId, peopleId, pageNumber);
    • List Events [user, plugin]: Reference

      • CrispClient->websitePeople->listPeopleEvent(websiteId, peopleId, pageNumber)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        $pageNumber = 1;
        
        CrispClient->websitePeople->listPeopleEvent(websiteId, peopleId, pageNumber);
    • Add Event [user, plugin]: Reference

      • CrispClient->websitePeople->addPeopleEvent(websiteId, peopleId, event)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        $event = [
          "text" => "Added item to basket",
          "data" => [
            "price" => 10.99,
            "currency" => "USD"
          ],
          "color" => "red"
        ];
        
        CrispClient->websitePeople->addPeopleEvent(websiteId, peopleId, event);
    • Get Data [user, plugin]: Reference

      • CrispClient->websitePeople->getPeopleData(websiteId, peopleId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        CrispClient->websitePeople->getPeopleData(websiteId, peopleId);
    • Save Data [user, plugin]: Reference

      • CrispClient->websitePeople->savePeopleData(websiteId, peopleId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        $params = [
          "data" => [
            "type" => "customer",
            "signup" => "finished"
          ]
        ];
        
        CrispClient->websitePeople->savePeopleData(websiteId, peopleId, params);
    • Update Data [user, plugin]: Reference

      • CrispClient->websitePeople->updatePeopleData(websiteId, peopleId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        $params = [
          "data" => [
            "signup" => "finished"
          ]
        ];
        
        CrispClient->websitePeople->updatePeopleData(websiteId, peopleId, params);
    • Get Subscription Status [user, plugin]: Reference

      • CrispClient->websitePeople->getPeopleSubscriptionStatus(websiteId, peopleId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        CrispClient->websitePeople->getPeopleSubscriptionStatus(websiteId, peopleId);
    • Update Subscription Status [user, plugin]: Reference

      • CrispClient->websitePeople->updatePeopleSubscriptionStatus(websiteId, peopleId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $peopleId = "c5a2f70c-f605-4648-b47f-8c39d4b03a50";
        
        $params = [
          "email" => true
        ];
        
        CrispClient->websitePeople->updatePeopleSubscriptionStatus(websiteId, peopleId, params);

👉 Notice: The peopleID argument can be an email or the peopleID.

  • Website Base

    • Create A Website [user, plugin]: Reference

      • CrispClient->website->create(params)

      • See Example
        CrispClient->website->create(params);
    • Delete A Website [user]: Reference

      • CrispClient->website->delete(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->website->delete(websiteId);
  • Website Settings

    • Get Website Settings [user, plugin]: Reference

      • CrispClient->websiteSettings->get(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteSettings->get(websiteId);
    • Update Website Settings [user, plugin]Reference:

      • CrispClient->websiteSettings->get(params)
  • Website Verify

    • Get Verify Settings [user, plugin]: Reference

      • CrispClient->websiteVerify->getSettings(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteVerify->getSettings(websiteId);
    • Update Verify Settings [user, plugin]: Reference

      • CrispClient->websiteVerify->updateSettings(websiteId, params)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        $params = [
          "enabled" => true
        ];
        
        CrispClient->websiteVerify->updateSettings(websiteId, params);
    • Get Verify Key [user, plugin]: Reference

      • CrispClient->websiteVerify->getKey(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteVerify->getKey(websiteId);
    • Roll Key [user, plugin]: Reference

      • CrispClient->websiteVerify->rollKey(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteVerify->rollKey(websiteId);
  • Website Operators

    • Get All Operators [user, plugin]: Reference

      • CrispClient->websiteOperators->getList(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteOperators->getList(websiteId);
    • Get One Operators [user, plugin]: Reference

      • CrispClient->websiteOperators->getOne(websiteId, operatorId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $operatorId = "d14ce289-f759-43c8-8854-00c57fb7e5d5";
        
        CrispClient->websiteOperators->getOne(websiteId, operatorId);
    • Delete One Operators [user, plugin]: Reference

      • CrispClient->websiteOperators->deleteOne(websiteId, operatorId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $operatorId = "d14ce289-f759-43c8-8854-00c57fb7e5d5";
        
        CrispClient->websiteOperators->deleteOne(websiteId, operatorId);
    • Update An Operator [user, plugin]: Reference

      • CrispClient->websiteOperators->updateOne(websiteId, operatorId, parameters)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $operatorId = "d14ce289-f759-43c8-8854-00c57fb7e5d5";
        
        $parameters = [
          "role" => "owner",
          "title" => "CTO"
        ];
        
        CrispClient->websiteOperators->updateOne(websiteId, operatorId, parameters);
  • Website Visitors

    • List Visitors [user, plugin]: Reference
      • CrispClient->websiteVisitors->listVisitors(websiteId, pageNumber)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pageNumber = 1;
        
        CrispClient->websiteVisitors->listVisitors(websiteId, pageNumber);
  • Website Availability

    • Get Availability Status [user, plugin]: Reference

      • CrispClient->websiteAvailability->getAvailabilityStatus(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteAvailability->getAvailabilityStatus(websiteId);
    • List Operator Availabilities [user, plugin]: Reference

      • CrispClient->websiteAvailability->listOperatorAvailabilities(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->websiteAvailability->listOperatorAvailabilities(websiteId);

Plugins

  • Plugin Subscriptions

    • List All Active Subsciptions [user]: Reference

      • CrispClient->pluginSubscriptions->listAllActiveSubscriptions()

      • See Example
        CrispClient->pluginSubscriptions->listAllActiveSubscriptions();
    • Get All Subscriptions For Website [user]: Reference

      • CrispClient->pluginSubscriptions->listSubscriptionsForWebsite(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        
        CrispClient->pluginSubscriptions->listSubscriptionsForWebsite(websiteId);
    • Get Subscription Details [user, plugin]: Reference

      • CrispClient->pluginSubscriptions->getSubscriptionDetails(websiteId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pluginId = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
        
        CrispClient->pluginSubscriptions->getSubscriptionDetails(websiteId, pluginId);
    • Subscribe Website To Plugin [user]: Reference

      • CrispClient->pluginSubscriptions->subscribeWebsiteToPlugin(websiteId, pluginId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pluginId = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
        
        $pluginId = "98454664-9f7d-4d95-a9ce-f37356f5e65a";
        
        CrispClient->pluginSubscriptions->subscribeWebsiteToPlugin(websiteId, pluginId);
    • Unsubscribe Plugin From Website [user]: Reference

      • CrispClient->pluginSubscriptions->unsubscribePluginFromWebsite(websiteId, pluginId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pluginId = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
        
        CrispClient->pluginSubscriptions->unsubscribePluginFromWebsite(websiteId, pluginId);
    • Get Subscription Settings [user, plugin]: Reference

      • CrispClient->pluginSubscriptions->getSubscriptionSettings(websiteId, pluginId)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pluginId = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
        
        CrispClient->pluginSubscriptions->getSubscriptionSettings(websiteId, pluginId);
    • Save Subscription Settings [user, plugin]: Reference

      • CrispClient->pluginSubscriptions->saveSubscriptionSettings(websiteId, pluginId, settings)

      • See Example
        $websiteId = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
        $pluginId = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
        
        $settings = [
          "chatbox" => [
            "25" => "#bbbbbb"
          ]
        ];
        
        CrispClient->pluginSubscriptions->saveSubscriptionSettings(websiteId, pluginId, settings);