Update Visitor
curl --request PATCH \
--url https://api.example.com/api/v1/sdk/customers/me \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"external_user_id": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/sdk/customers/me"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"external_user_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
external_user_id: '<string>'
})
};
fetch('https://api.example.com/api/v1/sdk/customers/me', 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.example.com/api/v1/sdk/customers/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'external_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/sdk/customers/me"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.example.com/api/v1/sdk/customers/me")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/sdk/customers/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyVisitors & Calls
Update Visitor
Save the current visitor’s contact details (name, email, phone).
PATCH
/
api
/
v1
/
sdk
/
customers
/
me
Update Visitor
curl --request PATCH \
--url https://api.example.com/api/v1/sdk/customers/me \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"external_user_id": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/sdk/customers/me"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"external_user_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
external_user_id: '<string>'
})
};
fetch('https://api.example.com/api/v1/sdk/customers/me', 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.example.com/api/v1/sdk/customers/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'external_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/sdk/customers/me"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.example.com/api/v1/sdk/customers/me")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/sdk/customers/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyOverview
Updates the current visitor’s profile — typically to capture a name, email, or phone after a conversation has already started (e.g. the widget’s “leave your email” prompt). The visitor is identified by the SDK token, so no ID is needed in the body.Auth: the visitor’s SDK token (
Authorization: Bearer …). Server-to-server callers
can use X-Api-Key + X-Api-Secret and must include external_user_id in the body.Request Headers
| Header | Required | Description |
|---|---|---|
Authorization: Bearer <sdk_token> | Yes (or API key) | The visitor’s SDK token |
Content-Type | Yes | application/json |
Request Body
string
Visitor display name.
string
Visitor email.
string
Visitor phone number.
string
Required only when authenticating with API keys (identifies which visitor to update).
Example Request
curl -X PATCH https://dev.vocantly.com/api/v1/sdk/customers/me \
-H "Authorization: Bearer SDK_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "email": "jane@example.com", "name": "Jane Doe" }'
Response
Success (200)
{
"success": true,
"data": {
"id": "cus_…",
"name": "Jane Doe",
"email": "jane@example.com",
"phone": null
}
}
Embed the widget
The widget can collect and submit contact details for you.