Update Lead
curl --request PATCH \
--url https://api.partner.dit.myperch.io/v1/leads/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"phone": {
"number": "2925655632",
"extension": "562"
},
"clientData": {
"sin": "004877852",
"prefix": "Ms.",
"citizenship": "Permanent Legal Resident (PR)",
"dateOfBirth": "1987-07-13",
"maritalStatus": "Married",
"creditScoreEstimation": "142"
}
}
'import requests
url = "https://api.partner.dit.myperch.io/v1/leads/{id}"
payload = {
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"phone": {
"number": "2925655632",
"extension": "562"
},
"clientData": {
"sin": "004877852",
"prefix": "Ms.",
"citizenship": "Permanent Legal Resident (PR)",
"dateOfBirth": "1987-07-13",
"maritalStatus": "Married",
"creditScoreEstimation": "142"
}
}
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({
email: 'client1+74049788@example.com',
firstName: 'Amya',
lastName: 'Williamson',
phone: {number: '2925655632', extension: '562'},
clientData: {
sin: '004877852',
prefix: 'Ms.',
citizenship: 'Permanent Legal Resident (PR)',
dateOfBirth: '1987-07-13',
maritalStatus: 'Married',
creditScoreEstimation: '142'
}
})
};
fetch('https://api.partner.dit.myperch.io/v1/leads/{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.partner.dit.myperch.io/v1/leads/{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([
'email' => 'client1+74049788@example.com',
'firstName' => 'Amya',
'lastName' => 'Williamson',
'phone' => [
'number' => '2925655632',
'extension' => '562'
],
'clientData' => [
'sin' => '004877852',
'prefix' => 'Ms.',
'citizenship' => 'Permanent Legal Resident (PR)',
'dateOfBirth' => '1987-07-13',
'maritalStatus' => 'Married',
'creditScoreEstimation' => '142'
]
]),
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.partner.dit.myperch.io/v1/leads/{id}"
payload := strings.NewReader("{\n \"email\": \"client1+74049788@example.com\",\n \"firstName\": \"Amya\",\n \"lastName\": \"Williamson\",\n \"phone\": {\n \"number\": \"2925655632\",\n \"extension\": \"562\"\n },\n \"clientData\": {\n \"sin\": \"004877852\",\n \"prefix\": \"Ms.\",\n \"citizenship\": \"Permanent Legal Resident (PR)\",\n \"dateOfBirth\": \"1987-07-13\",\n \"maritalStatus\": \"Married\",\n \"creditScoreEstimation\": \"142\"\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.partner.dit.myperch.io/v1/leads/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"client1+74049788@example.com\",\n \"firstName\": \"Amya\",\n \"lastName\": \"Williamson\",\n \"phone\": {\n \"number\": \"2925655632\",\n \"extension\": \"562\"\n },\n \"clientData\": {\n \"sin\": \"004877852\",\n \"prefix\": \"Ms.\",\n \"citizenship\": \"Permanent Legal Resident (PR)\",\n \"dateOfBirth\": \"1987-07-13\",\n \"maritalStatus\": \"Married\",\n \"creditScoreEstimation\": \"142\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partner.dit.myperch.io/v1/leads/{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 \"email\": \"client1+74049788@example.com\",\n \"firstName\": \"Amya\",\n \"lastName\": \"Williamson\",\n \"phone\": {\n \"number\": \"2925655632\",\n \"extension\": \"562\"\n },\n \"clientData\": {\n \"sin\": \"004877852\",\n \"prefix\": \"Ms.\",\n \"citizenship\": \"Permanent Legal Resident (PR)\",\n \"dateOfBirth\": \"1987-07-13\",\n \"maritalStatus\": \"Married\",\n \"creditScoreEstimation\": \"142\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "38owigkM",
"createdAt": "2026-03-05T19:39:18.389Z",
"updatedAt": "2026-03-05T19:39:18.389Z",
"deletedAt": null,
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"phone": {
"number": "2925655632",
"extension": "562"
},
"clientData": {
"sin": "004877852",
"prefix": "Ms.",
"citizenship": "Permanent Legal Resident (PR)",
"dateOfBirth": "1987-07-13",
"maritalStatus": "Married",
"creditScoreEstimation": "142"
},
"resourceType": "Firm",
"resourceId": "qSBKZzUi",
"referredByReferralCodeId": null,
"convertedAt": null
}
}Lead
Update Lead
Updates a record in the Lead table based on passed parameters and implicit access controls.
PATCH
/
leads
/
{id}
Update Lead
curl --request PATCH \
--url https://api.partner.dit.myperch.io/v1/leads/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"phone": {
"number": "2925655632",
"extension": "562"
},
"clientData": {
"sin": "004877852",
"prefix": "Ms.",
"citizenship": "Permanent Legal Resident (PR)",
"dateOfBirth": "1987-07-13",
"maritalStatus": "Married",
"creditScoreEstimation": "142"
}
}
'import requests
url = "https://api.partner.dit.myperch.io/v1/leads/{id}"
payload = {
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"phone": {
"number": "2925655632",
"extension": "562"
},
"clientData": {
"sin": "004877852",
"prefix": "Ms.",
"citizenship": "Permanent Legal Resident (PR)",
"dateOfBirth": "1987-07-13",
"maritalStatus": "Married",
"creditScoreEstimation": "142"
}
}
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({
email: 'client1+74049788@example.com',
firstName: 'Amya',
lastName: 'Williamson',
phone: {number: '2925655632', extension: '562'},
clientData: {
sin: '004877852',
prefix: 'Ms.',
citizenship: 'Permanent Legal Resident (PR)',
dateOfBirth: '1987-07-13',
maritalStatus: 'Married',
creditScoreEstimation: '142'
}
})
};
fetch('https://api.partner.dit.myperch.io/v1/leads/{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.partner.dit.myperch.io/v1/leads/{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([
'email' => 'client1+74049788@example.com',
'firstName' => 'Amya',
'lastName' => 'Williamson',
'phone' => [
'number' => '2925655632',
'extension' => '562'
],
'clientData' => [
'sin' => '004877852',
'prefix' => 'Ms.',
'citizenship' => 'Permanent Legal Resident (PR)',
'dateOfBirth' => '1987-07-13',
'maritalStatus' => 'Married',
'creditScoreEstimation' => '142'
]
]),
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.partner.dit.myperch.io/v1/leads/{id}"
payload := strings.NewReader("{\n \"email\": \"client1+74049788@example.com\",\n \"firstName\": \"Amya\",\n \"lastName\": \"Williamson\",\n \"phone\": {\n \"number\": \"2925655632\",\n \"extension\": \"562\"\n },\n \"clientData\": {\n \"sin\": \"004877852\",\n \"prefix\": \"Ms.\",\n \"citizenship\": \"Permanent Legal Resident (PR)\",\n \"dateOfBirth\": \"1987-07-13\",\n \"maritalStatus\": \"Married\",\n \"creditScoreEstimation\": \"142\"\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.partner.dit.myperch.io/v1/leads/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"client1+74049788@example.com\",\n \"firstName\": \"Amya\",\n \"lastName\": \"Williamson\",\n \"phone\": {\n \"number\": \"2925655632\",\n \"extension\": \"562\"\n },\n \"clientData\": {\n \"sin\": \"004877852\",\n \"prefix\": \"Ms.\",\n \"citizenship\": \"Permanent Legal Resident (PR)\",\n \"dateOfBirth\": \"1987-07-13\",\n \"maritalStatus\": \"Married\",\n \"creditScoreEstimation\": \"142\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partner.dit.myperch.io/v1/leads/{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 \"email\": \"client1+74049788@example.com\",\n \"firstName\": \"Amya\",\n \"lastName\": \"Williamson\",\n \"phone\": {\n \"number\": \"2925655632\",\n \"extension\": \"562\"\n },\n \"clientData\": {\n \"sin\": \"004877852\",\n \"prefix\": \"Ms.\",\n \"citizenship\": \"Permanent Legal Resident (PR)\",\n \"dateOfBirth\": \"1987-07-13\",\n \"maritalStatus\": \"Married\",\n \"creditScoreEstimation\": \"142\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "38owigkM",
"createdAt": "2026-03-05T19:39:18.389Z",
"updatedAt": "2026-03-05T19:39:18.389Z",
"deletedAt": null,
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"phone": {
"number": "2925655632",
"extension": "562"
},
"clientData": {
"sin": "004877852",
"prefix": "Ms.",
"citizenship": "Permanent Legal Resident (PR)",
"dateOfBirth": "1987-07-13",
"maritalStatus": "Married",
"creditScoreEstimation": "142"
},
"resourceType": "Firm",
"resourceId": "qSBKZzUi",
"referredByReferralCodeId": null,
"convertedAt": null
}
}Authorizations
Path Parameters
The id of the record to update.
Body
application/json
The data to update the record with.
The client's email address
Example:
"client1+74049788@example.com"
The client's first name
Example:
"Amya"
The client's last name
Example:
"Williamson"
The resource type of the lead owner
Available options:
ClientProfile, Firm, FirmMember Example:
"Firm"
The resource ID of the lead owner
Example:
"qSBKZzUi"
The client's phone number
Show child attributes
Show child attributes
The user data for the lead
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
⌘I