Update user profile
curl --request PUT \
--url https://api.cleartalk.ai/profile/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "John Doe",
"email": "user@example.com",
"phone": "+11234567890",
"phone_number": "+11234567890,+11234567891",
"authentication_status": 1,
"max_calling": 1,
"time_zone": "America/New_York",
"twoAuth": true,
"encrypt": true,
"countryCode": "+1",
"digitCountCountryCode": 1,
"ghl_user": 1
}
'import requests
url = "https://api.cleartalk.ai/profile/update"
payload = {
"name": "John Doe",
"email": "user@example.com",
"phone": "+11234567890",
"phone_number": "+11234567890,+11234567891",
"authentication_status": 1,
"max_calling": 1,
"time_zone": "America/New_York",
"twoAuth": True,
"encrypt": True,
"countryCode": "+1",
"digitCountCountryCode": 1,
"ghl_user": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Doe',
email: 'user@example.com',
phone: '+11234567890',
phone_number: '+11234567890,+11234567891',
authentication_status: 1,
max_calling: 1,
time_zone: 'America/New_York',
twoAuth: true,
encrypt: true,
countryCode: '+1',
digitCountCountryCode: 1,
ghl_user: 1
})
};
fetch('https://api.cleartalk.ai/profile/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleartalk.ai/profile/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'email' => 'user@example.com',
'phone' => '+11234567890',
'phone_number' => '+11234567890,+11234567891',
'authentication_status' => 1,
'max_calling' => 1,
'time_zone' => 'America/New_York',
'twoAuth' => true,
'encrypt' => true,
'countryCode' => '+1',
'digitCountCountryCode' => 1,
'ghl_user' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cleartalk.ai/profile/update"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"user@example.com\",\n \"phone\": \"+11234567890\",\n \"phone_number\": \"+11234567890,+11234567891\",\n \"authentication_status\": 1,\n \"max_calling\": 1,\n \"time_zone\": \"America/New_York\",\n \"twoAuth\": true,\n \"encrypt\": true,\n \"countryCode\": \"+1\",\n \"digitCountCountryCode\": 1,\n \"ghl_user\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.cleartalk.ai/profile/update")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"user@example.com\",\n \"phone\": \"+11234567890\",\n \"phone_number\": \"+11234567890,+11234567891\",\n \"authentication_status\": 1,\n \"max_calling\": 1,\n \"time_zone\": \"America/New_York\",\n \"twoAuth\": true,\n \"encrypt\": true,\n \"countryCode\": \"+1\",\n \"digitCountCountryCode\": 1,\n \"ghl_user\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleartalk.ai/profile/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"user@example.com\",\n \"phone\": \"+11234567890\",\n \"phone_number\": \"+11234567890,+11234567891\",\n \"authentication_status\": 1,\n \"max_calling\": 1,\n \"time_zone\": \"America/New_York\",\n \"twoAuth\": true,\n \"encrypt\": true,\n \"countryCode\": \"+1\",\n \"digitCountCountryCode\": 1,\n \"ghl_user\": 1\n}"
response = http.request(request)
puts response.read_bodyProfile
Update user profile
PUT
/
profile
/
update
Update user profile
curl --request PUT \
--url https://api.cleartalk.ai/profile/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "John Doe",
"email": "user@example.com",
"phone": "+11234567890",
"phone_number": "+11234567890,+11234567891",
"authentication_status": 1,
"max_calling": 1,
"time_zone": "America/New_York",
"twoAuth": true,
"encrypt": true,
"countryCode": "+1",
"digitCountCountryCode": 1,
"ghl_user": 1
}
'import requests
url = "https://api.cleartalk.ai/profile/update"
payload = {
"name": "John Doe",
"email": "user@example.com",
"phone": "+11234567890",
"phone_number": "+11234567890,+11234567891",
"authentication_status": 1,
"max_calling": 1,
"time_zone": "America/New_York",
"twoAuth": True,
"encrypt": True,
"countryCode": "+1",
"digitCountCountryCode": 1,
"ghl_user": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Doe',
email: 'user@example.com',
phone: '+11234567890',
phone_number: '+11234567890,+11234567891',
authentication_status: 1,
max_calling: 1,
time_zone: 'America/New_York',
twoAuth: true,
encrypt: true,
countryCode: '+1',
digitCountCountryCode: 1,
ghl_user: 1
})
};
fetch('https://api.cleartalk.ai/profile/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleartalk.ai/profile/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'email' => 'user@example.com',
'phone' => '+11234567890',
'phone_number' => '+11234567890,+11234567891',
'authentication_status' => 1,
'max_calling' => 1,
'time_zone' => 'America/New_York',
'twoAuth' => true,
'encrypt' => true,
'countryCode' => '+1',
'digitCountCountryCode' => 1,
'ghl_user' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cleartalk.ai/profile/update"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"user@example.com\",\n \"phone\": \"+11234567890\",\n \"phone_number\": \"+11234567890,+11234567891\",\n \"authentication_status\": 1,\n \"max_calling\": 1,\n \"time_zone\": \"America/New_York\",\n \"twoAuth\": true,\n \"encrypt\": true,\n \"countryCode\": \"+1\",\n \"digitCountCountryCode\": 1,\n \"ghl_user\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.cleartalk.ai/profile/update")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"user@example.com\",\n \"phone\": \"+11234567890\",\n \"phone_number\": \"+11234567890,+11234567891\",\n \"authentication_status\": 1,\n \"max_calling\": 1,\n \"time_zone\": \"America/New_York\",\n \"twoAuth\": true,\n \"encrypt\": true,\n \"countryCode\": \"+1\",\n \"digitCountCountryCode\": 1,\n \"ghl_user\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleartalk.ai/profile/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"user@example.com\",\n \"phone\": \"+11234567890\",\n \"phone_number\": \"+11234567890,+11234567891\",\n \"authentication_status\": 1,\n \"max_calling\": 1,\n \"time_zone\": \"America/New_York\",\n \"twoAuth\": true,\n \"encrypt\": true,\n \"countryCode\": \"+1\",\n \"digitCountCountryCode\": 1,\n \"ghl_user\": 1\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
API Key for authentication
Body
application/json
User name
Example:
"John Doe"
User email
Example:
"user@example.com"
Personal Phone number
Example:
"+11234567890"
Phone number Excluded
Example:
"+11234567890,+11234567891"
Authentication status (1 for true, 0 for false)
Example:
1
Max calling enabled (1 for true, 0 for false)
Example:
1
Time zone
Example:
"America/New_York"
Two factor authentication enabled
Example:
true
Encrypt role enabled
Example:
true
Country code
Example:
"+1"
Digit count for country code
Example:
1
GHL user authentication status
Example:
1
Response
200
Profile updated successfully
⌘I
