API DOCUMENTATION

Assistant - Get Assistant

GET https://api.sensibot.io/assistant
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

data Array

Array of data

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/assistant',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'{
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Assistant - Bot Type

POST https://api.sensibot.io/assistant/bot_type
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
assistant_id String

id of assistant bot (you will get it in get assistant api)

bottype Number

Bot Type

Allowed values:

3 for "AI Bot",

5 for "Keyword Bot (Without AI)"

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
500 = Something went wrong

message String

Response message

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/assistant/bot_type',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "assistant_id":"+XXXXXXXXXX",
    "bottype":"5"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Assistant - Welcome Message

POST https://api.sensibot.io/assistant/welcome_message
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
assistant_id number

id of assistant

welcome_message String

Welcome message to upadte

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/assistant/welcome_message',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "assistant_id":"x",
    "welcome_message":"welcome message"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Human Takeover

POST https://api.sensibot.io/assistant/human_takeover
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
recipient String

Recipient mobile number for human mode
Example for Philippines
+639184661533

human_takeover String

Allowed Value:

"on", "off"

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/assistant/human_takeover',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "recipient":"+xxxxxxxxx",
    "human_takeover":"on"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Chat History

POST https://api.sensibot.io/assistant/chathistory
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
recipient String

Recipient mobile number for chat history
Example for Philippines
+639184661533

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

data Array

Array of data

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/assistant/chathistory',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "recipient":"+XXXXXXXXXX"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Whatsapp Cloud - Send Message

POST https://api.sensibot.io/whatsappcloud/send
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
cloud_wa_number String

whatsapp number you want to use for sending including country code
ex: +16478480508

recipient String

Recipient mobile number with country code and + sign
Example for Philippines: +639184661533

type String

Type of WhatsApp message.

Allowed values: "text", "image", "audio", "audio", "video", "document"

message (optional) String

Required when type is text. Message or caption you want to send

media_link (optional) String

Required when type is audio, document, image or video

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

data Array

Array of data

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappcloud/send',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "cloud_wa_number":"+XXXXXXXXXX",
    "type":"text",
    "recipient":"+XXXXXXXXXX",
    "message":"hi,this is text message"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Whatsapp Cloud Template - Send Message

POST https://api.sensibot.io/whatsappcloud/send_template
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
cloud_wa_number String

whatsapp number you want to use for sending including country code
ex: +16478480508

recipient String

Recipient mobile number with country code and + sign
Example for Philippines: +639184661533

template_name String

your template name.

template_language String

language of template ex: en_us, en

variable_1 (optional) String

value of variable 1 , if used in template

variable_2 (optional) String

value of variable 2 , if used in template

variable_3 (optional) String

value of variable 3 , if used in template

variable_4 (optional) String

value of variable 4 , if used in template

variable_5 (optional) String

value of variable 5 , if used in template

variable_6 (optional) String

value of variable 6 , if used in template

variable_7 (optional) String

value of variable 7 , if used in template

variable_8 (optional) String

value of variable 8 , if used in template

variable_9 (optional) String

value of variable 9 , if used in template

variable_10 (optional) String

value of variable 10 , if used in template

button_1(optional) String

Required if using button in template

button_1_type(optional) String

Required if using button_1 ex: quick_reply, url

button_2(optional) String

Required if using button in template

button_2_type(optional) String

Required if using button_2 ex: quick_reply, url

button_3(optional) String

Required if using button in template

button_3_type(optional) String

Required if using button_3 ex: quick_reply, url

schedule_datetime (optional) String

to schedule call. format "YYYY-mm-dd H:i:s"

Ex: "2024-12-31 13:00:00"

timezone (optional) String

for india: "Asia/Kolkata"

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

data Array

Array of data

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappcloud/send',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "cloud_wa_number":"+XXXXXXXXXX",
    "type":"text",
    "recipient":"+XXXXXXXXXX",
    "template_name":""
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Whatsapp - Bot Status

POST https://api.sensibot.io/whatsappbeta/bot_status
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
wa_number String

whatsapp number including country code
ex: +16478480508

botstatus String

Bot Status

Allowed values: "enable", "disable"

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappbeta/bot_status',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "wa_number":"+XXXXXXXXXX",
    "botstatus":"enable"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Whatsapp Cloud - Bot Status

POST https://api.sensibot.io/whatsappcloud/bot_status
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
cloud_wa_number String

Your whatsapp cloud number including country code
ex: +16478480508

botstatus String

Bot Status

Allowed values: "enable", "disable"

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappcloud/bot_status',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "cloud_wa_number":"+XXXXXXXXXX",
    "botstatus":"enable"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Customer List

GET https://api.sensibot.io/whatsappcloud/customerlist
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

list Array

Array of list

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappcloud/customerlist',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Create Customer List

POST https://api.sensibot.io/whatsappcloud/create_customerlist
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
listname String

Name of list

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

Message string

Response message

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied/Customer list already created
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappcloud/create_customerlist',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "listname":"list"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Whatsapp beta - Send Chat

POST https://api.sensibot.io/whatsappbeta/send
Headers
[ 'Content-Type: application/json', 'Authorization: Bearer {YOUR_API_TOKEN} >' ]
Parameter
Field Type Description
wa_number String

whatsapp number you want to use for sending including country code
ex: +16478480508

recipient String

Recipient mobile number with country code and + sign
Example for Philippines: +639184661533

is_group Bool

if recipient is group value should be true otherwise false

type String

Type of WhatsApp message.

Allowed values: "text", "media", "document"

message String

Message or caption you want to send

media_url (optional) String

This is for "media" type message only. The media file url, please use direct link to the media file. It will be downloaded and be attached in the WhatsApp message, it also supports jpg, png, gif, mp4, mp3, and ogg files.

media_type (optional) String

This is for "media" type message only. You only need to enter this parameter if you are using "media_url". You need to declare the file type of the media in the url you provided.

Allowed values: "image", "audio", "video"

document_url (optional) String

This is for "document" type message only. The document file url, please use direct link to the document file. It will be downloaded and be attached in the WhatsApp message, it also supports pdf, xls, xlsx, doc, and docx files.

document_type (optional) String

This is for "document" type message only. You only need to enter this parameter if you are using "document_url" . You need to declare the file type of the document in the url you provided.

Allowed values: "pdf", "xls", "xlsx", "doc", "docx"

schedule_datetime (optional) String

to schedule call. format "YYYY-mm-dd H:i:s"

Ex: "2024-12-31 13:00:00"

timezone (optional) String

for india: "Asia/Kolkata"

Success Response Format

Field Type Description
status Number

List of Codes
200 = Success

message String

Response message

data Array

Array of data

Error Response Format

Name Type Description
status Number

List of Codes
400 = Invalid parameters
405 = Access Denied
404 = WhatsApp account doesn't exist
500 = Something went wrong

message String

Response message

data Array

Array of data

PHP Example


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sensibot.io/whatsappbeta/send',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "wa_number":"+XXXXXXXXXX",
    "type":"text",
    "is_group":false,
    "recipient":"+XXXXXXXXXX",
    "message":"hi,this is text message"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {YOUR_API_TOKEN}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;