Update contact profile
curl --request PATCH \
--url https://api.coldsend.pro/api/public/v1/contacts/{contact_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"company": "<string>",
"custom_fields": {}
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/contacts/{contact_id}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"company": "<string>",
"custom_fields": {}
}
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({
first_name: '<string>',
last_name: '<string>',
company: '<string>',
custom_fields: {}
})
};
fetch('https://api.coldsend.pro/api/public/v1/contacts/{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.coldsend.pro/api/public/v1/contacts/{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([
'first_name' => '<string>',
'last_name' => '<string>',
'company' => '<string>',
'custom_fields' => [
]
]),
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.coldsend.pro/api/public/v1/contacts/{contact_id}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_fields\": {}\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.coldsend.pro/api/public/v1/contacts/{contact_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/contacts/{contact_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 \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"signal": "NEVER_CONTACTED",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"company": "<string>",
"custom_fields": {},
"signal_override": "NEVER_CONTACTED",
"signal_computed_at": "2023-11-07T05:31:56Z",
"source_type": "<string>",
"source_name": "<string>",
"first_batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_touch_at": "2023-11-07T05:31:56Z",
"last_reply_at": "2023-11-07T05:31:56Z",
"last_open_at": "2023-11-07T05:31:56Z",
"campaign_count": 0,
"is_unsubscribed": false,
"is_bounced": false,
"tags": [
{
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"color": "<string>",
"category_group": "<string>",
"is_system": false,
"applied_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"campaign_names": [
"<string>"
],
"campaigns": [
{
"lead_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_name": "<string>",
"status": "<string>",
"sequence_step": 0,
"is_external": false,
"last_contacted_at": "2023-11-07T05:31:56Z",
"opened_at": "2023-11-07T05:31:56Z",
"replied_at": "2023-11-07T05:31:56Z",
"unsubscribed": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"is_suppressed": false,
"suppression_reason": "<string>"
},
"success": true,
"message": "Contact retrieved"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Contacts
Update contact profile
Patch a contact’s profile fields
Only the fields present in the body are changed. custom_fields, when given,
merges key-by-key into the stored object rather than replacing it, matching
the directory merge rule (decision 6). Pass null for a field to clear it.
PATCH
/
api
/
public
/
v1
/
contacts
/
{contact_id}
Update contact profile
curl --request PATCH \
--url https://api.coldsend.pro/api/public/v1/contacts/{contact_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"company": "<string>",
"custom_fields": {}
}
'import requests
url = "https://api.coldsend.pro/api/public/v1/contacts/{contact_id}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"company": "<string>",
"custom_fields": {}
}
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({
first_name: '<string>',
last_name: '<string>',
company: '<string>',
custom_fields: {}
})
};
fetch('https://api.coldsend.pro/api/public/v1/contacts/{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.coldsend.pro/api/public/v1/contacts/{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([
'first_name' => '<string>',
'last_name' => '<string>',
'company' => '<string>',
'custom_fields' => [
]
]),
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.coldsend.pro/api/public/v1/contacts/{contact_id}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_fields\": {}\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.coldsend.pro/api/public/v1/contacts/{contact_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coldsend.pro/api/public/v1/contacts/{contact_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 \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company\": \"<string>\",\n \"custom_fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"contact": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"signal": "NEVER_CONTACTED",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"company": "<string>",
"custom_fields": {},
"signal_override": "NEVER_CONTACTED",
"signal_computed_at": "2023-11-07T05:31:56Z",
"source_type": "<string>",
"source_name": "<string>",
"first_batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_touch_at": "2023-11-07T05:31:56Z",
"last_reply_at": "2023-11-07T05:31:56Z",
"last_open_at": "2023-11-07T05:31:56Z",
"campaign_count": 0,
"is_unsubscribed": false,
"is_bounced": false,
"tags": [
{
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"color": "<string>",
"category_group": "<string>",
"is_system": false,
"applied_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"campaign_names": [
"<string>"
],
"campaigns": [
{
"lead_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaign_name": "<string>",
"status": "<string>",
"sequence_step": 0,
"is_external": false,
"last_contacted_at": "2023-11-07T05:31:56Z",
"opened_at": "2023-11-07T05:31:56Z",
"replied_at": "2023-11-07T05:31:56Z",
"unsubscribed": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"is_suppressed": false,
"suppression_reason": "<string>"
},
"success": true,
"message": "Contact retrieved"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key with format cs_live_xxx
Path Parameters
Body
application/json
Editable profile fields.
Only the fields present in the request body are written, so clearing a
value requires sending it explicitly as null. Editing a contact never
rewrites the matching columns on its leads: those are the send-time
snapshot.
Was this page helpful?

