curl --request PUT \
--url https://your-instance.example.com/api/contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"status": "Qualified",
"pipelineStage": "64f0a1b2c3d4e5f6a7b8c9d2",
"pipelineId": "64f0a1b2c3d4e5f6a7b8c9d1"
}
'import requests
url = "https://your-instance.example.com/api/contact"
payload = {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"status": "Qualified",
"pipelineStage": "64f0a1b2c3d4e5f6a7b8c9d2",
"pipelineId": "64f0a1b2c3d4e5f6a7b8c9d1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '64f0a1b2c3d4e5f6a7b8c9d0',
status: 'Qualified',
pipelineStage: '64f0a1b2c3d4e5f6a7b8c9d2',
pipelineId: '64f0a1b2c3d4e5f6a7b8c9d1'
})
};
fetch('https://your-instance.example.com/api/contact', 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://your-instance.example.com/api/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '64f0a1b2c3d4e5f6a7b8c9d0',
'status' => 'Qualified',
'pipelineStage' => '64f0a1b2c3d4e5f6a7b8c9d2',
'pipelineId' => '64f0a1b2c3d4e5f6a7b8c9d1'
]),
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://your-instance.example.com/api/contact"
payload := strings.NewReader("{\n \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"status\": \"Qualified\",\n \"pipelineStage\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n \"pipelineId\": \"64f0a1b2c3d4e5f6a7b8c9d1\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://your-instance.example.com/api/contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"status\": \"Qualified\",\n \"pipelineStage\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n \"pipelineId\": \"64f0a1b2c3d4e5f6a7b8c9d1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"status\": \"Qualified\",\n \"pipelineStage\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n \"pipelineId\": \"64f0a1b2c3d4e5f6a7b8c9d1\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Contact updated successfully",
"success": true,
"contact": {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"firstName": "Jane",
"lastName": "Doe"
}
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}Update contact
Updates a contact identified by _id in the body. Resolves pipeline stage / status pairs to keep them in sync, records pipeline transitions, logs a manual event with field-level diffs, and emits the contact_updated socket event. Org-scoped unless caller is SUPERADMIN.
curl --request PUT \
--url https://your-instance.example.com/api/contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"status": "Qualified",
"pipelineStage": "64f0a1b2c3d4e5f6a7b8c9d2",
"pipelineId": "64f0a1b2c3d4e5f6a7b8c9d1"
}
'import requests
url = "https://your-instance.example.com/api/contact"
payload = {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"status": "Qualified",
"pipelineStage": "64f0a1b2c3d4e5f6a7b8c9d2",
"pipelineId": "64f0a1b2c3d4e5f6a7b8c9d1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '64f0a1b2c3d4e5f6a7b8c9d0',
status: 'Qualified',
pipelineStage: '64f0a1b2c3d4e5f6a7b8c9d2',
pipelineId: '64f0a1b2c3d4e5f6a7b8c9d1'
})
};
fetch('https://your-instance.example.com/api/contact', 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://your-instance.example.com/api/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '64f0a1b2c3d4e5f6a7b8c9d0',
'status' => 'Qualified',
'pipelineStage' => '64f0a1b2c3d4e5f6a7b8c9d2',
'pipelineId' => '64f0a1b2c3d4e5f6a7b8c9d1'
]),
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://your-instance.example.com/api/contact"
payload := strings.NewReader("{\n \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"status\": \"Qualified\",\n \"pipelineStage\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n \"pipelineId\": \"64f0a1b2c3d4e5f6a7b8c9d1\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://your-instance.example.com/api/contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"status\": \"Qualified\",\n \"pipelineStage\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n \"pipelineId\": \"64f0a1b2c3d4e5f6a7b8c9d1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"status\": \"Qualified\",\n \"pipelineStage\": \"64f0a1b2c3d4e5f6a7b8c9d2\",\n \"pipelineId\": \"64f0a1b2c3d4e5f6a7b8c9d1\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Contact updated successfully",
"success": true,
"contact": {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"firstName": "Jane",
"lastName": "Doe"
}
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}{
"success": false,
"message": "Contact not found",
"error": {
"code": "NOT_FOUND",
"message": "Contact not found"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Target contact _id; required to locate the document.
Suppresses side-effects (audit log, socket emit) when the update originates from the history viewer.
New pipeline status name; resolved together with pipelineStage.
Stage _id. Set to null to clear the stage assignment (legacy status-only update).
Optional pipeline _id used to scope stage resolution; inferred from the resolved stage when omitted.
Response
Contact updated
Show child attributes
Show child attributes
{
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"firstName": "Jane",
"lastName": "Doe",
"phoneNumber": [
{
"value": "+14165550100",
"isPrimary": true
}
],
"secondaryPhoneNumber": [],
"email": "jane.doe@example.com",
"status": "New Lead",
"pipelineId": "64f0a1b2c3d4e5f6a7b8c9d1",
"pipelineStage": "64f0a1b2c3d4e5f6a7b8c9d2",
"organizationId": "64f0a1b2c3d4e5f6a7b8c9d3",
"userId": "64f0a1b2c3d4e5f6a7b8c9d4",
"createdBy": "64f0a1b2c3d4e5f6a7b8c9d4",
"assignees": ["64f0a1b2c3d4e5f6a7b8c9d4"],
"createdAt": "2026-05-01T14:30:00.000Z",
"updatedAt": "2026-05-15T09:12:00.000Z"
}