curl --request PATCH \
--url https://api.1club.ai/v1/platform/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"pipelineStageId": 123,
"pipelineLostNote": "<string>",
"sourceId": 123,
"assignedToId": 123
}
'import requests
url = "https://api.1club.ai/v1/platform/contacts/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"pipelineStageId": 123,
"pipelineLostNote": "<string>",
"sourceId": 123,
"assignedToId": 123
}
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({
firstName: '<string>',
lastName: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
pipelineStageId: 123,
pipelineLostNote: '<string>',
sourceId: 123,
assignedToId: 123
})
};
fetch('https://api.1club.ai/v1/platform/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.1club.ai/v1/platform/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>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'pipelineStageId' => 123,
'pipelineLostNote' => '<string>',
'sourceId' => 123,
'assignedToId' => 123
]),
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://api.1club.ai/v1/platform/contacts/{id}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"pipelineStageId\": 123,\n \"pipelineLostNote\": \"<string>\",\n \"sourceId\": 123,\n \"assignedToId\": 123\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://api.1club.ai/v1/platform/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"pipelineStageId\": 123,\n \"pipelineLostNote\": \"<string>\",\n \"sourceId\": 123,\n \"assignedToId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/contacts/{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 \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"pipelineStageId\": 123,\n \"pipelineLostNote\": \"<string>\",\n \"sourceId\": 123,\n \"assignedToId\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"type": "<string>",
"pipelineStageId": 123,
"pipelineLostReason": "price",
"pipelineLostNote": "<string>",
"sourceId": 123,
"assignedToId": 123,
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Update a contact
Edits a contact’s name and contact details. Send only what changes - null clears lastName, email or phone, and an omitted field is left alone. The display name is always recomputed from firstName and lastName, the phone is canonicalized, and a contact must keep at least one of email or phone, so an edit cannot leave the person unreachable. Clearing lastName stores an empty string rather than null, so it reads back as "".
Refused edits: an email already used by another contact in the organization (409); any change to the email of a contact whose address is also their 1club login (400) - that address is changed by the person themselves; and clearing a field the organization has marked required for staff (400, naming the field). An archived contact cannot be edited. pipelineStageId moves the contact in the sales pipeline (from GET /v1/platform/pipeline-stages); null takes them out of it. A contact who has never been a customer is a Lead while they are in the pipeline, so this can change type. Moving them to the Lost stage takes an optional pipelineLostReason (and pipelineLostNote, required for other); a reason sent with any other stage is refused (400). On a contact already in Lost, the reason replaces the recorded one. sourceId and assignedToId set where they came from and which staff member follows them up.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"pipelineStageId": 123,
"pipelineLostNote": "<string>",
"sourceId": 123,
"assignedToId": 123
}
'import requests
url = "https://api.1club.ai/v1/platform/contacts/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"pipelineStageId": 123,
"pipelineLostNote": "<string>",
"sourceId": 123,
"assignedToId": 123
}
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({
firstName: '<string>',
lastName: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
pipelineStageId: 123,
pipelineLostNote: '<string>',
sourceId: 123,
assignedToId: 123
})
};
fetch('https://api.1club.ai/v1/platform/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.1club.ai/v1/platform/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>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'pipelineStageId' => 123,
'pipelineLostNote' => '<string>',
'sourceId' => 123,
'assignedToId' => 123
]),
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://api.1club.ai/v1/platform/contacts/{id}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"pipelineStageId\": 123,\n \"pipelineLostNote\": \"<string>\",\n \"sourceId\": 123,\n \"assignedToId\": 123\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://api.1club.ai/v1/platform/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"pipelineStageId\": 123,\n \"pipelineLostNote\": \"<string>\",\n \"sourceId\": 123,\n \"assignedToId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/contacts/{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 \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"pipelineStageId\": 123,\n \"pipelineLostNote\": \"<string>\",\n \"sourceId\": 123,\n \"assignedToId\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"type": "<string>",
"pipelineStageId": 123,
"pipelineLostReason": "price",
"pipelineLostNote": "<string>",
"sourceId": 123,
"assignedToId": 123,
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Body
Fields accepted when updating a contact. Send only what changes; an omitted field is left alone, and null clears lastName, email or phone. At least one field is required, and the contact must keep at least one of email or phone. Clearing the family name stores it as an empty string rather than null, so a cleared lastName reads back as "".
Why the lead was lost. Only with a pipelineStageId naming the Lost stage (kind cold); sent with any other stage it is refused. Optional: a move to Lost without it reads as unknown. On a contact already in Lost it replaces the recorded reason.
price, timing, chose_competitor, location, no_response, not_interested, not_a_fit, other Response
The updated contact
A contact (customer) in the organization. Reference the id as contactId when creating a booking.
Was this page helpful?