Update a contact
curl --request PATCH \
--url https://api.heffl.com/api/v2/contacts/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"email": "[email protected]",
"phone": "<string>",
"jobTitle": "<string>",
"companyId": "<string>",
"stageId": "<string>",
"leadStageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"tags": [
"<string>"
],
"billingAddress": {
"address": "<string>",
"city": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"latitude": 0,
"longitude": 0,
"googleMapsLink": "<string>",
"googleMapsPlaceId": "<string>"
}
}
'import requests
url = "https://api.heffl.com/api/v2/contacts/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"email": "[email protected]",
"phone": "<string>",
"jobTitle": "<string>",
"companyId": "<string>",
"stageId": "<string>",
"leadStageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"tags": ["<string>"],
"billingAddress": {
"address": "<string>",
"city": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"latitude": 0,
"longitude": 0,
"googleMapsLink": "<string>",
"googleMapsPlaceId": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
salutation: '<string>',
email: '[email protected]',
phone: '<string>',
jobTitle: '<string>',
companyId: '<string>',
stageId: '<string>',
leadStageId: '<string>',
ownerUserId: '<string>',
vendorId: '<string>',
sourceId: '<string>',
tags: ['<string>'],
billingAddress: {
address: '<string>',
city: '<string>',
landmark: '<string>',
state: '<string>',
country: '<string>',
postalCode: '<string>',
latitude: 0,
longitude: 0,
googleMapsLink: '<string>',
googleMapsPlaceId: '<string>'
}
})
};
fetch('https://api.heffl.com/api/v2/contacts/{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.heffl.com/api/v2/contacts/{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([
'firstName' => '<string>',
'lastName' => '<string>',
'salutation' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'jobTitle' => '<string>',
'companyId' => '<string>',
'stageId' => '<string>',
'leadStageId' => '<string>',
'ownerUserId' => '<string>',
'vendorId' => '<string>',
'sourceId' => '<string>',
'tags' => [
'<string>'
],
'billingAddress' => [
'address' => '<string>',
'city' => '<string>',
'landmark' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postalCode' => '<string>',
'latitude' => 0,
'longitude' => 0,
'googleMapsLink' => '<string>',
'googleMapsPlaceId' => '<string>'
]
]),
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.heffl.com/api/v2/contacts/{id}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"leadStageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"billingAddress\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"googleMapsLink\": \"<string>\",\n \"googleMapsPlaceId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.heffl.com/api/v2/contacts/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"leadStageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"billingAddress\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"googleMapsLink\": \"<string>\",\n \"googleMapsPlaceId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v2/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"leadStageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"billingAddress\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"googleMapsLink\": \"<string>\",\n \"googleMapsPlaceId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"number": "<string>",
"firstName": "<string>",
"openingBalance": 123,
"showJobAmountToWorker": true,
"isClientPortalEnabled": true,
"type": "contact",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"salutation": "<string>",
"jobTitle": "<string>",
"description": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"parentClientId": "<string>",
"stageId": "<string>",
"stageName": "<string>",
"leadStageId": "<string>",
"ownerUserId": "<string>",
"crmSourceId": "<string>",
"sourceName": "<string>",
"currency": "<string>",
"internalNotes": "<string>",
"profileImage": "<string>",
"instagram": "<string>",
"facebook": "<string>",
"linkedin": "<string>",
"twitter": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Contacts
Update a contact
Updates an existing contact. Only provided fields will be updated. When tags is provided, it replaces the full set. Custom field values use cf_* keys — see the Custom fields guide.
PATCH
/
contacts
/
{id}
Update a contact
curl --request PATCH \
--url https://api.heffl.com/api/v2/contacts/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"email": "[email protected]",
"phone": "<string>",
"jobTitle": "<string>",
"companyId": "<string>",
"stageId": "<string>",
"leadStageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"tags": [
"<string>"
],
"billingAddress": {
"address": "<string>",
"city": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"latitude": 0,
"longitude": 0,
"googleMapsLink": "<string>",
"googleMapsPlaceId": "<string>"
}
}
'import requests
url = "https://api.heffl.com/api/v2/contacts/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"email": "[email protected]",
"phone": "<string>",
"jobTitle": "<string>",
"companyId": "<string>",
"stageId": "<string>",
"leadStageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"tags": ["<string>"],
"billingAddress": {
"address": "<string>",
"city": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"latitude": 0,
"longitude": 0,
"googleMapsLink": "<string>",
"googleMapsPlaceId": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
salutation: '<string>',
email: '[email protected]',
phone: '<string>',
jobTitle: '<string>',
companyId: '<string>',
stageId: '<string>',
leadStageId: '<string>',
ownerUserId: '<string>',
vendorId: '<string>',
sourceId: '<string>',
tags: ['<string>'],
billingAddress: {
address: '<string>',
city: '<string>',
landmark: '<string>',
state: '<string>',
country: '<string>',
postalCode: '<string>',
latitude: 0,
longitude: 0,
googleMapsLink: '<string>',
googleMapsPlaceId: '<string>'
}
})
};
fetch('https://api.heffl.com/api/v2/contacts/{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.heffl.com/api/v2/contacts/{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([
'firstName' => '<string>',
'lastName' => '<string>',
'salutation' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'jobTitle' => '<string>',
'companyId' => '<string>',
'stageId' => '<string>',
'leadStageId' => '<string>',
'ownerUserId' => '<string>',
'vendorId' => '<string>',
'sourceId' => '<string>',
'tags' => [
'<string>'
],
'billingAddress' => [
'address' => '<string>',
'city' => '<string>',
'landmark' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postalCode' => '<string>',
'latitude' => 0,
'longitude' => 0,
'googleMapsLink' => '<string>',
'googleMapsPlaceId' => '<string>'
]
]),
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.heffl.com/api/v2/contacts/{id}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"leadStageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"billingAddress\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"googleMapsLink\": \"<string>\",\n \"googleMapsPlaceId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.heffl.com/api/v2/contacts/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"leadStageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"billingAddress\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"googleMapsLink\": \"<string>\",\n \"googleMapsPlaceId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v2/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyId\": \"<string>\",\n \"stageId\": \"<string>\",\n \"leadStageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"billingAddress\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"googleMapsLink\": \"<string>\",\n \"googleMapsPlaceId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"number": "<string>",
"firstName": "<string>",
"openingBalance": 123,
"showJobAmountToWorker": true,
"isClientPortalEnabled": true,
"type": "contact",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"salutation": "<string>",
"jobTitle": "<string>",
"description": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"companyId": "<string>",
"companyName": "<string>",
"parentClientId": "<string>",
"stageId": "<string>",
"stageName": "<string>",
"leadStageId": "<string>",
"ownerUserId": "<string>",
"crmSourceId": "<string>",
"sourceName": "<string>",
"currency": "<string>",
"internalNotes": "<string>",
"profileImage": "<string>",
"instagram": "<string>",
"facebook": "<string>",
"linkedin": "<string>",
"twitter": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Body
application/json
Response
OK