curl --request PATCH \
--url https://api.hilos.io/api/contact/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"meta": {},
"external_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "website",
"created_on": "2023-11-07T05:31:56Z",
"tags": [
{
"name": "<string>"
}
],
"default_assignees": [
123
],
"overwrite_tags": false,
"overwrite_default_assignees": false,
"overwrite_meta": false
}
'import requests
url = "https://api.hilos.io/api/contact/{id}"
payload = {
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"meta": {},
"external_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "website",
"created_on": "2023-11-07T05:31:56Z",
"tags": [{ "name": "<string>" }],
"default_assignees": [123],
"overwrite_tags": False,
"overwrite_default_assignees": False,
"overwrite_meta": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '<string>',
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
meta: {},
external_url: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: 'website',
created_on: '2023-11-07T05:31:56Z',
tags: [{name: '<string>'}],
default_assignees: [123],
overwrite_tags: false,
overwrite_default_assignees: false,
overwrite_meta: false
})
};
fetch('https://api.hilos.io/api/contact/{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://api.hilos.io/api/contact/{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([
'phone' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'meta' => [
],
'external_url' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source' => 'website',
'created_on' => '2023-11-07T05:31:56Z',
'tags' => [
[
'name' => '<string>'
]
],
'default_assignees' => [
123
],
'overwrite_tags' => false,
'overwrite_default_assignees' => false,
'overwrite_meta' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.hilos.io/api/contact/{id}"
payload := strings.NewReader("{\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"meta\": {},\n \"external_url\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"website\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"default_assignees\": [\n 123\n ],\n \"overwrite_tags\": false,\n \"overwrite_default_assignees\": false,\n \"overwrite_meta\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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.patch("https://api.hilos.io/api/contact/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"meta\": {},\n \"external_url\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"website\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"default_assignees\": [\n 123\n ],\n \"overwrite_tags\": false,\n \"overwrite_default_assignees\": false,\n \"overwrite_meta\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hilos.io/api/contact/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"meta\": {},\n \"external_url\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"website\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"default_assignees\": [\n 123\n ],\n \"overwrite_tags\": false,\n \"overwrite_default_assignees\": false,\n \"overwrite_meta\": false\n}"
response = http.request(request)
puts response.read_body{
"canonical_phone": "<string>",
"created_by": 123,
"phone": "<string>",
"id": "<string>",
"last_updated_on": "2023-11-07T05:31:56Z",
"source": "<string>",
"tags": [
{
"id": 123,
"name": "<string>"
}
],
"default_assignees": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"account": 123,
"profile_image": "<string>",
"date_joined": "2023-11-07T05:31:56Z"
}
],
"inbox_contacts": [
{
"url": "<string>",
"channel": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"default_conversation_url": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"meta": {},
"external_url": "<string>",
"created_on": "2023-11-07T05:31:56Z"
}Partially update a contact
Update a Contact sending only the properties you want to update.
If you send the meta or tags the contact will have those properties appended with the contact current ones.
curl --request PATCH \
--url https://api.hilos.io/api/contact/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"meta": {},
"external_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "website",
"created_on": "2023-11-07T05:31:56Z",
"tags": [
{
"name": "<string>"
}
],
"default_assignees": [
123
],
"overwrite_tags": false,
"overwrite_default_assignees": false,
"overwrite_meta": false
}
'import requests
url = "https://api.hilos.io/api/contact/{id}"
payload = {
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"meta": {},
"external_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "website",
"created_on": "2023-11-07T05:31:56Z",
"tags": [{ "name": "<string>" }],
"default_assignees": [123],
"overwrite_tags": False,
"overwrite_default_assignees": False,
"overwrite_meta": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '<string>',
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
meta: {},
external_url: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: 'website',
created_on: '2023-11-07T05:31:56Z',
tags: [{name: '<string>'}],
default_assignees: [123],
overwrite_tags: false,
overwrite_default_assignees: false,
overwrite_meta: false
})
};
fetch('https://api.hilos.io/api/contact/{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://api.hilos.io/api/contact/{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([
'phone' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'meta' => [
],
'external_url' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source' => 'website',
'created_on' => '2023-11-07T05:31:56Z',
'tags' => [
[
'name' => '<string>'
]
],
'default_assignees' => [
123
],
'overwrite_tags' => false,
'overwrite_default_assignees' => false,
'overwrite_meta' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.hilos.io/api/contact/{id}"
payload := strings.NewReader("{\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"meta\": {},\n \"external_url\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"website\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"default_assignees\": [\n 123\n ],\n \"overwrite_tags\": false,\n \"overwrite_default_assignees\": false,\n \"overwrite_meta\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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.patch("https://api.hilos.io/api/contact/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"meta\": {},\n \"external_url\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"website\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"default_assignees\": [\n 123\n ],\n \"overwrite_tags\": false,\n \"overwrite_default_assignees\": false,\n \"overwrite_meta\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hilos.io/api/contact/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"meta\": {},\n \"external_url\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": \"website\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ],\n \"default_assignees\": [\n 123\n ],\n \"overwrite_tags\": false,\n \"overwrite_default_assignees\": false,\n \"overwrite_meta\": false\n}"
response = http.request(request)
puts response.read_body{
"canonical_phone": "<string>",
"created_by": 123,
"phone": "<string>",
"id": "<string>",
"last_updated_on": "2023-11-07T05:31:56Z",
"source": "<string>",
"tags": [
{
"id": 123,
"name": "<string>"
}
],
"default_assignees": [
{
"id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"account": 123,
"profile_image": "<string>",
"date_joined": "2023-11-07T05:31:56Z"
}
],
"inbox_contacts": [
{
"url": "<string>",
"channel": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"default_conversation_url": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"meta": {},
"external_url": "<string>",
"created_on": "2023-11-07T05:31:56Z"
}Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
Body
30100100254Show child attributes
Show child attributes
200Show child attributes
Show child attributes
If true, the tags will be overwritten with the new value. If false, the new value will be merged with the existing value. Default is false.
If true, the default_assignees will be overwritten with the new value. If false, the new value will be merged with the existing value. Default is false.
If true, the meta field will be overwritten with the new value. If false, the new value will be merged with the existing value. Default is false.
Response
30User ID of the user who created the contact
Phone number of the contact
UUID representing the contact ID
255Tags associated with the contact
Show child attributes
Show child attributes
ID of the default assignees for the contact
Show child attributes
Show child attributes
URL of the inbox conversation associated with the contact
Show child attributes
Show child attributes
100100254Show child attributes
Show child attributes
200Was this page helpful?

