Create a client


Warning. If you use the server version of Usedesk, you will have a different URL of methods. Check the URL for the API with our team —

The method allows you to create a new client.

Parameter Value
api_token* Channel API token
name New customer name
emails Array with emails

Array with messengers data

Contains parameters:

  • identity — nickname, phone number, other identifiers that are displayed in the client card (required).
    String, 64 characters
  • type — messenger type (required)
    Accepts values:
    • telegram,
    • whatsapp,
    • viber,
    • skype,
    • gtalk,
    • imessage,
    • other
  • uid — id of the user in the messenger (optional)
note Note text
phone Client phone

10 to 15 characters, numbers only

Array with client sites

Contains parameters:

  • url — link to customer site (required)

Image file



Client status

Possible values:

  • vip;
  • spammer
position Customer position
merge_id Identifier of the client with which the user with the client_id identifier will be merged
client_country Client country
client_city The client's city
client_address Customer address
new_address Additional address

Phone type when saving

Possible values:

  • home;
  • mobile;
  • stationary;
  • fax;
  • other

PHP request example

$data = array(
    'api_token'=> 'e1cbe1c1c9d910ef2ae975215644cb53dd555de4',
    'name' =>'Jon',
$mch_api = curl_init();
curl_setopt($mch_api, CURLOPT_URL, '');
curl_setopt($mch_api, CURLOPT_RETURNTRANSFER, true);
curl_setopt($mch_api, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($mch_api, CURLOPT_TIMEOUT, 10);
curl_setopt($mch_api, CURLOPT_POST, true);
curl_setopt($mch_api, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($mch_api, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($mch_api);
return $result;

Server response example
    "client_id": 1234,
    "status": true

Server response parameters

Parameter Description
client_id Client ID
status Request execution status