Crisp Platform - API Reference
API Endpoint
https://api.crisp.im/v1The Crisp REST API offers access and control over all Crisp data (accounts, conversations, billing and much more).
📝 Reference revision: 05/30/2017
Prerequisites
In order to access the Crisp API, there are some things you first need to know.
Read the sections below before you start using the Crisp API.
Libraries
Crisp maintains official API wrappers in popular languages.
They are useful if you need to quickly implement common API features in your backend or frontend app.
-
node-crisp-api - Crisp API wrapper for NodeJS
-
go-crisp-api - Crisp API wrapper for Go
-
php-crisp-api - Crisp API wrapper for PHP
Authentication
Most API resources are protected with HTTP Basic authentication. You first need to authenticate using your Crisp credentials: both your email and password. Upon authentication, 2 permanent keys are returned, that allow you to authenticate against the API.
Those authentication keys are permanent (they never expire). Though, they get flushed when the account password is changed, for security reasons. You can consider them safe for long-term purposes.
Now that the authentication overview is covered, let’s dive into it.
1. Generate Your Authentication Keys
Authentication keys can be generated as explained below.
🔴 Important: Be sure to login once, and re-use the same authentication keys (same identifier + key) in all your subsequent requests to the API. Do not generate new tokens from your code for every new request to the API (you will be heavily rate-limited; that will induce HTTP failures for some of your API calls).
-
Submit a login request with your account email and password (see: Create A New Session)
-
The API returns 2 keys:
identifierandkey; keep those keys private!
Use the following cURL command in your terminal to generate your private API authentication keys:
curl -H "Content-Type: application/json" -X POST -d '{"email":"YOUR_ACCOUNT_EMAIL","password":"YOUR_ACCOUNT_PASSWORD"}' https://api.crisp.im/v1/user/session/login
You can now extract your private identifier and key from the login response.
2. Use Your Authentication Keys
Once you have your private authentication keys, you can use them to authenticate your HTTP requests to the API. You can do so by adding an Authorization header to all your HTTP calls. The Authorization header is formatted as such: Authorization: Basic BASE64(identifier:key) (replace BASE64(identifier:key) with your Base64 string).
Format your authentication string as such: identifier:key and encode it to Base64.
You may use a tool like an online Base64 Encoder to generate your Basic auth string (paste your identifier:key string to the ASCII Plain Text input and get your encoded string in the Base64 input).
To test if subsequent requests are authenticated, try sending a request to Check Session Validity. You will get a 200 OK response if authentication is valid.
If you are authenticating a plugin to the API, include the X-Crisp-Tier header in your HTTP requests, with the value plugin. No need to send it for regular user sessions, as user is the default value.
Rate Limits
To ensure resiliency against DOS and enforce a fair-use policy, the Crisp API has a multi-level rate-limit (based on client IP and user identifier, if authenticated).
-
Edge rate limit (a very permissive rate limit on Crisp edge load balancers; you should not hit against this limit very often)
-
Global rate limit (a permissive, API-wide rate limit that limits the total amount of requests a given IP and user identifier can submit to the API)
-
Per-route rate limit (a more restrictive, per-route rate limit based on user identifier if authenticated, or client IP)
If your client gets rate-limited, you will start receiving 429 Too Many Requests HTTP errors in response to your requests. This can be global or per-route, based on how you triggered our rate-limiting systems.
🚨 Security Reports
If you find any security hole in the Crisp API, you are more than welcome to report it directly to security@crisp.im.
⚠️ You must encrypt your email using the following GPG public key: GPG:E2F5BFD1.
👍 After we fix it, we will discuss about any bounty we can give you for the help.
🤝 Disclosures: Hely Shah, John Gracey, Haq Khokhar.
Email ¶
Manages Crisp emails.
Email Subscription ¶
Manages email subscriptions. Used to subscribe or unsubscribe from Crisp notification emails.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"subscribed": true
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "email_not_found",
"data": {}
}Get Subscription StatusGET/email/{email_hash}/subscription/{key}
Resolves current subscription status (subscribed or unsubscribed).
-
error (boolean)
-
reason (string)
-
data (object)
- subscribed (boolean) - Whether email is subscribed or not
- email_hash
string(required)Email secure hash
- key
string(required)Private security for given email
Headers
Content-Type: application/jsonBody
{
"subscribed": true
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "email_not_found",
"data": {}
}Update Subscription StatusPATCH/email/{email_hash}/subscription/{key}
Updates current subscription status (subscribe or unsubscribe).
- subscribed (boolean, required) - Whether to subscribe email or not
- email_hash
string(required)Email secure hash
- key
string(required)Private security for given email
Bucket ¶
Manages Crisp buckets.
Bucket URL ¶
Manages bucket URL operations. Used to handle file uploads.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"namespace": "avatar",
"from": "website",
"identifier": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"id": "b1a2",
"file": {
"name": "Logo.jpg",
"type": "image/jpeg"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "requested",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Generate Bucket URLPOST/bucket/url/generate
Generates a bucket URL. The URL is signed, and lets you upload a file directly to it.
The signed bucket URL response is sent back asynchronously on the real-time socket channel, using either the event namespace bucket:url:avatar:generated, bucket:url:upload:generated or bucket:url:campaign:generated (depending on the request namespace parameter).
-
namespace (string, required) - Bucket namespace
- Members
avataruploadcampaign
- Members
-
from (string, required) - File upload from
- Members
websiteoperator
- Members
-
identifier (string, required) - Identifier for website or operator (depends on
fromvalue) -
id (string, required) - Tracking ID, returned in asynchronous callback
-
file (object, required)
- name (string, required) - File name
- type (string, required) - File MIME type
Media ¶
Manages Crisp medias.
Media Animation ¶
Manages media animation operations. Used to look for animations.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "requested",
"data": {}
}List Animation MediasGET/media/animation/list/{page_number}{?search_query}{&list_id}
Lists animation medias, given the search query and paging.
The animation media list is sent back asynchronously on the real-time socket channel, using the event namespace media:animation:listed.
- page_number
number(optional)Page number for animation paging
- search_query
string(optional)Search query (if not set, trending animations are listed)
- list_id
string(optional)List ID (used to stamp response payload)
User ¶
Manages Crisp users (operators).
User Availability ¶
Manages user availability, as seen by the Crisp Platform.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"type": "away",
"time": {
"for": null,
"since": 1468434872510
}
}
}Get User AvailabilityGET/user/availability
Resolves the current user availability. Useful to check if a Crisp app is currently connected to the account.
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- type: (enum[string]) - Availability type
- Members
onlineawayoffline
- Members
- time (object)
- for (number) - Seconds for which the availability is valid
- since (number) - Timestamp since when the availability has been updated
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"type": "online",
"time": {
"for": 3600
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Update User AvailabilityPATCH/user/availability
Updates the advertised user availability, for a defined period of time after which to automatically expire.
-
type (enum[string], required) - Availability type
- Members
onlineawayoffline
- Members
-
time (object, required)
- for (number, required) - Seconds for which the availability is valid
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"status": "online"
}
}Get User Availability StatusGET/user/availability/status
Resolves the current user availability status. It differs from the raw user availability (the raw availability only tells if the user is connected on a Crisp app).
The availability status, however, tells whether the user is seen as online or offline by visitors (given his schedule and presence options).
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- status: (enum[string]) - Availability status
- Members
onlineawayoffline
- Members
User Account Base ¶
Manages operator user accounts (base).
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
}
}Get User AccountGET/user/account
Resolves the current user account information.
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
Headers
Content-Type: application/jsonBody
{
"email": "valerian@crisp.im",
"password": "MySuper$ecurePassword",
"first_name": "Valerian",
"last_name": "Saliou"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "created",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_email",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_password",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "exists",
"data": {}
}Create User AccountPOST/user/account
Creates a new Crisp user account (operator account).
-
email (string, required) - User email
-
password (string, required) - User password (at least 4 characters)
-
first_name (string, required) - User first name
-
last_name (string, required) - User last name
User Account Billing ¶
Manages billing information for user.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"cards": [
{
"card_id": "b5be332d-bf2b-464f-9710-27a1573740f7",
"name_on_card": "Valerian Saliou",
"address": "42 Mission St, San Francisco, CA USA",
"information": "Company name: Crisp IM, Inc.",
"card_number_preview": "XXXX XXXX XXXX 5879",
"card_provider": "mastercard",
"expiration_date": "2018-12-01T05:00:00.000Z",
"added_date": "2016-06-13T06:24:30.000Z",
"is_valid": true,
"is_expired": false,
"linked_websites": [
{
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im"
}
]
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_customer",
"data": {}
}List All Billing MethodsGET/user/account/billing
Resolves the saved billing details (payment methods).
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- cards (array[object]) - Active payment methods
- card_id (string) - Card identifier
- name_on_card (string) - Name on card
- address (string) - Address for cardholder
- information (string) - Information on cardholder
- card_number_preview (string) - Secure preview of card number (the Crisp Platform only retains this mangled number)
- card_provider (enum[string])
- Members
defaultmastercardvisaamexdinersclubdiscoverunionpayjcbvisaelectronmaestroforbrugsforeningendankortpaypalpaypal-europe
- Members
- expiration_date (string) - Date when the card expires
- added_date (string) - Date when the card was added
- is_valid (boolean) - Whether card is valid or not
- is_expired (boolean) - Whether card is expired or not
- linked_websites (array[object]) - Websites using this card as payment method
- website_id (string) - Website identifier
- name (string) - Name of website
- domain (string) - Domain of website
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"name_on_card": "Valerian Saliou",
"address": "42 Mission St, San Francisco, CA USA",
"card_number": "1234567898765432",
"security_code": "666",
"expiration_date": {
"month": "01",
"year": "2017"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {
"card_id": "b5be332d-bf2b-464f-9710-27a1573740f7"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_card_number",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_security_code",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_expiration_date",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "billing_exists",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_customer",
"data": {}
}Add New Billing MethodPOST/user/account/billing
Adds a payment method (credit card) to the user account.
-
name_on_card (string, required) - Name on card
-
address (string, required) - Address for cardholder
-
information (string, optional) - Information on cardholder
-
card_number (string, required) - Card number
-
security_code (string, required) - Card CVC
-
expiration_date (object, required) - Date when the card expires
- month (string, required) - Month of expiration (if 1 digit, prepend it with a zero)
- year (string, required) - Year of expiration
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"card_id": "b5be332d-bf2b-464f-9710-27a1573740f7",
"name_on_card": "Baptiste Jamin",
"address": "42 Mission Street, San Francisco, CA USA",
"card_number_preview": "XXXX XXXX XXXX 5879",
"card_provider": "mastercard",
"expiration_date": "2016-12-31T23:00:00.000Z",
"added_date": "2016-07-08T10:16:02.000Z",
"is_valid": true,
"is_expired": false,
"linked_websites": [
{
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp Development",
"domain": "crisp.im"
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_customer",
"data": {}
}Get A Billing MethodGET/user/account/billing/{card_id}
Acquires information about a saved billing method (eg: credit card).
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- card_id (string) - Card identifier
- name_on_card (string) - Name on card
- address (string) - Address for cardholder
- information (string) - Information on cardholder
- card_number_preview (string) - Secure preview of card number (the Crisp Platform only retains this mangled number)
- card_provider (enum[string])
- Members
defaultmastercardvisaamexdinersclubdiscoverunionpayjcbvisaelectronmaestroforbrugsforeningendankortpaypalpaypal-europe
- Members
- expiration_date (string) - Date when the card expires
- added_date (string) - Date when the card was added
- is_valid (boolean) - Whether card is valid or not
- is_expired (boolean) - Whether card is expired or not
- linked_websites (array[object]) - Websites using this card as payment method
- website_id (string) - Website identifier
- name (string) - Name of website
- domain (string) - Domain of website
- card_id
string(required)The card identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "removed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "still_linked_to_websites",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_customer",
"data": {}
}Remove A Billing MethodDELETE/user/account/billing/{card_id}
Deletes a saved billing method.
- card_id
string(required)The card identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"results": [
{
"invoice_id": "b6d44fd2-903d-440d-b73a-a520df59ed92",
"bill_id": "INV-58B7-16",
"date": "2016-07-07T18:03:00.000Z",
"payment": {
"is_paid": false,
"number_retries": 3
},
"invoice": {
"id": "b6d44fd2-903d-440d-b73a-a520df59ed92",
"currency": "usd",
"due": {
"total": 5,
"parts": [
{
"id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"plugins": [
{
"id": "12a1a9b5-588d-4a5f-9007-4cce1093ef3a",
"name": "Email Redirect",
"price": 5
}
]
}
]
}
},
"receipt": null
}
],
"paging": {
"range": [
1,
1
],
"per_page": 10,
"total": 1
}
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"results": [
{
"invoice_id": "b6d44fd2-903d-440d-b73a-a520df59ed92",
"bill_id": "INV-58B7-16",
"date": "2016-07-07T18:03:00.000Z",
"payment": {
"is_paid": false,
"number_retries": 3
},
"invoice": {
"id": "b6d44fd2-903d-440d-b73a-a520df59ed92",
"currency": "usd",
"due": {
"total": 5,
"parts": [
{
"id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"plugins": [
{
"id": "12a1a9b5-588d-4a5f-9007-4cce1093ef3a",
"name": "Email Redirect",
"price": 5
}
]
}
]
}
},
"receipt": null
}
],
"paging": {
"range": [
1,
1
],
"per_page": 10,
"total": 5
}
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "no_invoice_available",
"data": {}
}List Invoices For Billing MethodGET/user/account/billing/{card_id}/invoices/{page_number}
Lists saved invoices for billing method.
-
error (boolean)
-
reason (string)
-
data (object)
- results (array[object]) - List of invoices
- invoice_id (string) - Invoice identifier (reference invoice number)
- bill_id (string) - Bill identifier (lawful invoice number)
- date (string) - Date at which invoice was emitted
- payment (object)
- is_paid (boolean) - Whether invoice is paid or not
- number_retries (number) - Number of times payment was retried (if failed)
- invoice (object)
- id (string) - Invoice identifier
- currency (string) - Invoice currency
- due (object) - Due amount details
- total (number) - Total due as part of this invoice (in specified currency)
- parts (array[object]) - Contents of the invoice (per-website)
- id (string) - Website identifier
- name (string) - Name of the website
- domain (string) - Domain of the website
- plugins (array[object]) - Plugins paid for the website
- id (string) - Plugin identifier
- name (string) - Plugin name
- price (number) - Plugin individual price
- receipt (string) - Invoice payment receipt document URL (can be blank)
- paging (object) - Paging details
- range (array[number]) - Range of items returned
- per_page (number) - Number of items per page
- total (number) - Total number of items
- results (array[object]) - List of invoices
- card_id
string(required)The card identifier
- page_number
number(optional)The page number (paging if many invoices)
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"invoice_id": "b6d44fd2-903d-440d-b73a-a520df59ed92",
"bill_id": "INV-58B7-16",
"date": "2016-07-07T18:03:00.000Z",
"payment": {
"is_paid": false,
"number_retries": 3
},
"invoice": {
"id": "b6d44fd2-903d-440d-b73a-a520df59ed92",
"currency": "usd",
"due": {
"total": 5,
"parts": [
{
"id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"plugins": [
{
"id": "12a1a9b5-588d-4a5f-9007-4cce1093ef3a",
"name": "Email Redirect",
"price": 5
}
]
}
]
}
},
"receipt": null
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invoice_not_found",
"data": {}
}Get An Invoice For Billing MethodGET/user/account/billing/{card_id}/invoice/{invoice_id}
Gets given saved invoice for billing method.
-
error (boolean)
-
reason (string)
-
data (object)
- invoice_id (string) - Invoice identifier (reference invoice number)
- bill_id (string) - Bill identifier (lawful invoice number)
- date (string) - Date at which invoice was emitted
- payment (object)
- is_paid (boolean) - Whether invoice is paid or not
- number_retries (number) - Number of times payment was retried (if failed)
- invoice (object)
- id (string) - Invoice identifier
- currency (string) - Invoice currency
- due (object) - Due amount details
- total (number) - Total due as part of this invoice (in specified currency)
- parts (array[object]) - Contents of the invoice (per-website)
- id (string) - Website identifier
- name (string) - Name of the website
- domain (string) - Domain of the website
- plugins (array[object]) - Plugins paid for the website
- id (string) - Plugin identifier
- name (string) - Plugin name
- price (number) - Plugin individual price
- receipt (string) - Invoice payment receipt document URL (can be blank)
- card_id
string(required)The card identifier
- invoice_id
string(required)The invoice identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"service": "paypal"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "requested",
"data": {}
}Link To An External Billing MethodPOST/user/account/billing/link
Links to an external billing method. Used to for services which need an external approval (eg: PayPal), and that cannot be added directly via a simple form submit.
A link to open to continue linking to the service will be dispatched to the user via the realtime socket interface (the response is asynchronous, as Crisp needs to request data to external APIs, eg: PayPal API). The response uses the event namespace billing:link:redirect
- service (enum[string], required) - Service to be linked
- Members
paypal
- Members
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "linked",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_card_link",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_customer",
"data": {}
}Finish Linking External Billing MethodPOST/user/account/billing/link/{card_id}
Finishes the link process to an external billing method. Used to mark the card link as valid.
This is used after the card link redirect, to validate card authorization, eg: with PayPal pre-approved payments.
- card_id
string(required)The card identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "unlinked",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_card_link",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_customer",
"data": {}
}Finish Unlinking External Billing MethodDELETE/user/account/billing/link/{card_id}
Finishes the unlink process to an external billing method. Used to cancel the link process and remove the card.
This is used after the card link redirect, to mark card authorization as rejected, eg: with PayPal pre-approved payments.
- card_id
string(required)The card identifier
User Account Notification ¶
Manages notification settings for user.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"disabled": false,
"messages_online": true,
"messages_offline": true,
"messages_transcript": false,
"messages_rating": true,
"sounds": true
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "notification_not_found",
"data": {}
}Get Notification SettingsGET/user/account/notification
Resolves the user notification settings.
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- disabled (boolean) - Whether notifications are disabled or not
- messages_online (boolean) - Whether to notify of incoming messages when user is online (in-app notifications)
- messages_offline (boolean) - Whether to notify of incoming messages when user is offline (push notifications)
- messages_transcript (boolean) - Whether to notify of transcript records for conversations (email notifications)
- messages_rating (boolean) - Whether to notify of user ratings for conversations (email notifications)
- sounds (boolean) - Whether to play sounds for incoming events (in-app)
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"disabled": false,
"messages_online": true,
"messages_offline": true,
"messages_transcript": false,
"messages_rating": true,
"sounds": true
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "notification_not_found",
"data": {}
}Update Notification SettingsPATCH/user/account/notification
Updates the user notification settings.
-
disabled (boolean, optional) - Whether notifications are disabled or not
-
messages_online (boolean, optional) - Whether to notify of incoming messages when user is online (in-app notifications)
-
messages_offline (boolean, optional) - Whether to notify of incoming messages when user is offline (push notifications)
-
messages_transcript (boolean, optional) - Whether to notify of transcript records for conversations (email notifications)
-
messages_rating (boolean, optional) - Whether to notify of user ratings for conversations (email notifications)
-
sounds (boolean, optional) - Whether to play sounds for incoming events (in-app)
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"notification_id": "8285c027-1a50-48df-a70f-c8b08955fe4f"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {}
}Add A Notification ProviderPOST/user/account/notification/provider
Adds a notification provider. Used to subscribe to push notifications from Crisp for authenticated account (eg: Google Cloud Messaging, Apple Push Notification and more).
- notification_id (string, required) - Notification identifier (key from GCM, APN or other service)
User Account Websites ¶
Manages websites linked to user.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"logo": "https://storage.crisp.im/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/ed9f8379-852b-4ee6-bf72-65edb0401be9.jpg",
"members": [
"4e734085-ddbb-451f-bfb7-906ef9200793",
"aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
],
"count": 0
}
]
}List WebsitesGET/user/account/websites
Lists the websites linked to user.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Website identifier
- name (string) - Website name
- domain (string) - Website domain
- logo (string) - Website custom logo image URL (can be blank)
- members (array[string]) - Website operators (user identifiers)
- count (number) - Number of unread messages for website
User Account Profile ¶
Manages user profile.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"avatar": null,
"email": "valerian@crisp.im",
"first_name": "Valerian",
"last_name": "Saliou"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "profile_not_found",
"data": {}
}Get ProfileGET/user/account/profile
Resolves user profile data.
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- avatar (string) - Custom avatar image URL (can be blank)
- email (string) - User email
- first_name (string) - User first name
- last_name (string) - User last name
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"first_name": "Valerian",
"last_name": "Saliou",
"email": "valerian@crisp.im",
"password": "MyNewSuperSecurePassword",
"avatar": null
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_password",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "profile_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "email_not_available",
"data": {}
}Update ProfilePATCH/user/account/profile
Updates user profile data.
-
first_name (string, optional) - User first name
-
last_name (string, optional) - User last name
-
email (string, optional) - User email
-
password (string, optional) - User password (do not set it if you don’t need to update password)
-
avatar (string, optional) - Custom avatar image URL
User Account Recover ¶
Manages account recovery.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "valid",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_recover_key",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "recover_not_found",
"data": {}
}Get Recovery DetailsGET/user/account/recover/{recover_identifier}/{recover_key}
Gets details on a recovery keypair. Useful to check validity of recovery keypair.
-
error (boolean)
-
reason (string)
-
data (object)
- recover_identifier
string(required)The recovery identifier
- recover_key
string(required)The recovery key
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "recovered",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_recover_key",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_password",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "recover_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "profile_not_found",
"data": {}
}Send Recovery PasswordPUT/user/account/recover/{recover_identifier}/{recover_key}
Submits new password and recover account.
- password (string, required) - User password (at least 4 characters)
- recover_identifier
string(required)The recovery identifier
- recover_key
string(required)The recovery key
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_recover_key",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "recover_not_found",
"data": {}
}Delete Recovery KeypairDELETE/user/account/recover/{recover_identifier}/{recover_key}
Deletes a recovery keypair. Useful to invalidate keys if you ignore recovery and never use the keys to recover password.
- recover_identifier
string(required)The recovery identifier
- recover_key
string(required)The recovery key
User Account Schedule ¶
Manages account schedule settings.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "65693ca4-fb8f-4424-a779-5f65770c0ecc",
"enabled": true,
"presence": true,
"stealth": false,
"offset": -120,
"days": {
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"sunday": false
},
"hours": [
{
"from": "08:30",
"to": "12:30"
},
{
"from": "14:30",
"to": "18:30"
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "schedule_not_found",
"data": {}
}Get Schedule SettingsGET/user/account/schedule
Gets user schedule settings. Those settings are used by Crisp to automatically schedule when user will be seen online or offline by website visitors.
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- enabled (boolean) - Whether schedule is enabled or not
- presence (boolean) - Whether to consider user online if using an app
- stealth (boolean) - Whether stealth mode is enabled or not (offline mode forced)
- offset (number) - User timezone offset in seconds (UTC+2 is -120)
- days (object) - Schedule days
- monday (boolean) - Consider Monday on schedule
- tuesday (boolean) - Consider Tuesday on schedule
- wednesday (boolean) - Consider Wednesday on schedule
- thursday (boolean) - Consider Thursday on schedule
- friday (boolean) - Consider Friday on schedule
- saturday (boolean) - Consider Saturday on schedule
- sunday (boolean) - Consider Sunday on schedule
- hours (array[object]) - Schedule hours
- from (string) - Hour from which to consider on schedule (24:00 format)
- to (string) - Hour up to which to consider on schedule (24:00 format)
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"enabled": true,
"presence": true,
"stealth": false,
"offset": -120,
"days": {
"monday": true,
"sunday": false
},
"hours": [
{
"from": "08:30",
"to": "12:30"
},
{
"from": "14:30",
"to": "18:30"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "schedule_not_found",
"data": {}
}Update Schedule SettingsPATCH/user/account/schedule
Updates user schedule settings.
-
enabled (boolean, optional) - Whether schedule is enabled or not
-
presence (boolean, optional) - Whether to consider user online if using an app
-
stealth (boolean, optional) - Whether stealth mode is enabled or not (offline mode forced)
-
offset (number, optional) - User timezone offset in seconds (UTC+2 is -120)
-
days (object, optional) - Schedule days
- monday (boolean, optional) - Consider Monday on schedule
- tuesday (boolean, optional) - Consider Tuesday on schedule
- wednesday (boolean, optional) - Consider Wednesday on schedule
- thursday (boolean, optional) - Consider Thursday on schedule
- friday (boolean, optional) - Consider Friday on schedule
- saturday (boolean, optional) - Consider Saturday on schedule
- sunday (boolean, optional) - Consider Sunday on schedule
-
hours (array[object], optional) - Schedule hours
- from (string, optional) - Hour from which to consider on schedule (24:00 format)
- to (string, optional) - Hour up to which to consider on schedule (24:00 format)
User Session ¶
Manages API sessions.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonCheck Session ValidityHEAD/user/session
Checks whether the user is logged in or not, and whether his session is valid or not.
Headers
Content-Type: application/jsonBody
{
"email": "valerian@crisp.im",
"password": "MySuperSecurePassword"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "session_created",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"identifier": "1d4f5781-5fcc-4f90-8e7a-21b5242eaad7",
"key": "43d1717200a93337526daeb1123462a54fd018c37bd5216ddf1557b4773ee9b9"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "rejected",
"data": {}
}Create A New SessionPOST/user/session/login
Logins to user account and create a new session.
-
email (string, required) - User email
-
password (string, required) - User password
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "session_deleted",
"data": {}
}Destroy A SessionPOST/user/session/logout
Logouts from user account and destroys current session.
Headers
Content-Type: application/jsonBody
{
"email": "valerian@crisp.im"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "email_sent",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "account_not_found",
"data": {}
}Recover A SessionPOST/user/session/recover
Recovers an user account from which we are locked out. A password recovery email is sent.
- email (string, required) - User email
User Statistics ¶
Manages statistics related to user.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"unread": 20
}
}Count Total Unread MessagesGET/user/stats/unread
Counts the total number of unread messages, cross-website.
Website ¶
Manages Crisp websites.
Website Base ¶
Manages websites.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"name": "Acme, Inc.",
"domain": "acme-inc.com"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {
"website_id": "e2efddb0-d1ce-47fd-99f5-d3a5b69f1def"
}
}Create WebsitePOST/website
Creates a new website.
-
name (string, required) - Website name
-
domain (string, required) - Website domain
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"logo": "https://storage.crisp.im/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/b6c2948d-b061-405e-91a9-2fdf855d1cc0.png"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get A WebsiteGET/website/{website_id}
Resolves an existing website information.
-
error (boolean)
-
reason (string)
-
data (object)
- website_id (string) - Website identifier
- name (string) - Website name
- domain (string) - Website domain
- logo (string) - Website custom logo image URL (can be blank)
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Delete A WebsiteDELETE/website/{website_id}
Deletes an existing website.
- website_id
string(required)The website identifier
Website Batch ¶
Proceeds batch operations on website.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Resolve Given ConversationsPATCH/website/batch/resolve
Resolves given (or all) conversations in website.
- sessions (array[string], optional) - List of session identifiers to resolve conversation for (if empty, resolve all)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "read",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Read Given ConversationsPATCH/website/batch/read
Marks given (or all) conversations as read in website.
- sessions (array[string], optional) - List of session identifiers to read conversation for (if empty, read all)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"sessions": [
"session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
"session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "removed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Remove Given ConversationsPATCH/website/batch/remove
Removes given conversations in website.
- sessions (array[string], required) - List of session identifiers to remove conversation for
Website Billing ¶
Manages website billing information.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"card_id": "b5be332d-bf2b-464f-9710-27a1573740f7",
"name_on_card": "Valerian Saliou",
"address": "42 Mission St, San Francisco, CA USA",
"card_number_preview": "XXXX XXXX XXXX 5879",
"card_provider": "mastercard",
"expiration_date": "2016-12-31T23:00:00.000Z",
"added_date": "2016-07-08T10:16:02.000Z",
"is_valid": true,
"is_expired": false,
"linked_websites": [
{
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im"
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "no_billing_card",
"data": {}
}Get Website BillingGET/website/{website_id}/billing
Resolves website billing information (payment method linked to website).
-
card_id (string) - Card identifier
-
name_on_card (string) - Name on card
-
address (string) - Address for cardholder
-
information (string) - Information on cardholder
-
card_number_preview (string) - Secure preview of card number (the Crisp Platform only retains this mangled number)
-
card_provider (enum[string])
- Members
defaultmastercardvisaamexdinersclubdiscoverunionpayjcbvisaelectronmaestroforbrugsforeningendankortpaypalpaypal-europe
- Members
-
expiration_date (string) - Date when the card expires
-
added_date (string) - Date when the card was added
-
is_valid (boolean) - Whether card is valid or not
-
is_expired (boolean) - Whether card is expired or not
-
linked_websites (array[object]) - Websites using this card as payment method
- website_id (string) - Website identifier
- name (string) - Name of website
- domain (string) - Domain of website
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"card_id": "b5be332d-bf2b-464f-9710-27a1573740f7"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "linked",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "billing_card_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "card_link_exists",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "billing_card_invalid",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "billing_card_expired",
"data": {}
}Update Website BillingPATCH/website/{website_id}/billing
Updates website billing information (payment method linked to website).
- card_id (string, required) - Card identifier to link to website
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "unlinked",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "no_billing_card",
"data": {}
}Unlink Website BillingDELETE/website/{website_id}/billing/{card_id}
Unlink website billing information (payment method linked to website).
- website_id
string(required)The website identifier
- card_id
string(required)The card identifier
Website Availability ¶
Manages website availability operations.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"status": "online",
"since": 1495877133091
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Get Website Availability StatusGET/website/{website_id}/availability/status
Resolves the website availability status. This tells whether the chatbox is seen as online or away by visitors.
The availability status is set to online if at least one operator can be seen as online (given his account availability settings).
-
error (boolean)
-
reason (string)
-
data (object)
- status: (enum[string]) - Availability status
- Members
onlineawayoffline
- Members
- since (number) - Timestamp since when the availability has been updated
- status: (enum[string]) - Availability status
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"user_id": "a4c32c68-be91-4e29-8a05-976e93abbe3f",
"type": "online",
"time": {
"for": 40,
"since": 1479999493561
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List Website Operator AvailabilitiesGET/website/{website_id}/availability/operators
Lists the availabilities for website operators. This maps the availability of each operator in the website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- user_id (string) - User identifier
- type: (enum[string]) - Availability type
- Members
onlineawayoffline
- Members
- time (object)
- for (number) - Seconds for which the availability is valid
- since (number) - Timestamp since when the availability has been updated
- website_id
string(required)The website identifier
Website Channel ¶
Manages website channel operations.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"email": "w.f0f413d6c2d4b800@mail.crisp.im"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Get Website Email ChannelGET/website/{website_id}/channel/email
Resolves the website email channel value. The returned email is static (it does not change), and can be used to receive email messages in the Crisp inbox. Operators can reply to incoming emails from Crisp.
-
error (boolean)
-
reason (string)
-
data (object)
- email: (string) - Website email
- website_id
string(required)The website identifier
Website Operators ¶
Manages multiple website operators.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"type": "operator",
"details": {
"user_id": "a53c456f-286a-490c-8793-d2a651838137",
"email": "baptiste@crisp.im",
"first_name": "Baptiste",
"last_name": "Jamin",
"role": "member",
"availability": "away"
}
},
{
"type": "operator",
"details": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"email": "valerian@crisp.im",
"first_name": "Valerian",
"last_name": "Saliou",
"role": "owner",
"availability": "online"
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "operators_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List Website OperatorsGET/website/{website_id}/operators/list
Lists all operator members of website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- type (enum[string]) - Member type
- Members
operatorinvite
- Members
- details (object) - Member details
- user_id (string) - User identifier
- email (string) - User email
- avatar (string) - User avatar
- first_name (string) - User first name
- last_name (string) - User last name
- role (enum[string]) - User role
- Members
ownermember
- Members
- availability (enum[string]) - User availability
- Members
onlineawayoffline
- Members
- type (enum[string]) - Member type
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"user_id": "a53c456f-286a-490c-8793-d2a651838137",
"avatar": null,
"nickname": "Baptiste",
"timestamp": 1486797010264
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List Last Active Website OperatorsGET/website/{website_id}/operators/active
Lists last active website operators, ie. operators who last replied to a visitor message.
-
error (boolean)
-
reason (string)
-
data (array[object])
- user_id (string) - Operator user identifier
- avatar (string) - Operator avatar
- nickname (string) - Operator nickname
- timestamp (number) - Timestamp at which operator was last active
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "flushed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Flush Last Active Website OperatorsDELETE/website/{website_id}/operators/active
Flushes the list of last active website operators, ie. operators who last replied to a visitor message.
- website_id
string(required)The website identifier
Website Operator ¶
Manages a single website operator.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b",
"email": "valerian@crisp.im",
"first_name": "Valerian",
"last_name": "Saliou",
"role": "owner",
"availability": "online"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "operator_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Get A Website OperatorGET/website/{website_id}/operator/{user_id}
Resolves a given website operator.
-
error (boolean)
-
reason (string)
-
data (object)
- user_id (string) - User identifier
- email (string) - User email
- avatar (string) - User avatar
- first_name (string) - User first name
- last_name (string) - User last name
- role (enum[string]) - User role
- Members
ownermember
- Members
- availability (enum[string]) - User availability
- Members
onlineawayoffline
- Members
- website_id
string(required)The website identifier
- user_id
string(required)The user identifier for operator
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"email": "julien@crisp.im",
"role": "member"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "invited",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "operator_exists",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invite_exists",
"data": {}
}Invite A Website OperatorPOST/website/{website_id}/operator
Invites an email to join website as operator. The target email doesn’t need to be a valid Crisp account, since Crisp will send an invite email to that email. The receiver is then prompted to click on a link to either join the website with an existing account, or create a new account on the fly.
-
email (string, required) - Operator email
-
role (enum[string], required) - Operator role
- Members
ownermember
- Members
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"role": "owner"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "last_owner",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "operator_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "billing_owner",
"data": {}
}Change Operator RolePATCH/website/{website_id}/operator/{user_id}
Changes the role of an existing operator. Useful to downgrade or upgrade an operator from/to owner role.
- role (enum[string], required) - Operator role
- Members
ownermember
- Members
- website_id
string(required)The website identifier
- user_id
string(required)The user identifier for operator
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "unlinked",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_self_user",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "last_owner",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "operator_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "billing_owner",
"data": {}
}Unlink Operator From WebsiteDELETE/website/{website_id}/operator/{user_id}
Unlinks given operator from website. Note that the last operator in the website cannot be unlinked.
- website_id
string(required)The website identifier
- user_id
string(required)The user identifier for operator
Website Invite ¶
Manages website membership invites. Used to redeem invites.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "valid",
"data": {
"email": "julien@crisp.im",
"role": "member"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_invite_key",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invite_not_found",
"data": {}
}Get Invite DetailsGET/website/{website_id}/invite/{invite_identifier}/{invite_key}
Gets details on a invite keypair. Useful to check validity of invite keypair.
-
error (boolean)
-
reason (string)
-
data (object)
- email (string) - Invite email (doesn’t need to match when redeeming later)
- role (string) - Invite role
- website_id
string(required)The website identifier
- invite_identifier
string(required)The invite identifier
- invite_key
string(required)The invite key
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "redeemed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_invite_key",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invite_not_found",
"data": {}
}Redeem InvitePUT/website/{website_id}/invite/{invite_identifier}/{invite_key}
Redeems invite and join the website as operator.
- website_id
string(required)The website identifier
- invite_identifier
string(required)The invite identifier
- invite_key
string(required)The invite key
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_invite_key",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invite_not_found",
"data": {}
}Delete Invite KeypairDELETE/website/{website_id}/invite/{invite_identifier}/{invite_key}
Deletes an invite keypair. Useful to invalidate keys if you ignore invite and never use the keys to redeem invite.
- website_id
string(required)The website identifier
- invite_identifier
string(required)The invite identifier
- invite_key
string(required)The invite key
Website Rating ¶
Manages website ratings. Used for people to rate websites.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolve",
"data": {
"stars": 4,
"role": "Good support.",
"created_at": 1482845836236
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "rating_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_rating_disabled",
"data": {}
}Resolve Session RatingGET/website/{website_id}/rating/session/{session_id}
Gets a session rating for website. Used to retrieve rating details from a given session.
-
error (boolean)
-
reason (string)
-
data (object)
- stars (number) - Number of stars for rating, from
1to5 - comment (string) - Comment for rating
- created_at (number) - Rating creation timestamp
- stars (number) - Number of stars for rating, from
- website_id
string(required)The website identifier
- session_id
string(required)The session identifier
Headers
Content-Type: application/jsonBody
{
"stars": 4,
"comment": "Good support."
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "rating_exists",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_rating_disabled",
"data": {}
}Submit Session RatingPUT/website/{website_id}/rating/session/{session_id}
Submits a session rating for website. Used for session users to publish their own website rating.
-
stars (number, required) - Number of stars for rating, from
1to5 -
comment (string, optional) - Comment for rating
- website_id
string(required)The website identifier
- session_id
string(required)The session identifier
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "rating_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_rating_disabled",
"data": {}
}Delete Session RatingDELETE/website/{website_id}/rating/session/{session_id}
Deletes a session rating for website. Used for session users to revoke their own website rating.
- website_id
string(required)The website identifier
- session_id
string(required)The session identifier
Website Settings ¶
Manages the website settings.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"logo": "https://storage.crisp.im/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/b6c2948d-b061-405e-91a9-2fdf855d1cc0.png",
"contact": {
"email": "contact@crisp.im",
"phone": "+33642926829",
"messenger": null,
"telegram": null,
"twitter": "crisp-im"
},
"emails": {
"rating": true,
"transcript": true
},
"chatbox": {
"tile": "default",
"wait_game": false,
"last_operator_face": false,
"activity_metrics": true,
"availability_tooltip": true,
"hide_on_away": false,
"position_reverse": false,
"email_visitors": false,
"ignore_privacy": false,
"check_domain": false,
"color_theme": "blue",
"text_theme": "default",
"welcome_message": "default",
"locale": "en",
"blocked_pages": [
"/status/*/",
"docs.crisp.im/*/",
"crisp.im/terms/",
"https://crisp.im/privacy/"
],
"blocked_locales": [
"fa",
"he"
]
}
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get Website SettingsGET/website/{website_id}/settings
Resolves the current settings for a website.
-
error (boolean)
-
reason (string)
-
data (object)
- website_id (string) - Website identifier
- name (string) - Website name
- domain (string) - Website domain
- logo (string) - Website custom logo image URL (can be blank)
- contact (object) - Website contact information
- email (string) - Contact email (can be blank)
- phone (string) - Contact phone number (can be blank)
- messenger (string) - Contact handle on Messenger (can be blank)
- telegram (string) - Contact handle on Telegram (can be blank)
- twitter (string) - Contact handle on Twitter (can be blank)
- emails (object) - Emails settings
- rating (boolean) - Whether to ask users to rate support or not
- transcript (boolean) - Whether to notify users of transcript records for conversation or not
- chatbox (object) - Chatbox settings
- tile (enum[string]) - Which tile to use for messages view background in chatbox (set to blank value for none)
- Members
default4-point-starsanchors-awayautumnaztecbamboobank-notebathroom-floorbevel-circleboxesbrick-wallbubblescagecharlie-brownchurch-on-sundaycircles-and-squarescircuit-boardconnectionscork-screwcurrentcurtaindeath-stardiagonal-linesdiagonal-stripesdominosendless-cloudseyesfalling-trianglesfancy-rectanglesflipped-diamondsfloating-cogsfloor-tileglamorousgraph-papergroovyhappy-intersectionheavy-rainhexagonshideouthoundstoothi-like-foodintersecting-circleskiwileafline-in-motionlipslisbonmeltmoroccanmorphing-diamondsoverlapping-circlesoverlapping-diamondsoverlapping-hexagonsparkay-floorpiano-manpie-factorypixel-dotspluspolka-dotsrailsrainrandom-shapesrounded-plus-connectedsignalskullsslanted-starssquares-in-squaressquaresstamp-collectionsteel-beamsstripestempletic-tac-toetiny-checkersvolcano-lampwallpaperwigglex-equalsyyyzig-zag
- Members
- wait_game (boolean) - Whether to suggest user to play a wait game or not (if operators do not reply fast enough)
- last_operator_face (boolean) - Whether to show last operator face in chatbox button or not
- activity_metrics (boolean) - Whether to show activity metrics in chatbox or not
- availability_tooltip (boolean) - Whether to show availability tooltip or not
- hide_on_away (boolean) - Whether to hide chatbox on away or not
- position_reverse (boolean) - Whether reverse chatbox position or not
- email_visitors (boolean) - Whether to ask for visitor email or not
- ignore_privacy (boolean) - Whether to disable privacy filters and ignore user choices (eg. user Do Not Track value)
- check_domain (boolean) - Whether to check website domain before creating sessions or not
- color_theme (string) - Which color theme to use
- Members
default4-point-starsanchors-awayautumnaztecbamboobank-notebathroom-floorbevel-circleboxesbrick-wallbubblescagecharlie-brownchurch-on-sundaycircles-and-squarescircuit-boardconnectionscork-screwcurrentcurtaindeath-stardiagonal-linesdiagonal-stripesdominosendless-cloudseyesfalling-trianglesfancy-rectanglesflipped-diamondsfloating-cogsfloor-tileglamorousgraph-papergroovyhappy-intersectionheavy-rainhexagonshideouthoundstoothi-like-foodintersecting-circleskiwileafline-in-motionlipslisbonmeltmoroccanmorphing-diamondsoverlapping-circlesoverlapping-diamondsoverlapping-hexagonsparkay-floorpiano-manpie-factorypixel-dotspluspolka-dotsrailsrainrandom-shapesrounded-plus-connectedsignalskullsslanted-starssquares-in-squaressquaresstamp-collectionsteel-beamsstripestempletic-tac-toetiny-checkersvolcano-lampwallpaperwigglex-equalsyyyzig-zag
- Members
- text_theme (string) - Which text theme to use
- Members
default1234
- Members
- welcome_message (string) - Which welcome message to display on chatbox open
- Members
default12345
- Members
- locale (string) - Which locale to enforce (can be blank for auto-detect)
- blocked_pages (array[string]) - Blocked pages (chatbox is hidden for those page URLs)
- blocked_locales (array[string]) - Blocked locales (chatbox is hidden for those locales, ISO 639-1)
- tile (enum[string]) - Which tile to use for messages view background in chatbox (set to blank value for none)
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"name": "Crisp",
"domain": "crisp.im",
"logo": "https://storage.crisp.im/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/b6c2948d-b061-405e-91a9-2fdf855d1cc0.png",
"contact": {
"email": "contact@crisp.im",
"phone": "+33642926829"
},
"emails": {
"rating": true,
"transcript": true
},
"chatbox": {
"tile": "default",
"wait_game": false,
"last_operator_face": false,
"activity_metrics": true,
"availability_tooltip": true,
"hide_on_away": false,
"position_reverse": false,
"email_visitors": false,
"ignore_privacy": false,
"check_domain": false,
"color_theme": "blue",
"text_theme": "default",
"welcome_message": "default",
"locale": "en",
"blocked_pages": [
"status/*/",
"docs.crisp.im/*",
"crisp.im/terms/",
"https://crisp.im/privacy/"
],
"blocked_locales": [
"fa",
"he"
]
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Update Website SettingsPATCH/website/{website_id}/settings
Updates the current settings for a website.
-
name (string, optional) - Website name
-
domain (string, optional) - Website domain
-
logo (string, optional) - Website custom logo image URL (can be blank)
-
contact (object, optional) - Website contact information
- email (string, optional) - Contact email (can be blank)
- phone (string, optional) - Contact phone number (can be blank)
- messenger (string, optional) - Contact handle on Messenger (can be blank)
- telegram (string, optional) - Contact handle on Telegram (can be blank)
- twitter (string, optional) - Contact handle on Twitter (can be blank)
-
emails (object, optional) - Emails settings
- rating (boolean, optional) - Whether to ask users to rate support or not
- transcript (boolean, optional) - Whether to notify users of transcript records for conversation or not
-
chatbox (object, optional) - Chatbox settings
- tile (enum[string], optional) - Which tile to use for messages view background in chatbox (set to blank value for none)
- Members
defaultcirclessquaresraysdiamonds
- Members
- wait_game (boolean, optional) - Whether to suggest user to play a wait game or not (if operators do not reply fast enough)
- last_operator_face (boolean, optional) - Whether to show last operator face in chatbox button or not
- activity_metrics (boolean, optional) - Whether to show activity metrics in chatbox or not
- availability_tooltip (boolean, optional) - Whether to show availability tooltip or not
- hide_on_away (boolean, optional) - Whether to hide chatbox on away or not
- position_reverse (boolean, optional) - Whether reverse chatbox position or not
- email_visitors (boolean, optional) - Whether to ask for visitor email or not
- ignore_privacy (boolean, optional) - Whether to disable privacy filters and ignore user choices (eg. user Do Not Track value)
- check_domain (boolean, optional) - Whether to check website domain before creating sessions or not
- color_theme (string, optional) - Which color theme to use
- Members
defaultamberblackblueblue_greylight_bluebrowncyangreenlight_greengreyindigoorangedeep_orangepinkpurpledeep_purpleredteal
- Members
- text_theme (string, optional) - Which text theme to use
- Members
default1234
- Members
- welcome_message (string, optional) - Which welcome message to display on chatbox open
- Members
default12345
- Members
- locale (string, optional) - Which locale to enforce (can be blank for auto-detect)
- blocked_pages (array[string], optional) - Blocked pages (chatbox is hidden for those page URLs)
- blocked_locales (array[string], optional) - Blocked locales (chatbox is hidden for those locales, ISO 639-1)
- tile (enum[string], optional) - Which tile to use for messages view background in chatbox (set to blank value for none)
- website_id
string(required)The website identifier
Website States ¶
Manages website states.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "requested",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Request Website StatesGET/website/{website_id}/states
Requests website states to be pushed to clients connected to realtime socket. States are both current operator message compose details and currently opened conversations (from online operators).
The state responses are sent back asynchronously on the real-time socket channel.
-
error (boolean)
-
reason (string)
-
data (object)
- website_id
string(required)The website identifier
Website Shortcuts ¶
Manages multiple website shortcuts.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"shortcut_id": "279b6290-ba14-4c09-9b53-c406914eea67",
"bang": "!hello",
"text": "Hello there, do you need help?",
"tag": "greetings",
"disabled": false
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"shortcut_id": "279b6290-ba14-4c09-9b53-c406914eea67",
"bang": "!hello",
"text": "Hello there, do you need help?",
"tag": "greetings",
"disabled": false
},
{
"shortcut_id": "620d04b8-3848-4e29-bfd5-46c86bfba86c",
"bang": "!ok",
"text": "Okay, thank you :)",
"tag": null,
"disabled": false
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List ShortcutsGET/website/{website_id}/shortcuts/list/{page_number}{?search_query}{&search_tag}
Lists shortcuts for website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- shortcut_id (string) - Shortcut identifier
- bang (string) - Shortcut bang
- text (string) - Shortcut text
- tag (string) - Shortcut tag
- disabled (boolean) - Whether shortcut is disabled or not
- website_id
string(required)The website identifier
- page_number
number(optional)Page number for shortcuts paging
- search_query
string(optional)Search query in all shortcuts
- search_tag
string(optional)Restrict search to tag
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
"greetings",
"product",
"billing"
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List Shortcut TagsGET/website/{website_id}/shortcuts/tags
Lists shortcut tags for website.
-
error (boolean)
-
reason (string)
-
data (array[string]) - Shortcut tags
- website_id
string(required)The website identifier
Website Shortcut ¶
Manages a single website shortcut.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"bang": "!hello",
"text": "Hello there, do you need help?",
"tag": "greetings",
"disabled": false
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {
"shortcut_id": "e73491ec-ae7d-48ae-8363-136fea2bb29b"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_exists",
"data": {}
}Create A New ShortcutPOST/website/{website_id}/shortcut
Creates a new shortcut.
-
bang (string, required) - Shortcut bang
-
text (string, required) - Shortcut text
-
tag (string, optional) - Shortcut tag
-
disabled (boolean, optional) - Whether shortcut is disabled or not
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonCheck If Shortcut ExistsHEAD/website/{website_id}/shortcut/{shortcut_id}
Checks if given shortcut exists.
- website_id
string(required)The website identifier
- shortcut_id
string(required)The shortcut identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"shortcut_id": "279b6290-ba14-4c09-9b53-c406914eea67",
"bang": "!hello",
"text": "Hello there, do you need help?",
"tag": "greetings",
"disabled": false
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_not_found",
"data": {}
}Get A ShortcutGET/website/{website_id}/shortcut/{shortcut_id}
Resolves shortcut information.
-
error (boolean)
-
reason (string)
-
data (object)
- shortcut_id (string) - Shortcut identifier
- bang (string) - Shortcut bang
- text (string) - Shortcut text
- tag (string) - Shortcut tag
- disabled (boolean) - Whether shortcut is disabled or not
- website_id
string(required)The website identifier
- shortcut_id
string(required)The shortcut identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"bang": "!hello",
"text": "Hello there!",
"tag": "greetings",
"disabled": true
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_bang_exists",
"data": {}
}Save A ShortcutPUT/website/{website_id}/shortcut/{shortcut_id}
Saves a shortcut in website, and overwrite previous shortcut information.
-
bang (string, required) - Shortcut bang
-
text (string, required) - Shortcut text
-
tag (string, optional) - Shortcut tag
-
disabled (boolean, optional) - Whether shortcut is disabled or not
- website_id
string(required)The website identifier
- shortcut_id
string(required)The shortcut identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"disabled": true
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_bang_exists",
"data": {}
}Update A ShortcutPATCH/website/{website_id}/shortcut/{shortcut_id}
Updates a shortcut in website, and save only changed fields.
-
bang (string, optional) - Shortcut bang
-
text (string, optional) - Shortcut text
-
tag (string, optional) - Shortcut tag
-
disabled (boolean, optional) - Whether shortcut is disabled or not
- website_id
string(required)The website identifier
- shortcut_id
string(required)The shortcut identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "shortcut_not_found",
"data": {}
}Remove A ShortcutDELETE/website/{website_id}/shortcut/{shortcut_id}
Removes a shortcut in website.
- website_id
string(required)The website identifier
- shortcut_id
string(required)The shortcut identifier
Website Campaigns ¶
Manages multiple website campaigns.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"campaign_id": "819ef0d4-927a-4432-8444-0749a6c33ac1",
"name": "Merry Christmas!",
"ready": true,
"dispatched": true,
"running": false,
"progress": 100,
"targets": 1243,
"created_at": 1482845836236,
"updated_at": 1482845836236,
"dispatched_at": 1482845836236
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"campaign_id": "819ef0d4-927a-4432-8444-0749a6c33ac1",
"name": "Merry Christmas!",
"ready": true,
"dispatched": true,
"running": false,
"progress": 100,
"targets": 1243,
"created_at": 1482845836236,
"updated_at": 1482845836236,
"dispatched_at": 1482845836236
},
{
"campaign_id": "15750df8-c041-4985-964b-74796bf52d0f",
"name": "Our New Product",
"ready": true,
"dispatched": false,
"running": false,
"progress": 0,
"targets": 10218,
"created_at": 1482845662931,
"updated_at": 1482846057833,
"dispatched_at": 1482845820338
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List CampaignsGET/website/{website_id}/campaigns/{page_number}
Lists campaigns for website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- campaign_id (string) - Campaign identifier
- name (string) - Campaign name
- ready (boolean) - Campaign ready state
- dispatched (boolean) - Campaign dispatched state
- running (boolean) - Campaign running state
- progress (number) - Campaign progress percentage (from
0to100) - targets (number) - Number of targets (number of users the campaign reaches)
- created_at (number) - Campaign creation timestamp
- updated_at (number) - Campaign update timestamp
- dispatched_at (number) - Campaign dispatch timestamp
- website_id
string(required)The website identifier
- page_number
number(optional)Page number for campaigns paging
- filter_name
string(optional)Filter by campaign name
- filter_ready
string(optional)Filter by campaign ready state (
1or0)- filter_dispatched
string(optional)Filter by campaign dispatched state (
1or0)- filter_running
string(optional)Filter by campaign running state (
1or0)
Website Campaign ¶
Manages a single website campaign.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"name": "Welcome!"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {
"campaign_id": "5cc093b4-ee95-4327-be14-3f1cf6b84ae2"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_exists",
"data": {}
}Create A New CampaignPOST/website/{website_id}/campaign
Creates a new campaign.
- name (string, required) - Campaign name
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonCheck If Campaign ExistsHEAD/website/{website_id}/campaign/{campaign_id}
Checks if given campaign exists.
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"campaign_id": "5cc093b4-ee95-4327-be14-3f1cf6b84ae2",
"name": "Welcome!",
"sender": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
},
"recipients": {
"type": "all"
},
"message": "*Hey there*, welcome on Crisp!",
"options": {
"deliver_to_email": true,
"deliver_to_chatbox": true
},
"ready": true,
"dispatched": true,
"running": true,
"progress": 50,
"targets": 1243,
"created_at": 1482848102359,
"updated_at": 1482848102359,
"dispatched_at": 1482848102359
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Get A CampaignGET/website/{website_id}/campaign/{campaign_id}
Resolves campaign information.
-
error (boolean)
-
reason (string)
-
data (object)
- campaign_id (string) - Campaign identifier
- name (string) - Campaign name
- sender (object) - Campaign sender
- user_id (string) - Sender user identifier (member of website)
- recipients (object) - Campaign recipients
- type (enum[string]) - Recipient routing type
- Members
allsegmentpeople
- Members
- segments (array[string]) - Routing segments (if
segment) - people (array[string]) - Routing people (if
people)
- type (enum[string]) - Recipient routing type
- message (string) - Campaign message
- options (object) - Campaign options
- deliver_to_chatbox (boolean) - Whether to deliver message to chatbox or not
- deliver_to_email (boolean) - Whether to deliver message to email or not
- ready (boolean) - Campaign ready state
- dispatched (boolean) - Campaign dispatched state
- running (boolean) - Campaign running state
- progress (number) - Campaign progress percentage (from
0to100) - targets (number) - Number of targets (number of users the campaign reaches)
- created_at (number) - Campaign creation timestamp
- updated_at (number) - Campaign update timestamp
- dispatched_at (number) - Campaign dispatch timestamp
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"name": "Welcome!",
"sender": {
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
},
"recipients": {
"type": "all"
},
"message": "*Hey there*, welcome on Crisp!",
"options": {
"deliver_to_chatbox": true,
"deliver_to_email": true
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "sender_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_name_exists",
"data": {}
}Save A CampaignPUT/website/{website_id}/campaign/{campaign_id}
Saves a campaign in website, and overwrite previous campaign information.
-
name (string, required) - Campaign name
-
sender (object, required) - Campaign sender
- user_id (string, required) - Sender user identifier (member of website)
-
recipients (object, required) - Campaign recipients
- type (enum[string], required) - Recipient routing type
- Members
allsegmentpeople
- Members
- segments (array[string], optional) - Routing segments (if
segment) - people (array[string], optional) - Routing people (if
people)
- type (enum[string], required) - Recipient routing type
-
message (string, required) - Campaign message
-
options (object, optional) - Campaign options
- deliver_to_chatbox (boolean, optional) - Whether to deliver message to chatbox or not
- deliver_to_email (boolean, optional) - Whether to deliver message to email or not
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"message": "*Hey there*, welcome on Crisp folks!"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "sender_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_name_exists",
"data": {}
}Update A CampaignPATCH/website/{website_id}/campaign/{campaign_id}
Updates a campaign in website, and save only changed fields.
-
name (string, optional) - Campaign name
-
sender (object, optional) - Campaign sender
- user_id (string, required) - Sender user identifier (member of website)
-
recipients (object, optional) - Campaign recipients
- type (enum[string], optional) - Recipient routing type
- Members
allsegmentpeople
- Members
- segments (array[string], optional) - Routing segments (if
segment) - people (array[string], optional) - Routing people (if
people)
- type (enum[string], optional) - Recipient routing type
-
message (string, optional) - Campaign message
-
options (object, optional) - Campaign options
- deliver_to_chatbox (boolean, optional) - Whether to deliver message to chatbox or not
- deliver_to_email (boolean, optional) - Whether to deliver message to email or not
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Remove A CampaignDELETE/website/{website_id}/campaign/{campaign_id}
Removes a campaign in website.
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
Headers
Content-Type: application/jsonBody
+ Authenticated Tiers: `user` `plugin`Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "sender_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_already_dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_ready",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_slot_unavailable",
"data": {}
}Dispatch A CampaignPOST/website/{website_id}/campaign/{campaign_id}/dispatch
Dispatches a ready campaign.
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resumed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_already_running",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_finished",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_slot_unavailable",
"data": {}
}Resume A CampaignPOST/website/{website_id}/campaign/{campaign_id}/resume
Resumes a paused and dispatched campaign.
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "paused",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_not_running",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "campaign_finished",
"data": {}
}Pause A CampaignPOST/website/{website_id}/campaign/{campaign_id}/pause
Pauses a running and dispatched campaign.
- website_id
string(required)The website identifier
- campaign_id
string(required)The campaign identifier
Website Visitors ¶
Manages multiple website visitors.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "counted",
"data": {
"count": 42,
"active": 7
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Count VisitorsGET/website/{website_id}/visitors/count
Counts visitors currently on website.
-
error (boolean)
-
reason (string)
-
data (object)
- count (number) - Number of visitors currently on website
- active (number) - Number of active visitors currently on website (those actively browsing)
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"session_id": "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
"nickname": "Valerian",
"email": "valerian@valeriansaliou.name",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/a129e8a5-db4d-4a31-9d12-59fdf3731e61",
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2683.0 Safari/537.36",
"initiated": true,
"active": true,
"last_page": {
"page_title": "Acme Inc. | Marketplace",
"page_url": "https://shop.acme-inc.com/"
},
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"timezone": -120,
"locales": [
"en-US",
"en",
"fr"
]
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"session_id": "session_19e5240f-0a8d-461e-a661-a3123fc6eec9",
"nickname": "Valerian",
"email": "valerian@valeriansaliou.name",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/a129e8a5-db4d-4a31-9d12-59fdf3731e61",
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2683.0 Safari/537.36",
"initiated": true,
"active": true,
"last_page": {
"page_title": "Acme Inc. | Marketplace",
"page_url": "https://shop.acme-inc.com/"
},
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"timezone": -120,
"locales": [
"en-US",
"en",
"fr"
]
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List VisitorsGET/website/{website_id}/visitors/list/{page_number}
Lists visitors currently on website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- session_id (string) - Session identifier for visitor
- nickname (string) - Nickname for visitor
- email (string) - Email for visitor
- avatar (string) - Avatar for visitor
- useragent (string) - Useragent as advertised by visitor browser
- initiated (boolean) - Whether session is initiated or not
- active (boolean) - Whether the user is actively browsing or not
- last_page (object) - Last page browsed by visitor
- page_title (string) - Last page title
- page_url (string) - Last page URL
- geolocation (object) - Geolocation for visitor
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- timezone (number) - Visitor timezone offset (UTC)
- locales (array[string]) - Locales supported by visitor (ISO 639-1)
- website_id
string(required)The website identifier
- page_number
number(optional)Page number for conversations paging
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "mapped",
"data": [
{
"visitors": {
"count": 73,
"threshold": 99,
"session_ids": [
"session_aaea8e1d-d6e3-4238-9252-d8c2e5579f5c"
]
},
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_longitude",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_latitude",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_radius",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Pinpoint Visitors On A MapGET/website/{website_id}/visitors/map{?center_latitude}{¢er_longitude}{¢er_radius}
Maps visitors in a geographical area, given a geographical center and a map radius (defaults to whole Earth if none given). Visitors are grouped in geographical points. There is a static number of points per area (the area is composed of sub-divisions of equal size). Only points which contain visitors are returned.
The map precision increases as the area radius decreases. If there are too many visitors in a given geographical point, an approximate visitors count number will be given.
-
error (boolean)
-
reason (string)
-
data (object)
- visitors (object) - Visitors for geographical point
- count (number) - Number of visitors in geographical point
- threshold (number) - The maximum count number as restricted by the API for calculations (may vary)
- session_ids (array[string]) - Session identifiers associated to the geographical point
- geolocation (object) - Geolocation for geographical point
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- visitors (object) - Visitors for geographical point
- website_id
string(required)The website identifier
- center_latitude
number(optional)Area center point latitude
- center_longitude
number(optional)Area center point longitude
- center_radius
number(optional)Area radius (in kilometers)
Website Conversations ¶
Manages multiple website conversations.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"session_id": "session_aaea8e1d-d6e3-4238-9252-d8c2e5579f5c",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"people_id": "0cb89450-34fb-4d51-8905-040c1d14a594",
"status": 1,
"state": "unresolved",
"is_blocked": false,
"availability": "offline",
"active": {
"now": false
},
"last_message": "All right, thanks.",
"mentions": [],
"updated_at": 1468401603070,
"created_at": 1468341857826,
"unread": {
"operator": 0,
"visitor": 1
},
"meta": {
"nickname": "Dan Boy",
"email": "dan.boy@acme-inc.com",
"ip": "104.236.186.68",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/8f87f47b-ecee-4e08-bfc5-4a31494b8b62",
"device": {
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"system": {
"os": {
"version": "10.11.5",
"name": "Mac OS"
},
"engine": {
"name": "WebKit",
"version": "537.36"
},
"browser": {
"major": "51",
"version": "51.0.2683.0",
"name": "Chrome"
},
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2683.0 Safari/537.36"
},
"timezone": -120,
"locales": [
"en",
"fr"
]
},
"segments": [
"customer",
"friend"
]
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"session_id": "session_aaea8e1d-d6e3-4238-9252-d8c2e5579f5c",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"people_id": "0cb89450-34fb-4d51-8905-040c1d14a594",
"status": 1,
"state": "unresolved",
"is_blocked": false,
"availability": "offline",
"active": {
"now": false
},
"last_message": "All right, thanks.",
"mentions": [],
"updated_at": 1468401603070,
"created_at": 1468341857826,
"unread": {
"operator": 0,
"visitor": 1
},
"meta": {
"nickname": "Dan Boy",
"email": "dan.boy@acme-inc.com",
"ip": "104.236.186.68",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/8f87f47b-ecee-4e08-bfc5-4a31494b8b62",
"device": {
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"system": {
"os": {
"version": "10.11.5",
"name": "Mac OS"
},
"engine": {
"name": "WebKit",
"version": "537.36"
},
"browser": {
"major": "51",
"version": "51.0.2683.0",
"name": "Chrome"
},
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2683.0 Safari/537.36"
},
"timezone": -120,
"locales": [
"en",
"fr"
]
},
"segments": [
"customer",
"friend"
]
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List ConversationsGET/website/{website_id}/conversations/{page_number}{?search_query}{&search_type}{&include_empty}
Lists conversations for website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- session_id (string) - Session identifier
- website_id (string) - Website identifier
- people_id (string) - People identifier
- state (enum[string]) - Conversation state
- Members
pendingunresolvedresolved
- Members
- status (enum[number]) - Conversation status (an alias of state; useful for sorting conversations)
- Members
0- Numeric code for pending status1- Numeric code for unresolved status2- Numeric code for resolved status
- Members
- is_blocked (boolean) - Whether session is blocked or not (block messages from visitor)
- availability (enum[string]) - Visitor availability
- Members
onlineoffline
- Members
- active (object) - User activity statistics (eg. moved their mouse if reported from the Crisp chatbox)
- now (boolean) - Whether user is considered active right now or not
- last (number) - Timestamp at which the user was last active
- last_message (string) - Last message excerpt
- mentions (array[string]) - Mentioned user identifiers (from conversation messages)
- created_at (number) - Conversation creation timestamp
- updated_at (number) - Conversation update timestamp
- compose (object) - Compose states
- operator (object) - Compose state for operator
- type (enum[string]) - Compose state type
- Members
startstop
- Members
- excerpt (string) - Message excerpt for compose state
- timestamp (number) - Timestamp for compose state
- user (object) - Compose user information
- user_id (string) - Compose user identifier
- nickname (string) - Compose user nickname
- avatar (string) - Compose user avatar
- type (enum[string]) - Compose state type
- visitor (object) - Compose state for visitor
- type (enum[string]) - Compose state type
- Members
startstop
- Members
- excerpt (string) - Message excerpt for compose state
- timestamp (number) - Timestamp for compose state
- type (enum[string]) - Compose state type
- operator (object) - Compose state for operator
- unread (object) - Unread messages counters
- operator (number) - Unread messages counter for operator
- visitor (number) - Unread messages counter for visitor
- meta (object) - Meta-data for conversation
- nickname (string) - Visitor nickname
- email (string) - Visitor email
- phone (string) - Visitor phone
- address (string) - Visitor address
- ip (string) - Visitor IP address
- data (object) - Visitor data
- avatar (string) - Visitor avatar
- device (object) - Device information
- geolocation (object) - Geolocation information for visitor device
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- system (object) - Visitor device system information
- os (object) - Operating system information
- version (string) - OS version
- name (string) - OS name
- engine (object) - Rendering engine information
- version (string) - Engine version
- name (string) - Engine name
- browser (object) - Browser information
- major (string) - Browser major version (eg: version 8.1 has a major of 8)
- version (string) - Browser version
- name (string) - Browser name
- useragent (string) - Visitor user agent
- os (object) - Operating system information
- timezone (number) - Visitor device timezone offset (UTC)
- locales (array[string]) - Visitor device locales
- geolocation (object) - Geolocation information for visitor device
- segments (array[string]) - Segments attributed to conversation
- website_id
string(required)The website identifier
- page_number
number(optional)Page number for conversations paging
- search_query
string(optional)Search query in all conversations
- search_type
string(optional)Search type (either
textorsegment)- include_empty
string(optional)Whether to include conversations without any message (
1or0, defaults to0)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"segment": "customer",
"count": 214
},
{
"segment": "bug",
"count": 41
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"segment": "customer",
"count": 214
},
{
"segment": "bug",
"count": 41
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List Conversation Segments In MetaGET/website/{website_id}/conversations/meta/segments/{page_number}
Lists conversation segments in meta for website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- segment (string) - Segment value
- count (number) - Number of occurences of this segment
- website_id
string(required)The website identifier
- page_number
number(optional)The page number (paging in segment list)
Website Conversation ¶
Manages a single website conversation.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {
"session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Create A New ConversationPOST/website/{website_id}/conversation
Creates a new conversation.
-
error (boolean)
-
reason (string)
-
data (object)
- session_id (string) - Created conversation session identifier
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonCheck If Conversation ExistsHEAD/website/{website_id}/conversation/{session_id}
Checks if given conversation session identifier exists.
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"session_id": "session_aaea8e1d-d6e3-4238-9252-d8c2e5579f5c",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"people_id": "0cb89450-34fb-4d51-8905-040c1d14a594",
"status": 1,
"state": "unresolved",
"is_blocked": false,
"availability": "offline",
"active": {
"now": false
},
"last_message": "All right, thanks.",
"mentions": [],
"updated_at": 1468401603070,
"created_at": 1468341857826,
"unread": {
"operator": 0,
"visitor": 1
},
"meta": {
"nickname": "Dan Boy",
"email": "dan.boy@acme-inc.com",
"ip": "104.236.186.68",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/8f87f47b-ecee-4e08-bfc5-4a31494b8b62",
"device": {
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"system": {
"os": {
"version": "10.11.5",
"name": "Mac OS"
},
"engine": {
"name": "WebKit",
"version": "537.36"
},
"browser": {
"major": "51",
"version": "51.0.2683.0",
"name": "Chrome"
},
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2683.0 Safari/537.36"
},
"timezone": -120,
"locales": [
"en",
"fr"
]
},
"segments": [
"customer",
"friend"
]
}
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get A ConversationGET/website/{website_id}/conversation/{session_id}
Resolves conversation information.
-
error (boolean)
-
reason (string)
-
data (object)
- session_id (string) - Session identifier
- website_id (string) - Website identifier
- people_id (string) - People identifier
- state (enum[string]) - Conversation state
- Members
pendingunresolvedresolved
- Members
- status (enum[number]) - Conversation status (an alias of state; useful for sorting conversations)
- Members
0- Numeric code for pending status1- Numeric code for unresolved status2- Numeric code for resolved status
- Members
- is_blocked (boolean) - Whether session is blocked or not (block messages from visitor)
- availability (enum[string]) - Visitor availability
- Members
onlineoffline
- Members
- active (object) - User activity statistics (eg. moved their mouse if reported from the Crisp chatbox)
- now (boolean) - Whether user is considered active right now or not
- last (number) - Timestamp at which the user was last active
- last_message (string) - Last message excerpt
- mentions (array[string]) - Mentioned user identifiers (from conversation messages)
- created_at (number) - Conversation creation timestamp
- updated_at (number) - Conversation update timestamp
- compose (object) - Compose states
- operator (object) - Compose state for operator
- type (enum[string]) - Compose state type
- Members
startstop
- Members
- excerpt (string) - Message excerpt for compose state
- timestamp (number) - Timestamp for compose state
- user (object) - Compose user information
- user_id (string) - Compose user identifier
- nickname (string) - Compose user nickname
- avatar (string) - Compose user avatar
- type (enum[string]) - Compose state type
- visitor (object) - Compose state for visitor
- type (enum[string]) - Compose state type
- Members
startstop
- Members
- excerpt (string) - Message excerpt for compose state
- timestamp (number) - Timestamp for compose state
- type (enum[string]) - Compose state type
- operator (object) - Compose state for operator
- unread (object) - Unread messages counters
- operator (number) - Unread messages counter for operator
- visitor (number) - Unread messages counter for visitor
- meta (object) - Meta-data for conversation
- nickname (string) - Visitor nickname
- email (string) - Visitor email
- phone (string) - Visitor phone
- address (string) - Visitor address
- ip (string) - Visitor IP address
- data (object) - Visitor data
- avatar (string) - Visitor avatar
- device (object) - Device information
- geolocation (object) - Geolocation information for visitor device
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- system (object) - Visitor device system information
- os (object) - Operating system information
- version (string) - OS version
- name (string) - OS name
- engine (object) - Rendering engine information
- version (string) - Engine version
- name (string) - Engine name
- browser (object) - Browser information
- major (string) - Browser major version (eg: version 8.1 has a major of 8)
- version (string) - Browser version
- name (string) - Browser name
- useragent (string) - Visitor user agent
- os (object) - Operating system information
- timezone (number) - Visitor device timezone offset (UTC)
- locales (array[string]) - Visitor device locales
- geolocation (object) - Geolocation information for visitor device
- segments (array[string]) - Segments attributed to conversation
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Remove A ConversationDELETE/website/{website_id}/conversation/{session_id}
Removes a conversation in website.
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "initiated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Initiate A Conversation With Existing SessionPOST/website/{website_id}/conversation/{session_id}/initiate
Initiates a conversation from an existing session.
Used to initiate a conversation from website visitor list, and trigger a chatbox open.
The client acknowledgement is sent back asynchronously on the real-time socket channel, using the event namespace session:request:initiated.
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"session_id": "session_0839e4c2-a059-445b-8de5-390d6417f893",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"type": "text",
"from": "user",
"origin": "chat",
"content": "Hey, how are you doing?",
"preview": [],
"mentions": [],
"stamped": true,
"read": "email",
"delivered": "email",
"fingerprint": 5719231201,
"timestamp": 1468413681043,
"user": {
"nickname": "Dan Boy",
"user_id": "session_0839e4c2-a059-445b-8de5-390d6417f893"
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"session_id": "session_0839e4c2-a059-445b-8de5-390d6417f893",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"type": "text",
"from": "user",
"origin": "chat",
"content": "Hey, how are you doing?",
"preview": [],
"mentions": [],
"stamped": true,
"read": "email",
"delivered": "email",
"fingerprint": 5719231201,
"timestamp": 1468413681043,
"user": {
"nickname": "Dan Boy",
"user_id": "session_0839e4c2-a059-445b-8de5-390d6417f893"
}
},
{
"session_id": "session_0839e4c2-a059-445b-8de5-390d6417f893",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"type": "text",
"from": "operator",
"origin": "chat",
"content": "👍",
"preview": [],
"mentions": [],
"stamped": true,
"read": "chat",
"delivered": "chat",
"fingerprint": 5720387819,
"timestamp": 1468413690687,
"user": {
"nickname": "Valerian Saliou",
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
}
},
{
"session_id": "session_0839e4c2-a059-445b-8de5-390d6417f893",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"type": "file",
"from": "operator",
"origin": "email",
"content": {
"name": "Thats awesome.jpg",
"url": "https://storage.crisp.im/users/upload/operator/aa0b64dd-9fb4-4db9-80d6-5a49eb84087b/19d956c7-0294-45ad-89e1-58ce45e7008f.jpg",
"type": "image/jpeg"
},
"preview": [],
"mentions": [],
"stamped": true,
"read": null,
"delivered": "chat",
"fingerprint": 8682935614,
"timestamp": 1468487977677,
"user": {
"nickname": "Valerian Saliou",
"user_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
}
},
{
"session_id": "session_0839e4c2-a059-445b-8de5-390d6417f893",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"type": "text",
"from": "user",
"origin": "chat",
"content": "Hey check that: https://crisp.im/",
"preview": [
{
"url": "https://crisp.im/",
"website": "crisp.im",
"title": "Simple Customer service built for startups.",
"preview": {
"excerpt": "Chat with your customers, Collaborate with your team",
"image": "https://crisp.im/tile.png"
}
}
],
"mentions": [],
"stamped": true,
"read": "chat",
"delivered": null,
"fingerprint": 9663657330,
"timestamp": 1468488196711,
"user": {
"nickname": "Dan Boy",
"user_id": "session_0839e4c2-a059-445b-8de5-390d6417f893"
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get Messages In ConversationGET/website/{website_id}/conversation/{session_id}/messages{?timestamp_before}
Resolves messages in an existing conversation. Returns the last batch of messages if there are many messages in the conversation. Then, messages can be paged up to most recent message using the timestamp_before parameter.
-
error (boolean)
-
reason (string)
-
data (array[object])
- session_id (string) - Session identifier
- website_id (string) - Website identifier
- type (enum[string]) - Message type
- Members
textnotefileanimationaudiopickerfield
- Members
- from (enum[string]) - Message sender
- Members
useroperator
- Members
- origin (enum[string]) - Message origin
- Members
chatemailurn:*
- Members
- content (object) - Message content (string if type is
textornote, object if type isfile,animation,audio,pickerorfield)- id (string) - Object identifier (only set if message type is
pickerorfield) - text (string) - Object text (only set if message type is
pickerorfield) - explain (string) - Object explanatory text (only set if message type is
field) - value (string) - Object value (only set if message type is
field) - choices (array[object]) - Object choices (only set if message type is
picker)- value (string) - Choice value
- label (string) - Choice label
- selected (boolean) - Whether choice is selected or not
- name (string) - Object name (only set if message type is
file) - duration (number) - Object duration in seconds (only set if message type is
audio) - url (string) - Object URL (only set if message type is
file,animationoraudio) - type (string) - Object MIME type (only set if message type is
file,animationoraudio)
- id (string) - Object identifier (only set if message type is
- preview (array[object]) - Preview of URLs contained in message
- url (string) - Previewed URL
- website (string) - Website domain for previewed URL
- title (string) - Page title for previewed URL
- preview (object) - Preview information
- excerpt (string) - Text excerpt from the page (may not be set)
- image (string) - Main image from the page (may not be set)
- embed (string) - Embeddable frame of main page media (may not be set)
- stamped (boolean) - Whether message was fully processed in the internal Crisp pipeline (eg: preview was done)
- mentions (array[string]) - Mentioned user identifiers
- read (enum[string]) - Channel in which message has been read
- Members
nullchatemail
- Members
- delivered (enum[string]) - Channel in which message has lastly been delivered
- Members
nullchatemail
- Members
- fingerprint (number) - Unique message fingerprint (useful to avoid duplicates when using the API as per with the real-time sockets)
- timestamp (number) - Timestamp at which the message was sent
- user (object) - Sending user information
- type (string) - Sending user type (if any)
- Members
website
- Members
- user_id (string) - Sending user identifier (may be operator user identifier or session identifier)
- nickname (string) - Sending user nickname
- avatar (string) - Sending user avatar
- type (string) - Sending user type (if any)
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- timestamp_before
number(optional)Returned message batch should end before given timestamp (used for infinite scroll paging)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "text",
"from": "operator",
"origin": "chat",
"content": "Hey there! Need help?"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "note",
"from": "operator",
"origin": "chat",
"content": "What should I tell him?"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "file",
"from": "operator",
"origin": "chat",
"content": {
"name": "Thats awesome.jpg",
"url": "https://storage.crisp.im/users/upload/operator/aa0b64dd-9fb4-4db9-80d6-5a49eb84087b/19d956c7-0294-45ad-89e1-58ce45e7008f.jpg",
"type": "image/jpeg"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "animation",
"from": "operator",
"origin": "chat",
"content": {
"url": "https://media2.giphy.com/media/3oKIPt3IEJbcqkff7a/100.gif",
"type": "image/gif"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "audio",
"from": "operator",
"origin": "chat",
"content": {
"url": "https://storage.crisp.im/users/upload/operator/aa0b64dd-9fb4-4db9-80d6-5a49eb84087b/d70935e1-c79e-4199-9568-944541657b78.webm",
"type": "audio/webm",
"duration": 40
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "picker",
"from": "operator",
"origin": "chat",
"content": {
"id": "call-date",
"text": "Pick your date!",
"choices": [
{
"value": "1",
"label": "Today, 1:00PM.",
"selected": false
},
{
"value": "2",
"label": "Friday, 2:30PM.",
"selected": true
},
{
"value": "3",
"label": "Monday, 6:15PM.",
"selected": false
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "field",
"from": "operator",
"origin": "chat",
"content": {
"id": "name-field",
"text": "What is your name?",
"explain": "Enter your name...",
"value": "Valerian Saliou"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Send A Message In ConversationPOST/website/{website_id}/conversation/{session_id}/message
Sends a message in an existing conversation.
-
type (enum[string], required) - Message type
- Members
textnotefileanimationaudiopickerfield
- Members
-
from (enum[string], required) - Message sender
- Members
useroperator
- Members
-
origin (enum[string], required) - Message origin
- Members
chatemailurn:*
- Members
-
content (object, required) - Message content (string if type is
textornote, object if type isfile,animation,audio,pickerorfield)- id (string, required) - Object identifier (only set if message type is
pickerorfield) - text (string, required) - Object text (only set if message type is
pickerorfield) - explain (string, required) - Object explanatory text (only set if message type is
field) - value (string, optional) - Object value (only set if message type is
field) - choices (array[object], required) - Object choices (only set if message type is
picker)- value (string, required) - Choice value
- label (string, required) - Choice label
- selected (boolean, required) - Whether choice is selected or not
- name (string, required) - Object name (only set if message type is
file) - duration (number, required) - Object duration in seconds (only set if message type is
audio) - url (string, required) - Object URL (only set if message type is
file,animationoraudio) - type (string, required) - Object MIME type (only set if message type is
file,animationoraudio)
- id (string, required) - Object identifier (only set if message type is
-
mentions (array[string], optional) - Mentioned user identifiers
-
fingerprint (number, optional) - Unique message fingerprint (useful to avoid duplicates when using the API as per with the real-time sockets)
-
user (object, optional) - Sending user information
- type (string, optional) - Sending user type
- Members
website
- Members
- nickname (string, optional) - Sending user nickname
- avatar (string, optional) - Sending user avatar
- type (string, optional) - Sending user type
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"type": "start",
"from": "operator"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Compose A Message In ConversationPATCH/website/{website_id}/conversation/{session_id}/compose
Starts or stop composing a message in an existing conversation.
-
type (enum[string], required) - Compose type
- Members
startstop
- Members
-
from (enum[string], required) - Compose sender
- Members
useroperator
- Members
-
excerpt (string, optional) - Compose excerpt (MagicType preview)
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"from": "operator",
"origin": "urn:crisp.im:slack:0",
"fingerprints": [
"5719231201"
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "read",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Mark Messages As Read In ConversationPATCH/website/{website_id}/conversation/{session_id}/read
Marks messages as read in conversation. Either using given message fingerprints, or all messages.
-
from (enum[string], required) - Sender direction
- Members
useroperator
- Members
-
origin (enum[string], required) - Read receipt origin
- Members
chatemailurn:*
- Members
-
fingerprints (array[number], optional) - Target message fingerprints (if not set, this marks all messages as read in conversation)
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"opened": true
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Update Conversation Open StatePATCH/website/{website_id}/conversation/{session_id}/open
Updates conversation open state for authenticated operator user. Lets other operators see which conversation people are on at any given moment. This state automatically expires after a while, if not renewed.
- opened (boolean, required) - Open state
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"nickname": "Dan Boy",
"email": "dan.boy@acme-inc.com",
"ip": "104.236.186.68",
"avatar": "https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/8f87f47b-ecee-4e08-bfc5-4a31494b8b62",
"device": {
"geolocation": {
"country": "US",
"region": "CA",
"city": "San Francisco",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
}
},
"system": {
"os": {
"version": "10.11.5",
"name": "Mac OS"
},
"engine": {
"name": "WebKit",
"version": "537.36"
},
"browser": {
"major": "51",
"version": "51.0.2683.0",
"name": "Chrome"
},
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2683.0 Safari/537.36"
},
"timezone": -120,
"locales": [
"en",
"fr"
]
},
"segments": [
"customer",
"friend"
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get Conversation MetasGET/website/{website_id}/conversation/{session_id}/meta
Resolves conversation meta information.
-
error (boolean)
-
reason (string)
-
data (object)
- nickname (string) - Visitor nickname
- email (string) - Visitor email
- phone (string) - Visitor phone
- address (string) - Visitor address
- ip (string) - Visitor IP address
- data (object) - Visitor data
- avatar (string) - Visitor avatar
- device (object) - Device information
- geolocation (object) - Geolocation information for visitor device
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- system (object) - Visitor device system information
- os (object) - Operating system information
- version (string) - OS version
- name (string) - OS name
- engine (object) - Rendering engine information
- version (string) - Engine version
- name (string) - Engine name
- browser (object) - Browser information
- major (string) - Browser major version (eg: version 8.1 has a major of 8)
- version (string) - Browser version
- name (string) - Browser name
- useragent (string) - Visitor user agent
- os (object) - Operating system information
- timezone (number) - Visitor device timezone offset (UTC)
- locales (array[string]) - Visitor device locales
- geolocation (object) - Geolocation information for visitor device
- segments (array[string]) - Segments attributed to conversation
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"nickname": "John Doe",
"email": "john.doe@acme-inc.com",
"segments": [
"happy",
"customer",
"love"
],
"data": {
"type": "customer",
"signup": "finished"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Update Conversation MetasPATCH/website/{website_id}/conversation/{session_id}/meta
Updates conversation meta information.
-
nickname (string, optional) - Visitor nickname
-
email (string, optional) - Visitor email
-
avatar (string, optional) - Visitor avatar
-
ip (string, optional) - Visitor IP address
-
data (object, optional) - Visitor data
-
phone (string, optional) - Visitor phone number
-
address (string, optional) - Visitor address
-
segments (array[string], optional) - Segments for conversation
-
device (object, optional) - Visitor device information
- geolocation (object, optional) - Geolocation information for visitor device
- country (string, optional) - Country code
- region (string, optional) - Region code
- city (string, optional) - City name
- coordinates (object, required) - Location coordinates
- latitude (number, required) - Latitude coordinate
- longitude (number, required) - Longitude coordinate
- system (object, optional) - Visitor device system information
- os (object, optional) - Operating system information
- version (string, required) - OS version
- name (string, required) - OS name
- engine (object, optional) - Rendering engine information
- version (string, required) - Engine version
- name (string, required) - Engine name
- browser (object, optional) - Browser information
- major (string, required) - Browser major version (eg: version 8.1 has a major of 8)
- version (string, required) - Browser version
- name (string, required) - Browser name
- useragent (string, required) - Visitor user agent
- os (object, optional) - Operating system information
- timezone (number, optional) - Visitor device timezone offset (UTC)
- locales (array[string], optional) - Visitor device locales
- geolocation (object, optional) - Geolocation information for visitor device
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"timestamp": 1468341926143,
"page_title": "Acme Inc. | Marketplace",
"page_url": "https://shop.acme-inc.com/",
"page_referrer": "https://www.acme-inc.com/"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"timestamp": 1468341926143,
"page_title": "Acme Inc. | Marketplace",
"page_url": "https://shop.acme-inc.com/",
"page_referrer": "https://www.acme-inc.com/"
},
{
"timestamp": 1468341867516,
"page_title": "Acme Inc. | Website",
"page_url": "https://www.acme-inc.com/",
"page_referrer": "https://email.acme-inc.com/"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List Conversation PagesGET/website/{website_id}/conversation/{session_id}/pages/{page_number}
Lists browsed pages in conversation.
-
error (boolean)
-
reason (string)
-
data (array[object])
- page_title (string) - Page title as seen by visitor browser
- page_url (string) - Page URL
- page_referrer (string) - Page referrer (if any)
- timestamp (number) - Timestamp of page access (when the page was loaded)
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- page_number
number(optional)The page number (paging in page list)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"timestamp": 1468341926143,
"text": "Added item to basket",
"data": {
"price": 10.99,
"currency": "USD"
},
"color": "red"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"timestamp": 1468341926143,
"text": "Added item to basket",
"data": {
"price": 10.99,
"currency": "USD"
},
"color": "red"
},
{
"timestamp": 1468341867516,
"text": "Signed up",
"data": {},
"color": "blue"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List Conversation EventsGET/website/{website_id}/conversation/{session_id}/events/{page_number}
Lists stacked events in conversation.
-
error (boolean)
-
reason (string)
-
data (array[object])
- text (string) - Text for event
- data (object) - Data for event (if any)
- color (enum[string]) - Color for event (if any)
- Members
redorangeyellowgreenbluepurplepinkbrowngreyblack
- Members
- timestamp (number) - Timestamp of event (when the event was stacked)
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- page_number
number(optional)The page number (paging in event list)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"state": "unresolved"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get Conversation StateGET/website/{website_id}/conversation/{session_id}/state
Resolves conversation state.
-
error (boolean)
-
reason (string)
-
data (object)
- state (enum[string]) - Conversation state
- Members
pendingunresolvedresolved
- Members
- state (enum[string]) - Conversation state
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"state": "unresolved"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Change Conversation StatePATCH/website/{website_id}/conversation/{session_id}/state
Updates conversation state.
- state (enum[string], required) - Conversation state
- Members
pendingunresolvedresolved
- Members
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"blocked": true
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get Block Status For ConversationGET/website/{website_id}/conversation/{session_id}/block
Resolves conversation block status.
-
error (boolean)
-
reason (string)
-
data (object)
- blocked (boolean) - Block state
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"blocked": true
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Block Incoming Messages For ConversationPATCH/website/{website_id}/conversation/{session_id}/block
Blocks further incoming messages from a conversation. Messages from visitor will be silently dropped, but you can still send messages to visitor.
- blocked (boolean, required) - Block state
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"to": "operator",
"email": "valerian@crisp.im"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "requested",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "conversation_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "email_not_available",
"data": {}
}Request Email Transcript For ConversationPOST/website/{website_id}/conversation/{session_id}/transcript
Requests an email transcript for a conversation. The transcript is emailed to the authenticated user, or to the indicated email. It contains all conversation history and may be kept for as an external record.
-
to (string, required) - Target user to send the transcript to
- Members
useroperator
- Members
-
email (string, optional) - Target email (if not set, the transcript is sent to the email address of the target user)
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"browsing_id": "browsing_05a9392d-ff3f-45e7-b021-1179c45668fa",
"useragent": "Mozilla/5.0 (Windows NT 6.2; rv:20.0) Gecko/20121202 Firefox/20.0"
},
{
"browsing_id": "browsing_19f4a6b4-1263-4e1a-965c-57ba9ef72151",
"useragent": "Mozilla/5.0 (Windows NT 6.2; rv:20.0) Gecko/20121202 Firefox/20.0"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List Browsing Sessions For ConversationGET/website/{website_id}/conversation/{session_id}/browsing
Lists available browsing sessions for conversation. A browsing session can be initiated to stream user screen content to operators.
-
error (boolean)
-
reason (string)
-
data (array[object])
- browsing_id (string) - Browsing session identifier
- useragent (string) - Useragent for browsing session
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "initiated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Initiate Browsing Session For ConversationPOST/website/{website_id}/conversation/{session_id}/browsing
Initiates browsing session for conversation.
Used to ask a client to prepare for a streamed browsing session for all open tabs, and request acknowledgement of when the client is ready to accept browsing stream actions (one acknowledgement per tab).
The client acknowledgement is sent back asynchronously on the real-time socket channel, using the event namespace browsing:request:initiated if initiated, or browsing:request:rejected if not initiated.
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"action": "start"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "browsing_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Send Action To An Existing Browsing SessionPATCH/website/{website_id}/conversation/{session_id}/browsing/{browsing_id}
Sends an action to an existing browsing session. Used to send stream actions to a browsing session (eg. to start or stop the stream session).
The client acknowledgement is sent back asynchronously on the real-time socket channel, using either the event namespace browsing:action:started or browsing:action:stopped (depending on the request action parameter, if action is start or stop).
- action (enum[string], required) - Browsing action
- Members
startstopheartbeat
- Members
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- browsing_id
string(required)The browsing session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"action": "execute",
"execute": "alert('Remote JavaScript executed');"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "browsing_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Debug An Existing Browsing SessionPATCH/website/{website_id}/conversation/{session_id}/browsing/{browsing_id}/debug
Debugs an existing browsing session. Used by LiveDebug™ to start or stop a debug session, as well as execute remote JavaScript on the user browser.
The debug stream is sent back asynchronously on the real-time socket channel, using either the event namespace browsing:debug:started, browsing:debug:stopped, browsing:debug:executed or browsing:debug:stream.
- action (enum[string], required) - Debug action
- Members
startstopexecute
- Members
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- browsing_id
string(required)The browsing session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"action": "mouse",
"mouse": {
"x": 0,
"y": 784
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "browsing_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Assist An Existing Browsing SessionPATCH/website/{website_id}/conversation/{session_id}/browsing/{browsing_id}/assist
Assists an existing browsing session. Used by LiveAssist™ to start or stop an assist session, used by operators to take control on the screen of user browser (mouse move and scroll).
The client acknowledgement is sent back asynchronously on the real-time socket channel, using either the event namespace browsing:assist:started or browsing:assist:stopped (depending on the request action parameter, if action is start or stop). Other actions do not imply real-time feedbacks.
- action (enum[string], required) - Assist action
- Members
startstopmousescroll
- Members
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- browsing_id
string(required)The browsing session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "initiated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Initiate New Call Session For ConversationPOST/website/{website_id}/conversation/{session_id}/call
Initiates a new audio/video call session for conversation.
Used to request a client to open a call session (audio + video). The client acknowledgement is sent back asynchronously on the real-time socket channel, using either the event namespace call:request:accept or call:request:decline.
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"call_id": "call_35a0c062-72fa-4095-a2a0-f9911d47ee56"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "call_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get Ongoing Call Session For ConversationGET/website/{website_id}/conversation/{session_id}/call
Gets the ongoing audio/video call session for conversation.
-
error (boolean)
-
reason (string)
-
data (object)
- call_id (string) - Call session identifier
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "aborted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "call_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Abort Ongoing Call Session For ConversationDELETE/website/{website_id}/conversation/{session_id}/call/{call_id}
Aborts the ongoing audio/video call session for conversation.
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- call_id
string(required)The call identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "session_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "call_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Transmit Signaling On Ongoing Call SessionPATCH/website/{website_id}/conversation/{session_id}/call/{call_id}/signaling
Transmits a signaling payload for the ongoing audio/video call session for conversation.
Used to emit a signaling payload to the other client, that is also part of the call session. The client signaling payloads are sent back asynchronously on the real-time socket channel, using either the event namespace call:signaling:sdp or call:signaling:candidate.
-
type (string, required) - Signaling type to transmit
- Members
sdpcandidate
- Members
-
payload (object, required) - Signaling payload to transmit
- website_id
string(required)The website identifier
- session_id
string(required)The conversation session identifier
- call_id
string(required)The call identifier
Website Analytics ¶
Manages website analytics.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "acquired",
"data": {
"metrics": [
{
"type": "chat_sessions_total",
"points": [
{
"value": 321,
"unit": null,
"timestamp": 1483693091792
}
]
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_metric",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_operator",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_date_split",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Acquire Chats AnalyticsGET/website/{website_id}/analytics/chats
Acquires analytics on chats in website.
-
error (boolean)
-
reason (string)
-
data (object)
- metrics (array[object]) - Acquired metrics
- type (string) - Acquired metric type
- points (array[object]) - Acquired metric points
- value (number) - Point value
- unit (string) - Point unit (if any)
- timestamp (number) - Timestamp for point
- metrics (array[object]) - Acquired metrics
- website_id
string(required)The website identifier
- filter_metric (string, required) - The metric type to acquire (among: `chat_sessions_total`, `chat_sessions_resolved`, `collected_emails`, `mean_response_time`, `first_response_time`)
string(required)- filter_operator
string(optional)Operator user identifier on whom chats analytics should be restricted
- filter_date_start
string(optional)When to start (date, ISO 8601)
- filter_date_end
string(optional)When to end (date, ISO 8601)
- filter_date_split
number(optional)Number of date splits (limited to a reasonable number)
Website People ¶
Manages website people.
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
{
"total": 432
}
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get People StatisticsGET/website/{website_id}/people/stats
Resolves statistics on people in website.
-
error (boolean)
-
reason (string)
-
data (object)
- total (number) - Total number of people
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"segment": "customer",
"count": 214
},
{
"segment": "poweruser",
"count": 121
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"segment": "customer",
"count": 214
},
{
"segment": "poweruser",
"count": 121
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List People SegmentsGET/website/{website_id}/people/segments/{page_number}
Lists segments in use for people.
-
error (boolean)
-
reason (string)
-
data (array[object])
- segment (string) - Segment value
- count (number) - Number of occurences of this segment
- website_id
string(required)The website identifier
- page_number
number(optional)The page number (paging in segment list)
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
"email": "valerian@crisp.im",
"person": {
"nickname": "Valerian Saliou",
"gender": "male",
"phone": "+33642926829",
"address": "France",
"description": "Full Stack Developer & UI Designer - XMPP Technologist - Objectivist - Co-founder CTO @crisp_im",
"website": "https://valeriansaliou.name/",
"timezone": -120,
"profiles": [
{
"type": "github",
"handle": "valeriansaliou"
}
],
"employment": {
"name": "Crisp",
"domain": "crisp.im",
"title": "CTO",
"role": "Software Engineer",
"seniority": "lead"
},
"geolocation": {
"country": "LV",
"region": "Rīga",
"city": "Rīga",
"coordinates": {
"latitude": 56.9553,
"longitude": 24.1195
}
},
"locales": [
"fr",
"fr-FR",
"en",
"en-US"
]
},
"company": {
"name": "Crisp",
"legal_name": "Crisp IM, Inc.",
"domain": "crisp.im",
"url": "https://crisp.im/",
"timezone": -300,
"metrics": {
"employees": 4,
"market_cap": 0,
"raised": 0,
"arr": 0
},
"geolocation": {
"country": "US",
"region": "DE",
"city": "Newark",
"coordinates": {
"latitude": 39.6837,
"longitude": 75.7497
}
},
"tags": [
"chat",
"saas"
],
"phones": [],
"emails": [
"contact@crisp.im",
"support@crisp.im"
]
},
"segments": [
"love",
"poweruser"
],
"active": {
"now": false
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
"email": "valerian@crisp.im",
"person": {
"nickname": "Valerian Saliou",
"gender": "male",
"phone": "+33642926829",
"address": "France",
"description": "Full Stack Developer & UI Designer - XMPP Technologist - Objectivist - Co-founder CTO @crisp_im",
"website": "https://valeriansaliou.name/",
"timezone": -120,
"profiles": [
{
"type": "github",
"handle": "valeriansaliou"
}
],
"employment": {
"name": "Crisp",
"domain": "crisp.im",
"title": "CTO",
"role": "Software Engineer",
"seniority": "lead"
},
"geolocation": {
"country": "LV",
"region": "Rīga",
"city": "Rīga",
"coordinates": {
"latitude": 56.9553,
"longitude": 24.1195
}
},
"locales": [
"fr",
"fr-FR",
"en",
"en-US"
]
},
"company": {
"name": "Crisp",
"legal_name": "Crisp IM, Inc.",
"domain": "crisp.im",
"url": "https://crisp.im/",
"timezone": -300,
"metrics": {
"employees": 4,
"market_cap": 0,
"raised": 0,
"arr": 0
},
"geolocation": {
"country": "US",
"region": "DE",
"city": "Newark",
"coordinates": {
"latitude": 39.6837,
"longitude": 75.7497
}
},
"tags": [
"chat",
"saas"
],
"phones": [],
"emails": [
"contact@crisp.im",
"support@crisp.im"
]
},
"segments": [
"love",
"poweruser"
],
"active": {
"now": false
}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List People ProfilesGET/website/{website_id}/people/profiles/{page_number}{?sort_field}{&sort_order}{&search_operator}{&search_email}{&search_nickname}{&search_gender}{&search_address}{&search_locale}{&search_country}{&search_city}{&search_job_company}{&search_job_title}{&search_job_role}{&search_job_seniority}{&search_company_name}{&search_company_country}{&search_company_city}{&search_company_metrics_employees}{&search_company_metrics_raised}{&search_company_metrics_arr}{&search_segment}
Lists people profiles for website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- people_id (string) - People identifier
- email (string) - Email for people profile
- person (object) - Personal information
- nickname (string) - Nickname for user (includes first name and last name)
- avatar (string) - Avatar for user
- gender (string) - Gender for user
- Members
malefemale
- Members
- phone (string) - Phone number for user
- address (string) - Address for user
- description (string) - Description for user
- website (string) - Website of user
- timezone (number) - Timezone offset of user (UTC)
- profiles (array[object]) - Online profiles for user
- type (string) - Profile type (eg:
facebook,twitter) - handle (string) - User handle on online platform
- type (string) - Profile type (eg:
- employment (object) - Employment information for user
- name (string) - Company name
- domain (string) - Company domain name
- title (string) - User title in company
- role (string) - User role in company
- seniority (string) - User seniority in company
- geolocation (object) - Geolocation information for user
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- locales (array[string]) - Locales supported by user (ISO 639-1)
- company (object) - Company information
- name (string) - Company name
- legal_name (string) - Company legal name
- domain (string) - Company domain name
- url (string) - Company website URL
- timezone (number) - Company timezone offset (UTC)
- phones (array[string]) - Company phone numbers
- emails (array[string]) - Company email addresses
- geolocation (object) - Company location
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- metrics (object) - Metrics for company
- employees (number) - Number of employees
- market_cap (number) - Market capitalization
- raised (number) - Money raised
- arr (number) - Annual Recurring Revenue
- tags (array[string]) - Tags for company
- segments (array[string]) - Segments attributed to people profile
- active (object) - User activity statistics (based on last active session from user)
- now (boolean) - Whether user is considered active right now or not
- last (number) - Timestamp at which the user was last active
- score (number) - Score associated to this profile, from
1to5(based on ratings from user)
- website_id
string(required)The website identifier
- page_number
number(optional)Page number for people paging
- sort_field
string(optional)Sort on field (based on available search field names)
- sort_order
string(optional)Sort order (
ascendingordescending)- search_operator
string(optional)Search operator (
ororandrespectful to boolean algebra, defaults toandif not set)- search_email
string(optional)Searches for
emailfield in people- search_nickname
string(optional)Searches for
person.nicknamefield in people- search_gender
string(optional)Searches for
person.genderfield in people- search_address
string(optional)Searches for
person.addressfield in people- search_locale
string(optional)Searches for
person.localesfield in people- search_country
string(optional)Searches for
person.geolocation.countryfield in people- search_city
string(optional)Searches for
person.geolocation.cityfield in people- search_job_company
string(optional)Searches for
employment.namefield in people- search_job_title
string(optional)Searches for
employment.titlefield in people- search_job_role
string(optional)Searches for
employment.rolefield in people- search_job_seniority
string(optional)Searches for
employment.seniorityfield in people- search_company_name
string(optional)Searches for
company.namefield in people- search_company_legal_name (string, optional) - Searches for `company.legal_name` field in people
string(required)- search_company_country
string(optional)Searches for
company.geolocation.countryfield in people- search_company_city
string(optional)Searches for
company.geolocation.cityfield in people- search_company_metrics_employees
number(optional)Searches for
company.metrics.employeesfield in people- search_company_metrics_raised
number(optional)Searches for
company.metrics.raisedfield in people- search_company_metrics_arr
number(optional)Searches for
company.metrics.arrfield in people- search_segment
string(optional)Searches for
segmentsfield in people
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"email": "valerian@crisp.im",
"person": {
"nickname": "Valerian Saliou"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "added",
"data": {
"people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_exists",
"data": {}
}Add New People ProfilePOST/website/{website_id}/people/profile
Adds a new people profile.
-
email (string, required) - Email for people profile
-
person (object, required) - Personal information
- nickname (string, required) - Nickname for user (includes first name and last name)
- avatar (string) - Avatar for user
- gender (string) - Gender for user
- Members
malefemale
- Members
- phone (string) - Phone number for user
- address (string) - Address for user
- description (string) - Description for user
- website (string) - Website of user
- timezone (number) - Timezone offset of user (UTC)
- profiles (array[object]) - Online profiles for user
- type (string, required) - Profile type (eg:
facebook,twitter) - handle (string) - User handle on online platform
- type (string, required) - Profile type (eg:
- employment (object) - Employment information for user
- name (string, required) - Company name
- domain (string) - Company domain name
- title (string) - User title in company
- role (string) - User role in company
- seniority (string) - User seniority in company
- geolocation (object) - Geolocation information for user
- country (string, required) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number, required) - Latitude coordinate
- longitude (number, required) - Longitude coordinate
- locales (array[string]) - Locales supported by user (ISO 639-1)
-
company (object) - Company information
- name (string, required) - Company name
- legal_name (string) - Company legal name
- domain (string) - Company domain name
- url (string) - Company website URL
- timezone (number) - Company timezone offset (UTC)
- phones (array[string]) - Company phone numbers
- emails (array[string]) - Company email addresses
- geolocation (object) - Company location
- country (string, required) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number, required) - Latitude coordinate
- longitude (number, required) - Longitude coordinate
- metrics (object) - Metrics for company
- employees (number) - Number of employees
- market_cap (number) - Market capitalization
- raised (number) - Money raised
- arr (number) - Annual Recurring Revenue
- tags (array[string]) - Tags for company
-
segments (array[string]) - Segments attributed to people profile
- website_id
string(required)The website identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonCheck If People Profile ExistsHEAD/website/{website_id}/people/profile/{people_id}
Checks if given people profile exists.
- website_id
string(required)The website identifier
- people_id
string(required)The people identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
"email": "valerian@crisp.im",
"person": {
"nickname": "Valerian Saliou",
"gender": "male",
"phone": "+33642926829",
"address": "France",
"description": "Full Stack Developer & UI Designer - XMPP Technologist - Objectivist - Co-founder CTO @crisp_im",
"website": "https://valeriansaliou.name/",
"timezone": -120,
"profiles": [
{
"type": "github",
"handle": "valeriansaliou"
}
],
"employment": {
"name": "Crisp",
"domain": "crisp.im",
"title": "CTO",
"role": "Software Engineer",
"seniority": "lead"
},
"geolocation": {
"country": "LV",
"region": "Rīga",
"city": "Rīga",
"coordinates": {
"latitude": 56.9553,
"longitude": 24.1195
}
},
"locales": [
"fr",
"fr-FR",
"en",
"en-US"
]
},
"company": {
"name": "Crisp",
"legal_name": "Crisp IM, Inc.",
"domain": "crisp.im",
"url": "https://crisp.im/",
"timezone": -300,
"metrics": {
"employees": 4,
"market_cap": 0,
"raised": 0,
"arr": 0
},
"geolocation": {
"country": "US",
"region": "DE",
"city": "Newark",
"coordinates": {
"latitude": 39.6837,
"longitude": 75.7497
}
},
"tags": [
"chat",
"saas"
],
"phones": [],
"emails": [
"contact@crisp.im",
"support@crisp.im"
]
},
"segments": [
"love",
"poweruser"
],
"active": {
"now": false
}
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Get People ProfileGET/website/{website_id}/people/profile/{people_id}
Resolves people profile.
-
error (boolean)
-
reason (string)
-
data (object)
- people_id (string) - People identifier
- email (string) - Email for people profile
- person (object) - Personal information
- nickname (string) - Nickname for user (includes first name and last name)
- avatar (string) - Avatar for user
- gender (string) - Gender for user
- Members
malefemale
- Members
- phone (string) - Phone number for user
- address (string) - Address for user
- description (string) - Description for user
- website (string) - Website of user
- timezone (number) - Timezone offset of user (UTC)
- profiles (array[object]) - Online profiles for user
- type (string) - Profile type (eg:
facebook,twitter) - handle (string) - User handle on online platform
- type (string) - Profile type (eg:
- employment (object) - Employment information for user
- name (string) - Company name
- domain (string) - Company domain name
- title (string) - User title in company
- role (string) - User role in company
- seniority (string) - User seniority in company
- geolocation (object) - Geolocation information for user
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- locales (array[string]) - Locales supported by user (ISO 639-1)
- company (object) - Company information
- name (string) - Company name
- legal_name (string) - Company legal name
- domain (string) - Company domain name
- url (string) - Company website URL
- timezone (number) - Company timezone offset (UTC)
- phones (array[string]) - Company phone numbers
- emails (array[string]) - Company email addresses
- geolocation (object) - Company location
- country (string) - Country code
- region (string) - Region code
- city (string) - City name
- coordinates (object) - Location coordinates
- latitude (number) - Latitude coordinate
- longitude (number) - Longitude coordinate
- metrics (object) - Metrics for company
- employees (number) - Number of employees
- market_cap (number) - Market capitalization
- raised (number) - Money raised
- arr (number) - Annual Recurring Revenue
- tags (array[string]) - Tags for company
- segments (array[string]) - Segments attributed to people profile
- active (object) - User activity statistics (based on last active session from user)
- now (boolean) - Whether user is considered active right now or not
- last (number) - Timestamp at which the user was last active
- score (number) - Score associated to this profile, from
1to5(based on ratings from user)
- website_id
string(required)The website identifier
- people_id
string(required)The people identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"email": "valerian@crisp.im",
"person": {
"nickname": "Valerian Saliou"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_email_exists",
"data": {}
}Save People ProfilePUT/website/{website_id}/people/profile/{people_id}
Saves people profile, and overwrite all previous information.
-
email (string, required) - Email for people profile
-
person (object, required) - Personal information
- nickname (string, required) - Nickname for user (includes first name and last name)
- avatar (string, optional) - Avatar for user
- gender (string, optional) - Gender for user
- Members
malefemale
- Members
- phone (string, optional) - Phone number for user
- address (string, optional) - Address for user
- description (string, optional) - Description for user
- website (string, optional) - Website of user
- timezone (number, optional) - Timezone offset of user (UTC)
- profiles (array[object], optional) - Online profiles for user
- type (string, required) - Profile type (eg:
facebook,twitter) - handle (string, optional) - User handle on online platform
- type (string, required) - Profile type (eg:
- employment (object, optional) - Employment information for user
- name (string, required) - Company name
- domain (string, optional) - Company domain name
- title (string, optional) - User title in company
- role (string, optional) - User role in company
- seniority (string, optional) - User seniority in company
- geolocation (object, optional) - Geolocation information for user
- country (string, required) - Country code
- region (string, optional) - Region code
- city (string, optional) - City name
- coordinates (object, optional) - Location coordinates
- latitude (number, required) - Latitude coordinate
- longitude (number, required) - Longitude coordinate
- locales (array[string], optional) - Locales supported by user (ISO 639-1)
-
company (object, optional) - Company information
- name (string, required) - Company name
- legal_name (string, optional) - Company legal name
- domain (string, optional) - Company domain name
- url (string, optional) - Company website URL
- timezone (number, optional) - Company timezone offset (UTC)
- phones (array[string], optional) - Company phone numbers
- emails (array[string], optional) - Company email addresses
- geolocation (object, optional) - Company location
- country (string, required) - Country code
- region (string, optional) - Region code
- city (string, optional) - City name
- coordinates (object, optional) - Location coordinates
- latitude (number, required) - Latitude coordinate
- longitude (number, required) - Longitude coordinate
- metrics (object, optional) - Metrics for company
- employees (number, optional) - Number of employees
- market_cap (number, optional) - Market capitalization
- raised (number, optional) - Money raised
- arr (number, optional) - Annual Recurring Revenue
- tags (array[string], optional) - Tags for company
-
segments (array[string], optional) - Segments attributed to people profile
- website_id
string(required)The website identifier
- people_id
string(required)The people identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonBody
{
"email": "valerian@crisp.im",
"person": {
"nickname": "Valerian Saliou"
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_email_exists",
"data": {}
}Update People ProfilePATCH/website/{website_id}/people/profile/{people_id}
Updates people profile, and save only changed fields on the previous profile revision.
-
email (string, optional) - Email for people profile
-
person (object, optional) - Personal information
- nickname (string, optional) - Nickname for user (includes first name and last name)
- avatar (string, optional) - Avatar for user
- gender (string, optional) - Gender for user
- Members
malefemale
- Members
- phone (string, optional) - Phone number for user
- address (string, optional) - Address for user
- description (string, optional) - Description for user
- website (string, optional) - Website of user
- timezone (number, optional) - Timezone offset of user (UTC)
- profiles (array[object], optional) - Online profiles for user
- type (string, optional) - Profile type (eg:
facebook,twitter) - handle (string, optional) - User handle on online platform
- type (string, optional) - Profile type (eg:
- employment (object, optional) - Employment information for user
- name (string, optional) - Company name
- domain (string, optional) - Company domain name
- title (string, optional) - User title in company
- role (string, optional) - User role in company
- seniority (string, optional) - User seniority in company
- geolocation (object, optional) - Geolocation information for user
- country (string, optional) - Country code
- region (string, optional) - Region code
- city (string, optional) - City name
- coordinates (object, optional) - Location coordinates
- latitude (number, optional) - Latitude coordinate
- longitude (number, optional) - Longitude coordinate
- locales (array[string], optional) - Locales supported by user (ISO 639-1)
-
company (object, optional) - Company information
- name (string, optional) - Company name
- legal_name (string, optional) - Company legal name
- domain (string, optional) - Company domain name
- url (string, optional) - Company website URL
- timezone (number, optional) - Company timezone offset (UTC)
- phones (array[string], optional) - Company phone numbers
- emails (array[string], optional) - Company email addresses
- geolocation (object, optional) - Company location
- country (string, optional) - Country code
- region (string, optional) - Region code
- city (string, optional) - City name
- coordinates (object, optional) - Location coordinates
- latitude (number, optional) - Latitude coordinate
- longitude (number, optional) - Longitude coordinate
- metrics (object, optional) - Metrics for company
- employees (number, optional) - Number of employees
- market_cap (number, optional) - Market capitalization
- raised (number, optional) - Money raised
- arr (number, optional) - Annual Recurring Revenue
- tags (array[string], optional) - Tags for company
-
segments (array[string], optional) - Segments attributed to people profile
- website_id
string(required)The website identifier
- people_id
string(required)The people identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "deleted",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Remove People ProfileDELETE/website/{website_id}/people/profile/{people_id}
Removes people profile in website.
- website_id
string(required)The website identifier
- people_id
string(required)The people identifier
- Authenticated Tiers:
userplugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
"session_b7642ced-5e5a-449b-9864-6489ebdadca3",
"session_2fedcdb1-c1d7-4adf-a34c-e8c83e887572"
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
"session_b7642ced-5e5a-449b-9864-6489ebdadca3"
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "people_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}List People ConversationsGET/website/{website_id}/people/conversations/{people_id}/list/{page_number}
Lists conversations linked to people.
-
error (boolean)
-
reason (string)
-
data (array[string])
- website_id
string(required)The website identifier
- people_id
string(required)The people identifier
- page_number
number(optional)The page number (paging in conversation list)
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "dispatched",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_upgrade_required",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Export All People ProfilesPOST/website/{website_id}/people/export/profiles
Exports all people profiles. The exported data is sent back to email to the requester user.
- website_id
string(required)The website identifier
Plugin ¶
Manages Crisp plugins.
One Plugin ¶
Manages a single plugin.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "Customization: colors + messages",
"price": 6,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-03T16:22:44.000Z"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plugin_not_found",
"data": {}
}Get Plugin InformationGET/plugin/{plugin_id}
Resolves plugin information.
-
error (boolean)
-
reason (string)
-
data (object)
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- plans (array[object]) - Plans the plugin is included in (if part of a plan)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- plugin_id
string(required)The plugin identifier
Plugins List ¶
Manages lists of plugins.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "The Customization plugin lets you precisely change each visual detail of your chatbox.",
"price": 10,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-09T14:26:01.000Z"
},
{
"id": "cc5b2440-552e-4142-b308-a8b04ec32ac8",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email redirect",
"description": "Redirect your emails to your Crisp inbox, and reply from there.",
"price": 4,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T02:29:41.000Z"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "The Customization plugin lets you precisely change each visual detail of your chatbox.",
"price": 10,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-09T14:26:01.000Z"
},
{
"id": "cc5b2440-552e-4142-b308-a8b04ec32ac8",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email redirect",
"description": "Redirect your emails to your Crisp inbox, and reply from there.",
"price": 4,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T02:29:41.000Z"
}
]
}List All PluginsGET/plugins/list/all/{page_number}
Lists all available plugins on the marketplace.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- plans (array[object]) - Plans the plugin is included in (if part of a plan)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- page_number
number(optional)The page number (paging in plugin list)
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "searched",
"data": [
{
"id": "cc5b2440-552e-4142-b308-a8b04ec32ac8",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email redirect",
"description": "Redirect your emails to your Crisp inbox, and reply from there.",
"price": 4,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T02:29:41.000Z"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "searched",
"data": [
{
"id": "cc5b2440-552e-4142-b308-a8b04ec32ac8",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email redirect",
"description": "Redirect your emails to your Crisp inbox, and reply from there.",
"price": 4,
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T02:29:41.000Z"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "no_search_query",
"data": {}
}Search PluginsGET/plugins/list/search/{page_number}{?query}
Searches for plugins in the marketplace, given a search term.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- plans (array[object]) - Plans the plugin is included in (if part of a plan)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- page_number
number(optional)The page number (paging in plugin list)
- query
string(required)Search query in all plugins
Plugins Subscription ¶
Manages website subscription to plugins.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "12a1a9b5-588d-4a5f-9007-4cce1093ef3a",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email Redirect",
"description": "Redirect your emails to Crisp.",
"price": 5,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T08:13:52.000Z",
"active": true,
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"card_id": "b5be332d-bf2b-464f-9710-27a1573740f7"
}
]
}List All Active SubscriptionsGET/plugins/subscription
Lists all active plugin subscriptions on all websites, linked to payment methods owned by the user, or from websites the user is member of.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- plans (array[object]) - Plans the plugin is included in (if part of a plan)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- active (boolean) - Whether the plugin is active, or has been disabled (eg: due to failed renewal payment)
- website_id (string) - Website identifier on which plugin is active
- card_id (string) - Card identifier which is used to pay the plugin subscription
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "12a1a9b5-588d-4a5f-9007-4cce1093ef3a",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email Redirect",
"description": "Redirect your emails to Crisp.",
"price": 5,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T08:13:52.000Z",
"active": true,
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}List Subscriptions For A WebsiteGET/plugins/subscription/{website_id}
Lists plugin subscriptions for given website.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- plans (array[object]) - Plans the plugin is included in (if part of a plan)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- active (boolean) - Whether the plugin is active, or has been disabled (eg: due to failed renewal payment)
- website_id (string) - Website identifier on which plugin is active
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "12a1a9b5-588d-4a5f-9007-4cce1093ef3a",
"urn": "urn:crisp.im:email-redirect:0",
"type": "internal",
"name": "Email Redirect",
"description": "Redirect your emails to Crisp.",
"price": 5,
"plans": [],
"icon": "https://storage.crisp.im/plugins/images/cc5b2440-552e-4142-b308-a8b04ec32ac8/icon.png",
"configurable": false,
"since": "2016-07-03T08:13:52.000Z",
"active": true
}
]
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Get Subscription DetailsGET/plugins/subscription/{website_id}/{plugin_id}
Resolves details on a given subscription.
-
error (boolean)
-
reason (string)
-
data (object)
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- plans (array[object]) - Plans the plugin is included in (if part of a plan)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- active (boolean) - Whether the plugin is active, or has been disabled (eg: due to failed renewal payment)
- website_id
string(required)The website identifier
- plugin_id
string(required)The plugin identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"plugin_id": "98454664-9f7d-4d95-a9ce-f37356f5e65a"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plugin_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "no_payment_card",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "payment_card_invalid",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "payment_card_expired",
"data": {}
}Subscribe Website To PluginPOST/plugins/subscription/{website_id}
Subscribes a given website to a given plugin.
- plugin_id (string, required) - Plugin identifier to subscribe to
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "unsubscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Unsubscribe Plugin From WebsiteDELETE/plugins/subscription/{website_id}/{plugin_id}
Unsubscribes a given plugin from a given website.
-
error (boolean)
-
reason (string)
-
data (object)
- website_id
string(required)The website identifier
- plugin_id
string(required)The plugin identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"plugin_id": "98454664-9f7d-4d95-a9ce-f37356f5e65a",
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"token": "1241f744-eb39-43e6-bc98-6abdde221019",
"schema": {
"id": "crisp:service:api/_schema/plugin#urn:crisp.im:customization:0",
"type": "object",
"properties": {
"color": {
"type": "object",
"title": "Color customization",
"description": "Customize the color of every element of your Crisp (hexadecimal color codes)",
"properties": {
"chatbox": {
"type": "object",
"title": "Chatbox colors",
"description": "Change the colors of the chatbox elements. Save and refresh the chatbox page to test it live!",
"properties": {
"25": {
"type": "string",
"pattern": "^(#[0-9a-fA-F]{6})?$",
"title": "Color (degree 25, lightest)",
"description": "#000000"
}
}
}
}
}
}
},
"settings": {},
"settings_form_url": null,
"callback_url": null
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plugin_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_configurable",
"data": {}
}Get Subscription SettingsGET/plugins/subscription/{website_id}/{plugin_id}/settings
Resolves plugin subscription settings. Used to read plugin configuration on a given website.
-
error (boolean)
-
reason (string)
-
data (object)
- plugin_id (string) - Plugin identifier
- website_id (string) - Website identifier
- token (string) - Subscription secret token (used to authenticate against external configuration forms)
- schema (object) - Configuration schema (JSONSchema)
- settings (object) - Active configuration for subscription (format enforced by configuration schema)
- settings_form_url (string) - URL to external configuration form page (if any)
- callback_url (string) - URL to plugin authentication callback (if any)
- website_id
string(required)The website identifier
- plugin_id
string(required)The plugin identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"color": {
"chatbox": {
"25": "#bbbbbb"
}
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "saved",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_data",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plugin_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_configurable",
"data": {}
}Save Subscription SettingsPUT/plugins/subscription/{website_id}/{plugin_id}/settings
Saves plugin subscription settings (overwrites existing settings). Used to configure a given plugin on a given website.
Submit a raw JSON object containing the bare settings object. The object format is plugin-specific, and is enforced by the configuration schema.
- website_id
string(required)The website identifier
- plugin_id
string(required)The plugin identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"color": {
"chatbox": {
"25": "#bbbbbb"
}
}
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "invalid_data",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plugin_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_configurable",
"data": {}
}Update Subscription SettingsPATCH/plugins/subscription/{website_id}/{plugin_id}/settings
Updates plugin subscription settings (merges with existing settings). Used to configure a given plugin on a given website.
Submit a raw JSON object containing the bare settings object. The object format is plugin-specific, and is enforced by the configuration schema.
- website_id
string(required)The website identifier
- plugin_id
string(required)The plugin identifier
Plugin Connect Account ¶
Manages connected plugin account.
- Authenticated Tiers:
plugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"plugin_id": "aa0b64dd-9fb4-4db9-80d6-5a49eb84087b"
}
}Get Connect AccountGET/plugin/connect/account
Resolves the current plugin account information.
-
error (boolean)
-
reason (string)
-
data (object)
- plugin_id (string) - Plugin identifier
Plugin Connect Session ¶
Manages connected plugin session.
- Authenticated Tiers:
plugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonHeaders
Content-Type: application/jsonCheck Connect Session ValidityHEAD/plugin/connect/session
Checks whether the connected plugin session is valid or not.
Plugin Connect Websites ¶
Manages plugin connect websites.
- Authenticated Tiers:
plugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"token": "1241f744-eb39-43e6-bc98-6abdde221019",
"settings": {}
}
]
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"token": "1241f744-eb39-43e6-bc98-6abdde221019",
"settings": {}
}
]
}List All Connect WebsitesGET/plugin/connect/websites/all/{page_number}
Lists all websites linked to connected plugin.
-
error (boolean)
-
reason (string)
-
data (array[object])
- website_id (string) - Website identifier
- token (string) - Subscription secret token (used to authenticate against external configuration forms)
- settings (object) - Plugin settings for website
- page_number
number(optional)The page number (paging if many websites)
- filter_configured
string(optional)Restrict to configured plugins only (
1or0)
- Authenticated Tiers:
plugin
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"token": "1241f744-eb39-43e6-bc98-6abdde221019",
"settings": {},
"difference": "added"
}
]
}List Connect Websites SinceGET/plugin/connect/websites/since{?date_since}
Lists the websites linked or unlinked or updated for connected plugin, since given date. This is basically a differential that allows you to either add, remote or update websites in use for the plugin.
-
error (boolean)
-
reason (string)
-
data (array[object])
- website_id (string) - Website identifier
- token (string) - Subscription secret token (used to authenticate against external configuration forms)
- settings (object) - Plugin settings for website
- difference: (enum[string]) - Difference action (what to do with the differential data)
- Members
addedupdatedremoved
- Members
- date_since
string(required)Date since when to proceed a differential response (ISO 8601)
- filter_configured
string(optional)Restrict to configured plugins only (
1or0)
Plan ¶
Manages Crisp plans.
One Plan ¶
Manages a single plan.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"id": "2ef6667e-e74f-4fa4-9dca-bf52db5cc3e4",
"name": "Business",
"price": 70,
"trial_days": 14,
"since": "2016-08-01T09:55:27.000Z",
"plugins": [
{
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "Customization: colors + messages",
"price": 6,
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-03T16:22:44.000Z"
}
]
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plan_not_found",
"data": {}
}Get Plan InformationGET/plan/{plan_id}
Resolves plan information.
-
error (boolean)
-
reason (string)
-
data (object)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- trial_days (number) - Number of days the plan can be tried for free upon first subscription
- since (string) - Datetime since when the plan is available
- plugins (array[object])
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
- plan_id
string(required)The plan identifier
Plans List ¶
Manages lists of plans.
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "2ad0d6f5-f14c-477b-be46-0643d82c48af",
"name": "Seed",
"price": 0,
"trial_days": 0,
"since": "2016-08-01T09:54:21.000Z"
},
{
"id": "7d901d5f-b9a8-4353-bfdb-1035e5b1fa89",
"name": "Pro",
"price": 25,
"trial_days": 14,
"since": "2016-08-01T09:54:59.000Z",
"plugins": [
{
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "Customization: colors + messages",
"price": 6,
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-03T16:22:44.000Z"
}
]
},
{
"id": "2ef6667e-e74f-4fa4-9dca-bf52db5cc3e4",
"name": "Business",
"price": 70,
"trial_days": 14,
"since": "2016-08-01T09:55:27.000Z",
"plugins": [
{
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "Customization: colors + messages",
"price": 6,
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-03T16:22:44.000Z"
}
]
},
{
"id": "604ca3af-d40b-487c-a29d-b9d98d509152",
"name": "Enterprise",
"price": 200,
"trial_days": 14,
"since": "2016-08-01T09:55:31.000Z",
"plugins": [
{
"id": "ab53aafd-9e76-4f39-8a2d-cc1d92cf8984",
"urn": "urn:crisp.im:customization:0",
"type": "internal",
"name": "Customization",
"description": "Customization: colors + messages",
"price": 6,
"icon": "https://storage.crisp.im/plugins/images/ab53aafd-9e76-4f39-8a2d-cc1d92cf8984/icon.png",
"configurable": true,
"since": "2016-07-03T16:22:44.000Z"
}
]
}
]
}List PlansGET/plans/list
Lists available plans.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- trial_days (number) - Number of days the plan can be tried for free upon first subscription
- since (string) - Datetime since when the plan is available
- plugins (array[object])
- id (string) - Plugin identifier
- urn (string) - Plugin Uniform Resource Name
- type (enum[string]) - Plugin type
- Members
internalexternal
- Members
- name (string) - Plugin name
- description (string) - Plugin description
- price (number) - Plugin price (in platform-wide currency)
- icon (string) - Plugin icon URL
- configurable (boolean) - Whether the plugin can be configured or not
- since (string) - Datetime since when the plugin is available
Plans Subscription ¶
Manages website subscription to a plan.
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "listed",
"data": [
{
"id": "2ef6667e-e74f-4fa4-9dca-bf52db5cc3e4",
"name": "Business",
"price": 70,
"trial_days": 14,
"since": "2016-08-01T09:55:27.000Z",
"trial_end": "2016-08-23T18:30:00.000Z",
"bill_period": "monthly",
"bill_valid_until": "2016-10-04T18:30:00.000Z",
"active": true,
"website": {
"id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"logo": "https://storage.crisp.im/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/ed9f8379-852b-4ee6-bf72-65edb0401be9.jpg"
},
"coupon_redeemed": false,
"card_id": "da649112-cd92-4dcf-addb-71bbd15ebd5e"
}
]
}List All Active SubscriptionsGET/plans/subscription
Lists all active plan subscriptions on all websites, linked to payment methods owned by the user, or from websites the user is member of.
-
error (boolean)
-
reason (string)
-
data (array[object])
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- trial_days (number) - Number of days the plan can be tried for free upon first subscription
- since (string) - Datetime since when the plan is available
- trial_end (string) - Date when the plan trial ends, or ended (date after which the plan starts to be paid by the user)
- bill_period: (enum[string]) - Bill period (how often the subscription is paid for)
- Members
monthlyyearly
- Members
- bill_valid_until (string) - Date until which the bill is valid for subscription (date at which the subscription will be renewed, thus paid again)
- active (boolean) - Whether the plan is active, or has been disabled (eg: due to failed renewal payment)
- website (object)
- id (string) - Website identifier
- name (string) - Website name
- domain (string) - Website domain
- logo (string) - Website custom logo image URL (can be blank)
- coupon_redeemed (boolean) - Whether a coupon was redeemed on this plan or not
- card_id (string) - Card identifier which is used to pay the plan subscription
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"id": "2ef6667e-e74f-4fa4-9dca-bf52db5cc3e4",
"name": "Business",
"price": 70,
"trial_days": 14,
"since": "2016-08-01T09:55:27.000Z",
"trial_end": "2016-08-23T18:30:00.000Z",
"bill_period": "monthly",
"bill_valid_until": "2016-10-04T18:30:00.000Z",
"active": true,
"website": {
"id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc",
"name": "Crisp",
"domain": "crisp.im",
"logo": "https://storage.crisp.im/users/avatar/website/8c842203-7ed8-4e29-a608-7cf78a7d2fcc/ed9f8379-852b-4ee6-bf72-65edb0401be9.jpg"
},
"coupon_redeemed": false,
"card_id": "da649112-cd92-4dcf-addb-71bbd15ebd5e"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_not_found",
"data": {}
}Get Subscription For A WebsiteGET/plans/subscription/{website_id}
Resolves plan subscription for given website.
-
error (boolean)
-
reason (string)
-
data (object)
- id (string) - Plan identifier
- name (string) - Plan name
- price (number) - Plan price (in platform-wide currency)
- trial_days (number) - Number of days the plan can be tried for free upon first subscription
- since (string) - Datetime since when the plan is available
- trial_end (string) - Date when the plan trial ends, or ended (date after which the plan starts to be paid by the user)
- bill_period: (enum[string]) - Bill period (how often the subscription is paid for)
- Members
monthlyyearly
- Members
- bill_valid_until (string) - Date until which the bill is valid for subscription (date at which the subscription will be renewed, thus paid again)
- active (boolean) - Whether the plan is active, or has been disabled (eg: due to failed renewal payment)
- website (object)
- id (string) - Website identifier
- name (string) - Website name
- domain (string) - Website domain
- logo (string) - Website custom logo image URL (can be blank)
- coupon_redeemed (boolean) - Whether a coupon was redeemed on this plan or not
- card_id (string) - Card identifier which is used to pay the plan subscription
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"plan_id": "2ef6667e-e74f-4fa4-9dca-bf52db5cc3e4"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "plan_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "no_payment_card",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "payment_card_invalid",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "payment_card_expired",
"data": {}
}Subscribe Website To PlanPOST/plans/subscription/{website_id}
Subscribes a given website to a given plan.
- plan_id (string, required) - Plan identifier to subscribe to
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "unsubscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_subscribed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_exists",
"data": {}
}Unsubscribe Plan From WebsiteDELETE/plans/subscription/{website_id}
Unsubscribes a given plan from a given website.
-
error (boolean)
-
reason (string)
-
data (object)
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"period": "yearly"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "updated",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_not_found",
"data": {}
}Change Bill Period For Website SubscriptionPATCH/plans/subscription/{website_id}/bill/period
Changes how often the website subscription is paid for. The payment method will be debited at selected interval for the due amount.
- period: (enum[string], required) - Bill period (how often the subscription is paid for)
- Members
monthlyyearly
- Members
- website_id
string(required)The website identifier
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonHeaders
Content-Type: application/jsonBody
{
"error": false,
"reason": "resolved",
"data": {
"code": "CRISP+AWESOME",
"policy": {
"rebate_percent": 0.3,
"trial_days": 60
},
"redeem_limit": 100,
"expire_at": "2016-11-27T16:29:15.000Z"
}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_disabled",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_has_coupon",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_taken",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_expired",
"data": {}
}Check Coupon Availability For Website SubscriptionGET/plans/subscription/{website_id}/coupon{?code}
Resolves a coupon for a website subscription. This helps check for coupon availability and returns information on the coupon.
-
error (boolean)
-
reason (string)
-
data (object)
- code (string) - Coupon code
- policy (object)
- rebate_percent (number) - Rebate percentage on plan price (or none)
- trial_days (number) - Number of days of extended plan trial (or none)
- redeem_limit (number) - Number of times the coupon can be redeemed (or none)
- expire_at (string) - Coupon expiration date (or none)
- website_id
string(required)The website identifier
- code
string(required)Coupon code
- Authenticated Tiers:
user
Headers
Content-Type: application/jsonBody
{
"code": "CRISP+AWESOME"
}Headers
Content-Type: application/jsonBody
{
"error": false,
"reason": "redeemed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_member_role_not_allowed",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_disabled",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "website_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_not_found",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "subscription_has_coupon",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_taken",
"data": {}
}Headers
Content-Type: application/jsonBody
{
"error": true,
"reason": "coupon_expired",
"data": {}
}Redeem Coupon For Website SubscriptionPATCH/plans/subscription/{website_id}/coupon
Redeems a coupon for a website subscription. This applies coupon rebates and upgrades immediately to the subscription.
- code (string, required) - Coupon code to redeem
- website_id
string(required)The website identifier