Getting started

Setup and usage

The Web API supplies a collection of HTTP methods that underpin the majority of Support Board functionality. To start using the Web API follow the tutorial below.

Usage

Make a CURL HTTP POST call to the file include/api.php of your Support Board installation. You can use the following code to make the calls:

                                $ch = curl_init('https://YOUR-WEBSITE.com/supportboard/include/api.php');
                                $parameters = [
                                        CURLOPT_RETURNTRANSFER => true,
                                        CURLOPT_SSL_VERIFYPEER => false,
                                        CURLOPT_USERAGENT => 'Support Board',
                                        CURLOPT_POST => true,
                                        CURLOPT_CONNECTTIMEOUT => 5,
                                        CURLOPT_POSTFIELDS => http_build_query(['token' => 'YOUR-TOKEN', 'function' => 'METHOD-NAME'])
                                ];
                                curl_setopt_array($ch, $parameters);
                                $response = curl_exec($ch);
                                curl_close($ch);
                            

The variable $response will contains the JSON response. You can add new arguments in the query array: ['token' => '', 'function' => '', 'argument-name' => 'value', ...].


Replace the following strings with the correct values:

  • Replace YOUR-WEBSITE with the URL of your website. The full URL must point to the file include/api.php of your Support Board installation. It should looks like this: https://YOUR-WEBSITE.com/supportboard/include/api.php (if you're using the WordPress version: https://YOUR-WEBSITE.com/wp-content/plugins/supportboard/supportboard/include/api.php).
  • Replace YOUR-TOKEN with the token of an admin user. You can get the token from the Users area by opening the profile box of an admin user. Only admin tokens are supported and only the admins can view the tokens. Warning! This token must be kept always secret.
  • Replace METHOD-NAME with the name of the method you want to use. Get them from the methods list below.

WEB API

Manage Users

Methods to manage users, agents, and admins.


get-user

Return the user details of a user.


Arguments

token
Your admin secret token.
function
Insert get-user.
user_id
The ID of the user.
extra
Set it to true to get the additional user details. Default: false.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "id": "123456",
                                        "first_name": "John",
                                        "last_name": "Doe",
                                        "email": "johon@example.com",
                                        "profile_image": "https://board.support/user.svg",
                                        "user_type": "visitor",
                                        "creation_time": "2020-05-12 14:28:57",
                                        "last_activity": "2020-05-12 14:28:57",
                                        "department": null,
                                        "token": "a521773c5a566a251c3fb00e93162b20ff955b12",
                                        "password": "",
                                        "details": [
                                            {
                                                "slug": "location",
                                                "name": "Location",
                                                "value": "New York, United States"
                                            },
                                            {
                                                "slug": "country_code",
                                                "name": "Country code",
                                                "value": "America/New_York"
                                            }
                                            ...
                                        ]
                                    }
                                }
                            

Return {"success":true, "response":false} if the user is not found.


get-user-extra

Return the additional details of a user.


Arguments

token
Your admin secret token.
function
Insert get-user-extra.
user_id
The ID of the user.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "slug": "browser",
                                            "name": "Browser",
                                            "value": "Chrome"
                                        },
                                        {
                                            "slug": "current_url",
                                            "name": "Current URL",
                                            "value": "https://board.support/"
                                        },
                                        {
                                            "slug": "os",
                                            "name": "OS",
                                            "value": "Windows 10"
                                        },
                                        {
                                            "slug": "phone",
                                            "name": "Phone",
                                            "value": "3203057977"
                                        }
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if the user is not found.


get-users

Return the user details of all the users.


Arguments

token
Your admin secret token.
function
Insert get-users.
sorting
Set the order of the returned values. Insert ["column", "order"] and replace column with one of the following values: first_name, last_name, email, profile_image, user_type, creation_time, last_activity, department. Replace order with ASC or DESC.
user_types
Array in JSON format of user types to include in the return value. Array syntax: ["", "", "", ...]. Accepted values: visitor, lead, user, agent, admin. Default: all.
search
The string to search.
pagination
Integer from 1 to N to limit the results number. Insert 1 to get the first 100 results, 2 for the results from 101 to 200, etc.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "880",
                                            "first_name": "User",
                                            "last_name": "#29938",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 08:58:18",
                                            "last_activity": "2020-05-13 09:07:39",
                                            "department": null,
                                            "token": "6d969f64f5ed6263714b9b39f3d3700b66f16820"
                                        },
                                        {
                                            "id": "879",
                                            "first_name": "User",
                                            "last_name": "#86773",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 08:38:41",
                                            "last_activity": "2020-05-13 08:58:12",
                                            "department": null,
                                            "token": "2e5064670707d06b661d04353f4a462ec927f19a"
                                        }
                                        ...
                                    ]
                                }
                            

get-new-users

Return the users created after the given date.


Arguments

token
Your admin secret token.
function
Insert get-new-users.
datetime
Date and time in the following format: YYYY-MM-DD HH:MM:SS. Ex. 2020-05-13 13:35:59. You can remove the time and leave only the date. The dates stored in the database are in UTC+0.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "880",
                                            "first_name": "User",
                                            "last_name": "#29938",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 08:58:18",
                                            "last_activity": "2020-05-13 09:07:39",
                                            "department": null,
                                            "token": "6d969f64f5ed6263714b9b39f3d3700b66f16820"
                                        },
                                        {
                                            "id": "879",
                                            "first_name": "User",
                                            "last_name": "#86773",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 08:38:41",
                                            "last_activity": "2020-05-13 08:58:12",
                                            "department": null,
                                            "token": "2e5064670707d06b661d04353f4a462ec927f19a"
                                        }
                                        ...
                                    ]
                                }
                            

get-online-users

Return the online users including agents and admins.


Arguments

token
Your admin secret token.
function
Insert get-online-users.
exclude_id
Array of users IDs in JSON format to exclude from the returned values. Array syntax: [123, 123, 123, ...]

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "881",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 09:18:59",
                                            "last_activity": "2020-05-13 09:32:34",
                                            "department": null,
                                            "token": "e435a5c67f4276cdb9c6fc19b7c015990ffc3268"
                                        },
                                        {
                                            "id": "880",
                                            "first_name": "User",
                                            "last_name": "#29938",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 08:58:18",
                                            "last_activity": "2020-05-13 09:32:28",
                                            "department": null,
                                            "token": "6d969f64f5ed6263714b9b39f3d3700b66f16820"
                                        }
                                        ...
                                    ]
                                }
                            

search-users

Return the users matching the search.


Arguments

token
Your admin secret token.
function
Insert search-users.
search
The string to search. The additional user details are supported too.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "881",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 09:18:59",
                                            "last_activity": "2020-05-13 09:32:34",
                                            "department": null,
                                            "token": "e435a5c67f4276cdb9c6fc19b7c015990ffc3268"
                                        },
                                        {
                                            "id": "880",
                                            "first_name": "User",
                                            "last_name": "#29938",
                                            "email": null,
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "visitor",
                                            "creation_time": "2020-05-13 08:58:18",
                                            "last_activity": "2020-05-13 09:32:28",
                                            "department": null,
                                            "token": "6d969f64f5ed6263714b9b39f3d3700b66f16820"
                                        }
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if no users are found.


add-user

Create a new user.


Arguments

token
Your admin secret token.
function
Insert add-user.
first_name
The first name of the user. Default: User
last_name
The last name of the user. Default: #RANDOM-NUMBER
email
The email of the user. Default: empty.
profile_image
The profile picture of the user. Default:
password
The password of the user. Default: empty.
user_type
The user type of the user. Accepted values: visitor, lead, user, agent, admin. Default: visitor if the email is not provided, otherwise user.
extra
Array of additional user details in JSON format. Any detail is accepted. Built-in details (IDs): phone, city, language, country, birthday, company, facebook, twitter, linkedin, website, ip, country_code, browser, currency, location, os, time_zone, current_url.
Array syntax:
{"ID": ["value", "Name"], "ID": ["value", "Name"], ...}

Response

                                {
                                    "success": true,
                                    "response": 123456
                                }
                            

Other possible responses: ID of the new user on success, otherwise duplicate-email, invalid-user-type, MySQL error message.


update-user

Update the details of an existing user.


Arguments

token
Your admin secret token.
function
Insert update-user.
user_id
The ID of the user to update.
first_name
The first name of the user.
last_name
The last name of the user.
email
The email of the user. Insert NULL to delete the email.
profile_image
The profile picture of the user.
password
The password of the user.
user_type
The user type of the user. Accepted values: visitor, lead, user, agent, admin.
extra
Array of additional user details in JSON format.
Array syntax:
{"ID": ["value", "Name"], "ID": ["value", "Name"], ...}

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

Other possible responses: duplicate-email, invalid-user-type, MySQL error message.


delete-user

Delete a user and all linked conversations and messages.


Arguments

token
Your admin secret token.
function
Insert delete-user.
user_id
The ID of the user to delete.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

delete-users

Delete multiple users and all linked conversations and messages.


Arguments

token
Your admin secret token.
function
Insert is-online.
user_ids
Array of IDs of the users to delete. Array syntax: [123, 123, 123, ...]

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

is-online

Check if a user is online.


Arguments

token
Your admin secret token.
function
Insert is-online.
user_id
The ID of the user.

Response

                                {
                                    "success": true,
                                    "response": "offline"
                                }
                            

Possible responses: offline, online


current-url

Get or set the current URL of a user or the last visited URL.


Arguments

token
Your admin secret token.
function
Insert current-url.
user_id
The ID of the user
url
The URL to set as "Current URL". If this argument is set the function will only set the value and it will not return any URL.

Response

                                {
                                    "success": true,
                                    "response": "https://board.support"
                                }
                            

Return {"success":true,"response":false} if the URL is not found. Return {"success":true,"response":true} if the url argument is set.


count-users

Return the total users' count grouped by user type.


Arguments

token
Your admin secret token.
function
Insert count-users.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "all": "335",
                                        "lead": "288",
                                        "user": "15",
                                        "visitor": "28"
                                    }
                                }
                            

update-user-to-lead

Change the user type of a user to lead.


Arguments

token
Your admin secret token.
function
Insert update-user-to-lead.
user_id
The ID of the user.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

slack-users

Return the agents-slack members' connection information. The Slack App is required.


Arguments

token
Your admin secret token.
function
Insert slack-users.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "slack_users": [
                                            {
                                                "id": "U328T701Z",
                                                "name": "Support Schio"
                                            },
                                            {
                                                "id": "UR5F0GK7T",
                                                "name": "Robert Pitt"
                                            }
                                            ...
                                        ],
                                        "agents": [
                                            {
                                                "id": "2",
                                                "name": "Alex Smith"
                                            },
                                            {
                                                "id": "445",
                                                "name": "Federico Schiocchet"
                                            },
                                            {
                                                "id": "724",
                                                "name": "Alberto Prade"
                                            }
                                            ...
                                        ],
                                        "saved": {
                                            "U328T701Z": "445",
                                            "UR5F0GK7T": "2"
                                            ...
                                        }
                                    }
                                }
                            

WEB API

Manage Conversations

Methods to manage conversations and messages.


get-conversation

Return a conversation and the messages of the conversation.


Arguments

token
Your admin secret token.
function
Insert get-conversation.
user_id
The ID of the user linked to the conversation.
conversation_id
The ID of the conversation.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "messages": [
                                            {
                                                "id": "2044",
                                                "user_id": "802",
                                                "message": "Hello!",
                                                "creation_time": "2020-05-0410:06:30",
                                                "attachments": "",
                                                "status_code": "0",
                                                "payload": "",
                                                "conversation_id": "946",
                                                "first_name": "Don",
                                                "last_name": "John",
                                                "profile_image": "https://board.support/user.svg",
                                                "user_type": "lead"
                                            },
                                            {
                                                "id": "2045",
                                                "user_id": "377",
                                                "message": "Hello,howcanIhelp?",
                                                "creation_time": "2020-05-0410:06:33",
                                                "attachments": "",
                                                "status_code": "0",
                                                "payload": "",
                                                "conversation_id": "946",
                                                "first_name": "Bruce",
                                                "last_name": "Peterson",
                                                "profile_image": "https://board.support/agent.svg",
                                                "user_type": "agent"
                                            }
                                            ...
                                        ],
                                        "details": {
                                            "user_id": "802",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "lead",
                                            "id": "946",
                                            "title": "",
                                            "conversation_time": "2020-05-0410:06:30",
                                            "conversation_status_code": "3",
                                            "department": null
                                        }
                                    }
                                }
                            

Return {"success":true,"response":{"messages":[],"details":""}} if the conversation is not found.


get-conversations

Return all the conversations. Each conversation includes the last message of the conversation.


Arguments

token
Your admin secret token.
function
Insert get-conversations.
pagination
Integer from 1 to N to limit the results number. Insert 1 to get the first 100 results, 2 for the results from 101 to 200, etc.
status_code
The status code of the returned conversations. Default: all the conversations in the inbox, excluding the conversations in the trash and archive. Status codes: live = 0, waiting answer from user = 1, waiting answer from agent = 2, archive = 3, trash = 4.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "1431",
                                            "user_id": "632",
                                            "message": "Hello!",
                                            "creation_time": "2020-04-24 10:53:35",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "764",
                                            "message_user_type": "lead",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "conversation_status_code": "2",
                                            "user_type": "lead"
                                        },
                                        {
                                            "id": "1430",
                                            "user_id": "631",
                                            "message": "Hi! Can you help me?",
                                            "creation_time": "2020-04-24 10:38:37",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "763",
                                            "message_user_type": "lead",
                                            "first_name": "Jessica",
                                            "last_name": "Brenson",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "conversation_status_code": "2",
                                            "user_type": "lead"
                                        }
                                        ...
                                    ]
                                }
                            

get-new-conversations

Return the conversations created after the given date or with a message created after the given date. Each conversation includes the last message of the conversation.


Arguments

token
Your admin secret token.
function
Insert get-new-conversations.
datetime
Date and time in the following format: YYYY-MM-DD HH:MM:SS. Ex. 2020-05-13 13:35:59. You can remove the time and leave only the date. The dates stored in the database are in UTC+0.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "1431",
                                            "user_id": "632",
                                            "message": "Hello!",
                                            "creation_time": "2020-04-24 10:53:35",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "764",
                                            "message_user_type": "lead",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "conversation_status_code": "2",
                                            "user_type": "lead"
                                        },
                                        {
                                            "id": "1430",
                                            "user_id": "631",
                                            "message": "Hi! Can you help me?",
                                            "creation_time": "2020-04-24 10:38:37",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "763",
                                            "message_user_type": "lead",
                                            "first_name": "Jessica",
                                            "last_name": "Brenson",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "conversation_status_code": "2",
                                            "user_type": "lead"
                                        }
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if no conversations are found.


get-user-conversations

Return the conversations of a user. Each conversation includes the last message of the conversation.


Arguments

token
Your admin secret token.
function
Insert get-user-conversations.
user_id
The ID of the user.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "2266",
                                            "user_id": "377",
                                            "message": "Hello, how are you?",
                                            "creation_time": "2020-05-12 17:30:35",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "995",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "user_type": "lead",
                                            "conversation_status_code": "3"
                                        },
                                        {
                                            "id": "2266",
                                            "user_id": "5",
                                            "message": "Please leave a feedback.",
                                            "creation_time": "2020-05-12 17:30:35",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "995",
                                            "first_name": "Adam",
                                            "last_name": "Gates",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "user_type": "agent",
                                            "conversation_status_code": "3"
                                        }
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if no conversations are found.


get-new-user-conversations

Return the user conversations created after the given date or with a message created after the given date. Each conversation includes the last message of the conversation.


Arguments

token
Your admin secret token.
function
Insert get-new-user-conversations.
user_id
The ID of the user.
datetime
Date and time in the following format: YYYY-MM-DD HH:MM:SS. Ex. 2020-05-13 13:35:59. You can remove the time and leave only the date. The dates stored in the database are in UTC+0.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "2266",
                                            "user_id": "377",
                                            "message": "Hello, how are you?",
                                            "creation_time": "2020-05-12 17:30:35",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "995",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "user_type": "lead",
                                            "conversation_status_code": "3"
                                        },
                                        {
                                            "id": "2266",
                                            "user_id": "5",
                                            "message": "Please leave a feedback.",
                                            "creation_time": "2020-05-12 17:30:35",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "995",
                                            "first_name": "Adam",
                                            "last_name": "Gates",
                                            "profile_image": "https://board.support/media/user.svg",
                                            "user_type": "agent",
                                            "conversation_status_code": "3"
                                        }
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if no conversations are found.


search-conversations

Return the conversations matching the search.


Arguments

token
Your admin secret token.
function
Insert search-conversations.
search
The string to search. The search function search into the attachment's names, the messages, and the user email, first name and last name.

Response

                                {
                                  "success": true,
                                  "response": [
                                    {
                                      "id": "2130",
                                      "user_id": "806",
                                      "message": "Hello! How can I help you?",
                                      "creation_time": "2020-05-05 15:45:38",
                                      "attachments": "",
                                      "status_code": "0",
                                      "payload": "",
                                      "conversation_id": "952",
                                      "message_user_type": "admin",
                                      "first_name": "User",
                                      "last_name": "#24254",
                                      "profile_image": "https://board.support/media/user.svg",
                                      "conversation_status_code": "4",
                                      "user_type": "lead"
                                    },
                                    {
                                      "id": "2127",
                                      "user_id": "805",
                                      "message": "Hi, I need help!",
                                      "creation_time": "2020-05-05 08:12:57",
                                      "attachments": "",
                                      "status_code": "0",
                                      "payload": "",
                                      "conversation_id": "951",
                                      "message_user_type": "user",
                                      "first_name": "Don",
                                      "last_name": "John",
                                      "profile_image": "https://board.support/media/user.svg",
                                      "conversation_status_code": "0",
                                      "user_type": "user"
                                    }
                                    ...
                                  ]
                                }
                            

Return {"success":true, "response":[]} if no conversations are found.


search-user-conversations

Return the conversations of the given user ID that matches the search terms.


Arguments

token
Your admin secret token.
function
Insert search-user-conversations.
search
The string to search. The search function supports attachment names, messages of the conversations, and the conversation title.
id
The ID of the user.

Response

                                {
                                  "success": true,
                                  "response": [
                                    {
                                        "id": "3362",
                                        "user_id": "2",
                                        "message": "Hello! How can I help you?",
                                        "creation_time": "2020-06-24 17:34:39",
                                        "attachments": "",
                                        "status_code": "0",
                                        "payload": "",
                                        "conversation_id": "1364",
                                        "first_name": "Don",
                                        "last_name": "John",
                                        "profile_image": "https://board.support/media/user.svg",
                                        "user_type": "lead",
                                        "conversation_status_code": "0"
                                    },
                                    {
                                        "id": "3345",
                                        "user_id": "1195",
                                        "message": "Hi, I need help!",
                                        "creation_time": "2020-06-24 17:06:23",
                                        "attachments": "",
                                        "status_code": "0",
                                        "payload": "",
                                        "conversation_id": "1363",
                                        "first_name": "Don",
                                        "last_name": "John",
                                        "profile_image": "https://board.support/media/user.svg",
                                        "user_type": "lead",
                                        "conversation_status_code": "2"
                                    }
                                    ...
                                  ]
                                }
                            

Return {"success":true, "response":[]} if no conversations are found.


new-conversation

Create a new conversation.


Arguments

token
Your admin secret token.
function
Insert new-conversation.
user_id
The ID of the user linked to the conversation.
status_code
The status code of the conversation. Default: 0. Status codes: live = 0, waiting answer from user = 1, waiting answer from agent = 2, archive = 3, trash = 4.
title
The title of the conversation. Default: empty.
department
The ID of a department. You can get the IDs from Settings > Miscellaneous > Departments. Default: NULL.
agent_id
The ID of the agent assigned to the conversation. Default: NULL.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "messages": [],
                                        "details": {
                                            "user_id": "882",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "lead",
                                            "id": "1007",
                                            "title": "",
                                            "conversation_time": "2020-05-15 12:51:39",
                                            "conversation_status_code": "0",
                                            "department": null
                                        }
                                    }
                                }
                            

Other possible responses: Conversation details array on success, otherwise user-not-found, MySQL error message


update-conversation-status

Update the status code of a conversation.


Arguments

token
Your admin secret token.
function
Insert update-conversation-status.
conversation_id
The ID of the conversation.
status_code
The status code of the conversation. Status codes: live = 0, waiting answer from user = 1, waiting answer from agent = 2, archive = 3, trash = 4.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

Return invalid-status-code if the status code is invalid.


update-conversation-department

Update the department of a conversation.


Arguments

token
Your admin secret token.
function
Insert update-conversation-department.
conversation_id
The ID of the conversation to update.
department
The ID of a department. You can get the IDs from Settings > Miscellaneous > Departments. The department ID is not validated, so double-check it to make sure it exists.
message
A string containing a message for the agents. If set, an email will be sent to all the agents assigned to the new department to notify them of the new conversation.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

set-rating

Assign a rating to a conversation and optionally update a message of the conversation.


Arguments

token
Your admin secret token.
function
Insert set-rating.
settings
Insert the following array in JSON format: { "settings" : { "conversation_id": "ID", "rating": "RATING" }}. Replace ID with the ID of the conversation to rate, replace rating with 1 for a positive rating or with 0 for a negative one.
payload
The payload of the message in JSON format.
message_id
The ID of the message to update.
message
The content of the message.
user_id
The ID of the user of the conversation linked to the message.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

get-rating

Get the ratings of the conversations assigned to an agent.


Arguments

token
Your admin secret token.
function
Insert get-rating.
user_id
The ID of an agent.

Response

                                {
                                    "success": true,
                                    "response": [4,2]
                                }
                            

The response array: [count of positive ratings, count of negative ratings]. In the example above there are 4 positive ratings and 2 negative ratings.


get-new-messages

Return the messages of a conversation created after the given date.


Arguments

token
Your admin secret token.
function
Insert get-new-messages.
user_id
The ID of the user of the conversation.
conversation_id
The ID of the conversation.
datetime
Date and time in the following format: YYYY-MM-DD HH:MM:SS. Ex. 2020-05-13 13:35:59. You can remove the time and leave only the date. The dates stored in the database are in UTC+0.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "2319",
                                            "user_id": "377",
                                            "message": "Welcome to our support chat!",
                                            "creation_time": "2020-05-12 18:04:50",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "1004",
                                            "first_name": "Virtual",
                                            "last_name": "Agent",
                                            "profile_image": "https://board.support/bot.svg",
                                            "user_type": "bot"
                                        },
                                        {
                                            "id": "2320",
                                            "user_id": "877",
                                            "message": "Thank you! I need help.",
                                            "creation_time": "2020-05-12 18:04:51",
                                            "attachments": "",
                                            "status_code": "0",
                                            "payload": "",
                                            "conversation_id": "1004",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "lead"
                                        }
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if no conversations are found.


send-message

Add a new message to an existing conversation.


Arguments

token
Your admin secret token.
function
Insert send-message.
user_id
The ID of the user of the conversation.
conversation_id
The ID of the conversation.
message
The content of the message.
attachments
Array of attachments in JSON format. Array syntax: [["name", "link"], ["name", "link"], ...]. Replace name with the name of the attachment and link with the full URL of the attachment.
conversation_status
The status code of the conversation. Status codes: live = 0, waiting answer from user = 1, waiting answer from agent = 2, archive = 3, trash = 4.
payload
Array in JSON format of additional information. You can insert any value. Array syntax: { "key": value, "key": value, ... }.
queue
Set it to true if the queue is active in Settings > Miscellaneous > Queue. Default: false.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "status": "success",
                                        "message-id": 123456,
                                        "queue": false
                                    }
                                }
                            

Other possible responses: invalid-status-code, MySQL error message.


send-bot-message

Send a message to Dialogflow and add the Dialogflow response to an existing conversation as a new message. The Dialogflow App is required and Dialogflow must be active in the settings area.


Arguments

token
Your admin secret token.
function
Insert send-bot-message.
conversation_id
The ID of the conversation.
message
The string containing the text of the message.
token
The Dialogflow access token. For performance reasons always include this token. You will get the token after the first call of this method, from the response.
language
The language of the bot. Default: the main bot language.
attachments
Array of attachments in JSON format. Array syntax: [["name", "link"], ["name", "link"], ...]. Replace name with the name of the attachment and link with the full URL of the attachment. Dialogflow can read this array.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "token": "ya29.a0AfH6SMB5Y04TwKvxeah5pCEtcupfncTOLMlewxlnUAhH5H4HE4SVIeOPWSfxRVfHNcJIoR-IvRTtrEe4P9VXHa",
                                        "messages": [
                                            {
                                                "message": "Hi! How are you doing?",
                                                "attachments": []
                                            }
                                        ],
                                        "response": {
                                            "responseId": "1a5e30d0-d6d4-4f0c-83e3-2fb9e31c2a5e-e15c53b8",
                                            "queryResult": {
                                                "queryText": "Hello",
                                                "action": "input.welcome",
                                                "parameters": [],
                                                "allRequiredParamsPresent": true,
                                                "fulfillmentText": "Hi! How are you doing?",
                                                "fulfillmentMessages": [
                                                    {
                                                        "platform": "ACTIONS_ON_GOOGLE",
                                                        "simpleResponses": {"simpleResponses": [ { "textToSpeech": "Example"} ]}
                                                    },
                                                    {
                                                        "text": { "text": [ "Hi! How are you doing?" ]  }
                                                    }
                                                ],
                                                "intent": {
                                                    "name": "projects/api-project-655517752147/agent/intents/fe275c2e-f39d-4db3-92c2-e55582ce38fb",
                                                    "displayName": "Default Welcome Intent"
                                                },
                                                "intentDetectionConfidence": 1,
                                                "languageCode": "en"
                                            },
                                            "alternativeQueryResults": [
                                                {
                                                    "queryText": "Hello",
                                                    "languageCode": "en"
                                                }
                                            ]
                                        }
                                    }
                                }
                            

Other possible responses: dialogflow-not-active, MySQL, or cURL error message.


send-slack-message

Send a message to Slack. The Slack App is required and Slack must be active in the settings area.


Arguments

token
Your admin secret token.
function
Insert send-slack-message.
user_id
The ID of the user linked to the message.
full_name
The name of the sender, it will appear in Slack on the left of the message. It should be an agent's name if the message is from an agent, otherwise the user's name.
profile_image
The profile image of the sender, it will appear in Slack on the left of the message. It should be an agent's profile image if the message is from an agent, otherwise the user's profile image. Supported formats: PNG and JPG. Default:
message
The content of the message.
attachments
Array of attachments in JSON format. Array syntax: [["name", "link"], ["name", "link"], ...]. Replace name with the name of the attachment and link with the full URL of the attachment.
channel
The Slack channel linked to the message. For performance reasons always include the channel. You will get the channel after the first call of this method, from the response (example: C011JFFGSKY).

Response

                                {"success":true,"response":["C011JFFGSKY"]}
                            

Other possible responses: slack-not-active, MySQL or cURL error message.


update-message

Update an existing message.


Arguments

token
Your admin secret token.
function
Insert update-message.
user_id
The ID of the user of the conversation linked to the message.
message_id
The ID of the message.
message
The content of the message.
attachments
Array of attachments in JSON format. Array syntax: [["name", "link"], ["name", "link"], ...]. Replace name with the name of the attachment and link with the full URL of the attachment.
payload
Array in JSON format of additional information. You can insert any value. Array syntax: { "key": value, "key": value, ... }.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

delete-message

Delete an existing message.


Arguments

token
Your admin secret token.
function
Insert delete-message.
user_id
The ID of the user of the conversation linked to the message.
message_id
The ID of the message to delete.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

WEB API

More methods

Various methods that perform different actions.


send-email

Send an email to an existing user using the email templates of the Settings > Notifications area.


Arguments

token
Your admin secret token.
function
Insert send-email.
recipient_id
The ID of the user to which send the email.
message
The message of the email.
attachments
Array of attachments in JSON format. Array syntax: [["name", "link"], ["name", "link"], ...]. Replace name with the name of the attachment and link with the full URL of the attachment. Default: [];
sender_id
The ID of the sender user. Default: the active user ID.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

Other possible responses: missing-user-id-or-message, security-error, user-email-not-found, user-or-sender-not-found.


push-notification

Send a Push notification to an agent, a group of agents, or all agents. Push notifications must be enabled in the settings area.


Arguments

title
The title of the notification.
message
The message text.
icon
The icon of the notification. Default: Support Board icon or notifications icon.
interest
Insert the ID of the agent, an array of agents IDs (ex. [1, 2, 3]), or the string agents to send the notification to all agents.
conversation_id
The ID of the conversation to open when the user clicks the notification.

Response

                                {
                                    "publishId": "pubid-781799f5-6el4-4789-bc60-ee293543781"
                                }
                            

Return false it the Push notifications are disabled in the settings area.


get-setting

Return a setting saved in the Settings area.


Arguments

token
Your admin secret token.
function
Insert get-setting.
setting
The setting ID. You can get the IDs of all the settings from the file resources\json\settings.json.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "option": "value",
                                        "option": "value",
                                        ...
                                    }
                                }
                            

get-settings

Return an array with all the settings.


Arguments

token
Your admin secret token.
function
Insert get-settings.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "chat-manual-init": [
                                            false,
                                            "checkbox"
                                        ],
                                        "chat-login-init": [
                                            false,
                                            "checkbox"
                                        ],
                                        "init-dashboard": [
                                            true,
                                            "checkbox"
                                        ],
                                        "chat-timetable-disable": [
                                            false,
                                            "checkbox"
                                        ],
                                        "rtl": [
                                            false,
                                            "checkbox"
                                        ],
                                        "front-auto-translations": [
                                            true,
                                            "checkbox"
                                        ],
                                        ...
                                    }
                                }
                            

saved-replies

Return an array with all the saved replies.


Arguments

token
Your admin secret token.
function
Insert saved-replies.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "reply-name": "hello",
                                            "reply-text": "Hello! How can I help?"
                                        },
                                        {
                                            "reply-name": "email",
                                            "reply-text": "Our email is support@example.com."
                                        },
                                        ...
                                    ]
                                }
                            

archive-slack-channels

Archive all the Slack channels. If you have a lot of channels, this operation may take a long time to complete and you could need to execute it again multiple times. Important: All of your slack channels will be archived. The Slack App is required.


Arguments

token
Your admin secret token.
function
Insert archive-slack-channels.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

get-articles

Return an array with all the articles or a single article.


Arguments

token
Your admin secret token.
function
Insert get-articles.
id
The ID of the article. The get the articles IDs, execute this method again without arguments. Default: -1.
count
The maximum number of returned articles. Default: all.
full
Boolean. Set it to true to get full length articles contents. Default: false.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "6P2Oq",
                                            "title": "What's new with Dialogflow API V2?p",
                                            "content": "Dialogflow API V2 is the new iteration of o ...",
                                            "link": "https://dialogflow.com/v2-faq"
                                        },
                                        {
                                            "title": "Should I move to the new API?",
                                            "content": "Yes. The newest version (V2) of the Actions ...",
                                            "link": "https://dialogflow.com/v2-faq",
                                            "id": "qf7kD"
                                        },
                                        ...
                                    ]
                                }
                            
                                {
                                    "success": true,
                                    "response": {
                                        "id": "6P2Oq",
                                        "title": "What's new with Dialogflow API V2?p",
                                        "content": "Dialogflow API V2 is the new iteration of our developer API. The new API integrates...",
                                        "link": "https://dialogflow.com/v2-faq"
                                    }
                                }
                            

save-articles

Save all the articles. This function deletes all the existing articles and replace them with the ones of the given array.


Arguments

token
Your admin secret token.
function
Insert save-articles.
articles
The array with the articles. Use the API get-articles to get the articles array. Example: {"articles": [{"id":"6P2Oq","title":"What's new with Dialogflow API V2?","content":"Dialogflow API V2 is the new iteration of our developer API. The new API integrates Google Cloud Spe","link":"https://dialogflow.com"},{"title":"Which API version am I currently using?","content":"The Dialogflow API version is configured separately for each agent. To see which API version click the link.","link":"","id":"IDkft"}, ...]}.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

search-articles

Return the articles matching the search.


Arguments

token
Your admin secret token.
function
Insert search-articles.
search
The string to search. The search function supports title and content.

Response

                                {
                                    "success": true,
                                    "response": [
                                        {
                                            "id": "6P2Oq",
                                            "title": "What's new with Dialogflow API V2?p",
                                            "content": "Dialogflow API V2 is the new iteration of o ...",
                                            "link": "https://dialogflow.com/v2-faq"
                                        },
                                        {
                                            "title": "Should I move to the new API?",
                                            "content": "Yes. The newest version (V2) of the Actions ...",
                                            "link": "https://dialogflow.com/v2-faq",
                                            "id": "qf7kD"
                                        },
                                        ...
                                    ]
                                }
                            

Return {"success":true, "response":[]} if no articles are found.


get-versions

Return the installed versions of Support Board and the Apps.


Arguments

token
Your admin secret token.
function
Insert get-versions.

Response

                                {
                                    "success": true,
                                    "response": {
                                        "sb": "3.0.4",
                                        "dialogflow": "1.0.2",
                                        "slack": "1.0.3"
                                    }
                                }
                            

update

Start the update of Support Board and all the apps. This method forces the update and always overwrite all plugin and apps files.


Arguments

token
Your admin secret token.
function
Insert update.

Response

                                {
                                    "success": true,
                                    "response": "success"
                                }
                            

wp-synch

Start the synchronization of the WordPress users and import the new WordPress users into Support Board. This method is available only in the WordPress version.


Arguments

token
Your admin secret token.
function
Insert wp-synch .

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

app-get-key

Return the License Key of a Support Board App like the Slack App or the Dialogflow App.


Arguments

token
Your admin secret token.
function
Insert app-get-key .
app_name
Insert one of the following values: slack , dialogflow .

Response

                                {
                                    "success": true,
                                    "response": "9300AB16-014ZEE12-91E199EA-997CEX40"
                                }
                            

app-activation

Activate an app, download it, and install it.


Arguments

token
Your admin secret token.
function
Insert app-activation .
app_name
Insert one of the following values: slack , dialogflow .
key
The License Key of the App. You can get the key with the function app-get-key.

Response

                                {
                                    "success": true,
                                    "response": "success"
                                }
                            

csv-users

Export all the users in a CSV file and return the URL.


Arguments

token
Your admin secret token.
function
Insert csv-users .

Response

                                {
                                    "success": true,
                                    "response": "https://board.support/uploads/users.csv"
                                }
                            

csv-conversations

Export a conversation in a CSV file and return the URL.


Arguments

token
Your admin secret token.
function
Insert csv-conversations .
conversation_id
The ID of the conversation to export.

Response

                                {
                                    "success": true,
                                    "response": "https://board.support/uploads/conversation-1021.csv"
                                }
                            

Return {"success":true, "response":false} if the conversation is not found.


dialogflow-intent

Create a new intent in Dialogflow. Will be used the bot synchronized in the admin area. The Dialogflow App is required.


Arguments

token
Your admin secret token.
function
Insert dialogflow-intent .
expressions
Array with the training phrases. Array syntax: ["", "", ...].
response
String containing the response of the bot when the user input matches a user expression.
agent_language
The language code of the intent. Default: the main bot language. For the languages codes list visit cloud.google.com/dialogflow/docs/reference/language.

Response

                                {
                                    "success": true,
                                    "response": true
                                }
                            

is-agent-typing

Check if an agent is typing a message in a conversation, and return the agent details.


Arguments

token
Your admin secret token.
function
Insert is-agent-typing
conversation_id
The ID of conversation to check.

Response

                                {
                                  "id": "",
                                  "first_name": "",
                                  "last_name": ""
                                }
                            

Return false if no agents are typing.


WEB API

Webhooks

Webhooks are automated messages sent from Support Board to a URL when something happens. They contain custom data and are sent to a unique URL defined by you.

Usage

  • Login to the administration area and go to Settings > Miscellaneous > Webhooks.
  • Insert the destination URL. Support Board will send the data to this URL. This URL should point to a PHP file that can read the data received, you can use the code $response = json_decode(file_get_contents('php://input'), true); to get the data, the $response variable will be an array.
  • Insert in the Secret Key field a secret password of your choice. This key will be included in all the Webhooks, you can use it to validate the Webhook and make sure it is sent by Support Board and not from someone else.
  • Activate the Webhooks and save. Support Board will now start sending the Webhooks of the list below to your URL.

message-sent

Webhook sent when a new message is sent by a user or an agent.


Response

                                {
                                    "function": "message-sent",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "user_id": "947",
                                        "conversation_id": "1057",
                                        "conversation_status": "-1",
                                        "message_id": "2574",
                                        "message": "Hello! How are you?"
                                    }
                                }
                            

new-message

Webhook sent when a new message is received.


Response

                                {
                                    "function": "new-message",
                                    "key": "xxxxxxxx",
                                    "data": [
                                        {
                                            "details": {
                                                "id": "2575",
                                                "user_id": "947",
                                                "message": "Hello! How are you?",
                                                "creation_time": "2020-05-27 08:26:59",
                                                "attachments": "",
                                                "status_code": "0",
                                                "conversation_id": "1057",
                                                "first_name": "Don",
                                                "last_name": "John",
                                                "profile_image": "https://board.support/user.svg",
                                                "user_type": "user",
                                                "full_name": "Don John"
                                            }
                                        }
                                    ]
                                }
                            

bot-message

Webhook sent when the Dialogflow send a reply to a user message.


Response

                                {
                                    "function": "bot-message",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "response": {
                                            "token": "ya29.a0Afkjh8MADFYeT4BgCy3917xqSDdVvw4mgVHrgrLDcgRk9ajWoQAgdjv5e...",
                                            "messages": [
                                                {
                                                    "message": "Hi! How are you doing?"
                                                }
                                            ],
                                            "response": {
                                                "responseId": "46d2c208-2a7f-4ca2-bd7d-6636982b8bee-0f0e27e1",
                                                "queryResult": {
                                                    "queryText": "hi",
                                                    "action": "input.welcome",
                                                    "allRequiredParamsPresent": "true",
                                                    "fulfillmentText": "Hi! How are you doing?",
                                                    "fulfillmentMessages": [
                                                        {
                                                            "text": {
                                                                "text": [
                                                                    "Hi! How are you doing?"
                                                                ]
                                                            }
                                                        }
                                                    ],
                                                    "outputContexts": [
                                                        {
                                                            "name": "projects/api-project-655517752147/agent/sessions...",
                                                            "lifespanCount": "1",
                                                            "parameters": {
                                                                "no-input": "0",
                                                                "no-match": "0"
                                                            }
                                                        }
                                                    ],
                                                    "intent": {
                                                        "name": "projects/api-project-655517752147/agent/intents...",
                                                        "displayName": "Default Welcome Intent"
                                                    },
                                                    "intentDetectionConfidence": "1",
                                                    "languageCode": "en"
                                                },
                                                "alternativeQueryResults": [
                                                    {
                                                        "queryText": "hi",
                                                        "outputContexts": [
                                                            {
                                                                "name": "projects/api-project-655517752147/agent...",
                                                                "parameters": {
                                                                    "no-match": "1",
                                                                    "no-input": "0"
                                                                }
                                                            }
                                                        ],
                                                        "languageCode": "en"
                                                    }
                                                ]
                                            }
                                        },
                                        "message": "Hello"
                                    }
                                }
                            

slack-message-sent

Webhook sent when a message is sent to Slack.


Response

                                {
                                    "function": "slack-message-sent",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "message": "Hi! How are you doing?",
                                        "conversation_id": "1057",
                                        "slack_channel": "C028BGU6TTT"
                                    }
                                }
                            

message-deleted

Webhook sent when a message is deleted.


Response

                                {
                                    "function": "message-deleted",
                                    "key": "xxxxxxxx",
                                    "data": "2595"
                                }
                            

The data key contains the ID of the deleted message.


rich-message

Webhook sent when the user submits the values inserted in a Rich Message. All the Rich Messages that require the submitting of data fire this Webhook, some of them are the follow-up email form, the registration form, the buttons.


Response

                                {
                                    "function": "rich-message",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "result": "true",
                                        "data": {
                                            "NvULJ": { ... }
                                        }
                                    }
                                }
                            

The data > data key contains the array with the Rich Messages. The key of each Rich Message is the Rich Message ID.


new-conversation

Webhook sent when a new conversation is received.


Response

                                {
                                    "function": "new-conversation-created",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "details": {
                                            "user_id": "947",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "user",
                                            "id": "1057",
                                            "title": "",
                                            "conversation_time": "2020-05-27 08:19:18",
                                            "conversation_status_code": "2",
                                            "department": "",
                                            "agent_id": ""
                                        }
                                    }
                                }
                            

new-conversation-created

Webhook sent when a user starts a new conversation.


Response

                                {
                                    "function": "new-conversation-created",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "details": {
                                            "user_id": "947",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "profile_image": "https://board.support/user.svg",
                                            "user_type": "user",
                                            "id": "1057",
                                            "title": "",
                                            "conversation_time": "2020-05-27 08:19:18",
                                            "conversation_status_code": "2",
                                            "department": "",
                                            "agent_id": ""
                                        }
                                    }
                                }
                            

conversation-status-updated

Webhook sent when the status code of a conversation changes.


Response

                                {
                                    "function": "conversation-status-updated",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "conversation_id": "1057",
                                        "status_code": "0"
                                    }
                                }
                            

Status codes: live = 0, waiting answer from user = 1, waiting answer from agent = 2, archive = 3, trash = 4.


login

Webhook sent when a user login successfully from the login form of the chat. This Webhook is sent only if the login is successful.


Response

                                {
                                    "function": "login",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "details": {
                                            "id": "948",
                                            "profile_image": "https://board.support/user.svg",
                                            "first_name": "Don",
                                            "last_name": "John",
                                            "email": "email@example.com",
                                            "user_type": "user",
                                            "token": "9a4642dd232291ad658646bdbb8792c2392bb852"
                                        }
                                    }
                                }
                            

registration

Webhook sent when a user registers successfully from the registration form of the chat. This Webhook is sent only if the registration is successful. This Webhook is sent also if the registration is updated via the registration form of a Rich Message.


Response

                                {
                                    "function": "registration",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "user": {
                                            "profile_image": [
                                                "https://board.support/user.svg",
                                                "Profile image"
                                            ],
                                            "first_name": [
                                                "Don",
                                                "First name"
                                            ],
                                            "last_name": [
                                                "John",
                                                "Last name"
                                            ],
                                            "email": [
                                                "example@email.com",
                                                "Email"
                                            ],
                                            "password": [
                                                "12345678",
                                                "Password"
                                            ],
                                            "password-check": [
                                                "12345678",
                                                "Repeat password"
                                            ],
                                            "user_type": [
                                                "user",
                                                ""
                                            ]
                                        },
                                        "extra": {
                                            "phone": [
                                                "+02123456789",
                                                "Phone"
                                            ],
                                            "city": [
                                                "London",
                                                "City"
                                            ],
                                            ...
                                        }
                                    }
                                }
                            

user-deleted

Webhook sent when a user is deleted.


Response

                                {
                                    "function": "user-deleted",
                                    "key": "xxxxxxxx",
                                    "data": "951"
                                }
                            

The data key contains the ID of the deleted user.


email-sent

Webhook sent when a notification email is sent to a user or to an agent.


Response

                                {
                                    "function": "email-sent",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "recipient_id": "957",
                                        "message": "Hello! How can I help you?"
                                    }
                                }
                            

new-email-address

Webhook sent when a user register his email via the follow-up message or registration form.


Response

                                {
                                    "function": "new-email-address",
                                    "key": "xxxxxxxx",
                                    "data": {
                                        "name": "John Doe",
                                        "email": "example@email.com"
                                    }
                                }