Update Profile
Update profile.
curl --request PATCH \
--url https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"name": "John Doe",
"blocked": true,
"date_of_birth": "1970-01-01",
"phone_number": "+4915224367929",
"email": "jsmith@example.com",
"address": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"custom_4": "<string>",
"custom_5": "<string>",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
'import requests
url = "https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}"
payload = {
"id": 123,
"name": "John Doe",
"blocked": True,
"date_of_birth": "1970-01-01",
"phone_number": "+4915224367929",
"email": "jsmith@example.com",
"address": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"custom_4": "<string>",
"custom_5": "<string>",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
name: 'John Doe',
blocked: true,
date_of_birth: '1970-01-01',
phone_number: '+4915224367929',
email: 'jsmith@example.com',
address: '<string>',
custom_1: '<string>',
custom_2: '<string>',
custom_3: '<string>',
custom_4: '<string>',
custom_5: '<string>',
created_at: '2023-01-01T12:00:00Z',
updated_at: '2023-01-01T12:00:00Z'
})
};
fetch('https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}', 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://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}",
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([
'id' => 123,
'name' => 'John Doe',
'blocked' => true,
'date_of_birth' => '1970-01-01',
'phone_number' => '+4915224367929',
'email' => 'jsmith@example.com',
'address' => '<string>',
'custom_1' => '<string>',
'custom_2' => '<string>',
'custom_3' => '<string>',
'custom_4' => '<string>',
'custom_5' => '<string>',
'created_at' => '2023-01-01T12:00:00Z',
'updated_at' => '2023-01-01T12:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}"
payload := strings.NewReader("{\n \"id\": 123,\n \"name\": \"John Doe\",\n \"blocked\": true,\n \"date_of_birth\": \"1970-01-01\",\n \"phone_number\": \"+4915224367929\",\n \"email\": \"jsmith@example.com\",\n \"address\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\",\n \"custom_4\": \"<string>\",\n \"custom_5\": \"<string>\",\n \"created_at\": \"2023-01-01T12:00:00Z\",\n \"updated_at\": \"2023-01-01T12:00:00Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"name\": \"John Doe\",\n \"blocked\": true,\n \"date_of_birth\": \"1970-01-01\",\n \"phone_number\": \"+4915224367929\",\n \"email\": \"jsmith@example.com\",\n \"address\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\",\n \"custom_4\": \"<string>\",\n \"custom_5\": \"<string>\",\n \"created_at\": \"2023-01-01T12:00:00Z\",\n \"updated_at\": \"2023-01-01T12:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"name\": \"John Doe\",\n \"blocked\": true,\n \"date_of_birth\": \"1970-01-01\",\n \"phone_number\": \"+4915224367929\",\n \"email\": \"jsmith@example.com\",\n \"address\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\",\n \"custom_4\": \"<string>\",\n \"custom_5\": \"<string>\",\n \"created_at\": \"2023-01-01T12:00:00Z\",\n \"updated_at\": \"2023-01-01T12:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "John Doe",
"blocked": true,
"date_of_birth": "1970-01-01",
"phone_number": "+4915224367929",
"email": "jsmith@example.com",
"address": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"custom_4": "<string>",
"custom_5": "<string>",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Profile data of a customer. A profile can have many customers. A customer belongs to one profile. Can be used to connect a real person with multiple messengers (aka customers) to one profile.
formal_male, formal_female, informal "John Doe"
undisclosed, male, female, diverse If a profile is blocked, receiving messages will be disabled.
"1970-01-01"
Phone number in international format.
"+4915224367929"
One of five custom fields. Names of custom fields can be configured via settings.
Datetime when profile was created.
"2023-01-01T12:00:00Z"
Datetime when profile was last updated.
"2023-01-01T12:00:00Z"
Response
Success
Profile data of a customer. A profile can have many customers. A customer belongs to one profile. Can be used to connect a real person with multiple messengers (aka customers) to one profile.
Show child attributes
Show child attributes
curl --request PATCH \
--url https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"name": "John Doe",
"blocked": true,
"date_of_birth": "1970-01-01",
"phone_number": "+4915224367929",
"email": "jsmith@example.com",
"address": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"custom_4": "<string>",
"custom_5": "<string>",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
'import requests
url = "https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}"
payload = {
"id": 123,
"name": "John Doe",
"blocked": True,
"date_of_birth": "1970-01-01",
"phone_number": "+4915224367929",
"email": "jsmith@example.com",
"address": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"custom_4": "<string>",
"custom_5": "<string>",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
name: 'John Doe',
blocked: true,
date_of_birth: '1970-01-01',
phone_number: '+4915224367929',
email: 'jsmith@example.com',
address: '<string>',
custom_1: '<string>',
custom_2: '<string>',
custom_3: '<string>',
custom_4: '<string>',
custom_5: '<string>',
created_at: '2023-01-01T12:00:00Z',
updated_at: '2023-01-01T12:00:00Z'
})
};
fetch('https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}', 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://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}",
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([
'id' => 123,
'name' => 'John Doe',
'blocked' => true,
'date_of_birth' => '1970-01-01',
'phone_number' => '+4915224367929',
'email' => 'jsmith@example.com',
'address' => '<string>',
'custom_1' => '<string>',
'custom_2' => '<string>',
'custom_3' => '<string>',
'custom_4' => '<string>',
'custom_5' => '<string>',
'created_at' => '2023-01-01T12:00:00Z',
'updated_at' => '2023-01-01T12:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}"
payload := strings.NewReader("{\n \"id\": 123,\n \"name\": \"John Doe\",\n \"blocked\": true,\n \"date_of_birth\": \"1970-01-01\",\n \"phone_number\": \"+4915224367929\",\n \"email\": \"jsmith@example.com\",\n \"address\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\",\n \"custom_4\": \"<string>\",\n \"custom_5\": \"<string>\",\n \"created_at\": \"2023-01-01T12:00:00Z\",\n \"updated_at\": \"2023-01-01T12:00:00Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"name\": \"John Doe\",\n \"blocked\": true,\n \"date_of_birth\": \"1970-01-01\",\n \"phone_number\": \"+4915224367929\",\n \"email\": \"jsmith@example.com\",\n \"address\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\",\n \"custom_4\": \"<string>\",\n \"custom_5\": \"<string>\",\n \"created_at\": \"2023-01-01T12:00:00Z\",\n \"updated_at\": \"2023-01-01T12:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"name\": \"John Doe\",\n \"blocked\": true,\n \"date_of_birth\": \"1970-01-01\",\n \"phone_number\": \"+4915224367929\",\n \"email\": \"jsmith@example.com\",\n \"address\": \"<string>\",\n \"custom_1\": \"<string>\",\n \"custom_2\": \"<string>\",\n \"custom_3\": \"<string>\",\n \"custom_4\": \"<string>\",\n \"custom_5\": \"<string>\",\n \"created_at\": \"2023-01-01T12:00:00Z\",\n \"updated_at\": \"2023-01-01T12:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "John Doe",
"blocked": true,
"date_of_birth": "1970-01-01",
"phone_number": "+4915224367929",
"email": "jsmith@example.com",
"address": "<string>",
"custom_1": "<string>",
"custom_2": "<string>",
"custom_3": "<string>",
"custom_4": "<string>",
"custom_5": "<string>",
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
}