Create Lead for Firm
curl --request POST \
--url https://api.partner.dit.myperch.io/v1/firms/{id}/leads \
--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"
},
"resourceType": "Firm",
"resourceId": "qSBKZzUi"
}
'import requests
url = "https://api.partner.dit.myperch.io/v1/firms/{id}/leads"
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"
},
"resourceType": "Firm",
"resourceId": "qSBKZzUi"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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'
},
resourceType: 'Firm',
resourceId: 'qSBKZzUi'
})
};
fetch('https://api.partner.dit.myperch.io/v1/firms/{id}/leads', 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/firms/{id}/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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'
],
'resourceType' => 'Firm',
'resourceId' => 'qSBKZzUi'
]),
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/firms/{id}/leads"
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 \"resourceType\": \"Firm\",\n \"resourceId\": \"qSBKZzUi\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.partner.dit.myperch.io/v1/firms/{id}/leads")
.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 \"resourceType\": \"Firm\",\n \"resourceId\": \"qSBKZzUi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partner.dit.myperch.io/v1/firms/{id}/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"resourceType\": \"Firm\",\n \"resourceId\": \"qSBKZzUi\"\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",
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"resourceType": "Firm",
"resourceId": "qSBKZzUi",
"deletedAt": "2023-11-07T05:31:56Z",
"phone": {
"number": "<string>",
"extension": "<string>"
},
"clientData": {
"advisorProfileId": "<string>",
"citizenship": "Canadian Citizen",
"creditScoreEstimation": "700",
"dateOfBirth": "1980-01-01",
"isFirstTimeHomeBuyer": true,
"maritalStatus": "Married",
"prefix": "Mrs.",
"sin": "123456789",
"Assets": [
{
"type": "Savings",
"description": "Savings account at RBC",
"value": 10000
}
],
"Incomes": [
{
"type": "Employment",
"startedOn": "2018-01-01",
"endedOn": "2022-12-31",
"description": "Cyberdyne Systems",
"streams": {},
"employmentDetails": {
"type": "Salaried",
"jobTitle": "Accountant",
"phone": "{\"number\":\"6471234567\",\"extension\":\"123\"}",
"sector": "Financial Services",
"businessName": "Acme Inc.",
"address": {
"unitNumber": "<string>",
"streetNumber": "<string>",
"streetName": "<string>",
"locality": "<string>",
"administrativeArea": "<string>",
"postalCode": "<string>",
"country": "<string>",
"premise": "<string>",
"googlePlaceId": "<string>",
"locationGeometry": "{\"type\":\"Point\",\"coordinates\":[-79.3832,43.6532]}"
},
"businessType": "Sole Proprietorship",
"businessEstablishedOn": "2019-01-01",
"businessAnnualGrossRevenue": "10000",
"probationEndsOn": "2022-01-01"
}
}
],
"ClientResidencies": [
{
"occupancyType": "Resider",
"startsOn": "2018-01-01",
"locality": "<string>",
"administrativeArea": "<string>",
"postalCode": "<string>",
"country": "<string>",
"endsOn": "2022-12-31",
"monthlyRent": 2000,
"unitNumber": "<string>",
"streetNumber": "<string>",
"streetName": "<string>",
"premise": "<string>",
"googlePlaceId": "<string>",
"locationGeometry": "{\"type\":\"Point\",\"coordinates\":[-79.3832,43.6532]}"
}
],
"Plans": [
{
"type": "Buying",
"id": "<string>",
"leadId": "<string>",
"referralCodeId": "<string>",
"realtorProfileId": "<string>"
}
],
"Properties": [
{
"type": "Detached",
"status": "Owned",
"occupancyType": "Owner Occupied",
"purchasePrice": 500000,
"purchasedOn": "2018-01-01",
"monthlyTotalRent": 2000,
"costs": {
"annualPropertyTaxes": 123,
"monthlyMaintenanceFee": 123
},
"unitNumber": "<string>",
"streetNumber": "<string>",
"streetName": "<string>",
"locality": "<string>",
"administrativeArea": "<string>",
"postalCode": "<string>",
"country": "<string>",
"premise": "<string>",
"googlePlaceId": "<string>",
"locationGeometry": "{\"type\":\"Point\",\"coordinates\":[-79.3832,43.6532]}",
"Liabilities": [
{
"balance": "<string>",
"creditLimit": "<string>",
"lenderName": "<string>",
"maturesOn": "2023-12-25",
"paymentAmount": "<string>",
"paymentDetails": {
"isInterestOnly": true,
"isPropertyTaxIncluded": true
},
"rate": 123,
"description": "<string>",
"termMonths": 123,
"position": 123,
"ChildLiabilities": [
{
"type": "HELOC",
"balance": "<string>",
"creditLimit": "<string>",
"lenderName": "<string>",
"maturesOn": "2023-12-25",
"paymentAmount": "<string>",
"paymentDetails": {
"isInterestOnly": true,
"isPropertyTaxIncluded": true
},
"rate": 123,
"description": "<string>",
"termMonths": 123
}
]
}
]
}
],
"notes": "<string>"
},
"referredByReferralCodeId": "<string>",
"convertedAt": "2023-11-07T05:31:56Z"
}
}Lead
Create Lead for Firm
Creates a record in the Lead table based on passed parameters and implicit access controls.
POST
/
firms
/
{id}
/
leads
Create Lead for Firm
curl --request POST \
--url https://api.partner.dit.myperch.io/v1/firms/{id}/leads \
--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"
},
"resourceType": "Firm",
"resourceId": "qSBKZzUi"
}
'import requests
url = "https://api.partner.dit.myperch.io/v1/firms/{id}/leads"
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"
},
"resourceType": "Firm",
"resourceId": "qSBKZzUi"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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'
},
resourceType: 'Firm',
resourceId: 'qSBKZzUi'
})
};
fetch('https://api.partner.dit.myperch.io/v1/firms/{id}/leads', 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/firms/{id}/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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'
],
'resourceType' => 'Firm',
'resourceId' => 'qSBKZzUi'
]),
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/firms/{id}/leads"
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 \"resourceType\": \"Firm\",\n \"resourceId\": \"qSBKZzUi\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.partner.dit.myperch.io/v1/firms/{id}/leads")
.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 \"resourceType\": \"Firm\",\n \"resourceId\": \"qSBKZzUi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partner.dit.myperch.io/v1/firms/{id}/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"resourceType\": \"Firm\",\n \"resourceId\": \"qSBKZzUi\"\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",
"email": "client1+74049788@example.com",
"firstName": "Amya",
"lastName": "Williamson",
"resourceType": "Firm",
"resourceId": "qSBKZzUi",
"deletedAt": "2023-11-07T05:31:56Z",
"phone": {
"number": "<string>",
"extension": "<string>"
},
"clientData": {
"advisorProfileId": "<string>",
"citizenship": "Canadian Citizen",
"creditScoreEstimation": "700",
"dateOfBirth": "1980-01-01",
"isFirstTimeHomeBuyer": true,
"maritalStatus": "Married",
"prefix": "Mrs.",
"sin": "123456789",
"Assets": [
{
"type": "Savings",
"description": "Savings account at RBC",
"value": 10000
}
],
"Incomes": [
{
"type": "Employment",
"startedOn": "2018-01-01",
"endedOn": "2022-12-31",
"description": "Cyberdyne Systems",
"streams": {},
"employmentDetails": {
"type": "Salaried",
"jobTitle": "Accountant",
"phone": "{\"number\":\"6471234567\",\"extension\":\"123\"}",
"sector": "Financial Services",
"businessName": "Acme Inc.",
"address": {
"unitNumber": "<string>",
"streetNumber": "<string>",
"streetName": "<string>",
"locality": "<string>",
"administrativeArea": "<string>",
"postalCode": "<string>",
"country": "<string>",
"premise": "<string>",
"googlePlaceId": "<string>",
"locationGeometry": "{\"type\":\"Point\",\"coordinates\":[-79.3832,43.6532]}"
},
"businessType": "Sole Proprietorship",
"businessEstablishedOn": "2019-01-01",
"businessAnnualGrossRevenue": "10000",
"probationEndsOn": "2022-01-01"
}
}
],
"ClientResidencies": [
{
"occupancyType": "Resider",
"startsOn": "2018-01-01",
"locality": "<string>",
"administrativeArea": "<string>",
"postalCode": "<string>",
"country": "<string>",
"endsOn": "2022-12-31",
"monthlyRent": 2000,
"unitNumber": "<string>",
"streetNumber": "<string>",
"streetName": "<string>",
"premise": "<string>",
"googlePlaceId": "<string>",
"locationGeometry": "{\"type\":\"Point\",\"coordinates\":[-79.3832,43.6532]}"
}
],
"Plans": [
{
"type": "Buying",
"id": "<string>",
"leadId": "<string>",
"referralCodeId": "<string>",
"realtorProfileId": "<string>"
}
],
"Properties": [
{
"type": "Detached",
"status": "Owned",
"occupancyType": "Owner Occupied",
"purchasePrice": 500000,
"purchasedOn": "2018-01-01",
"monthlyTotalRent": 2000,
"costs": {
"annualPropertyTaxes": 123,
"monthlyMaintenanceFee": 123
},
"unitNumber": "<string>",
"streetNumber": "<string>",
"streetName": "<string>",
"locality": "<string>",
"administrativeArea": "<string>",
"postalCode": "<string>",
"country": "<string>",
"premise": "<string>",
"googlePlaceId": "<string>",
"locationGeometry": "{\"type\":\"Point\",\"coordinates\":[-79.3832,43.6532]}",
"Liabilities": [
{
"balance": "<string>",
"creditLimit": "<string>",
"lenderName": "<string>",
"maturesOn": "2023-12-25",
"paymentAmount": "<string>",
"paymentDetails": {
"isInterestOnly": true,
"isPropertyTaxIncluded": true
},
"rate": 123,
"description": "<string>",
"termMonths": 123,
"position": 123,
"ChildLiabilities": [
{
"type": "HELOC",
"balance": "<string>",
"creditLimit": "<string>",
"lenderName": "<string>",
"maturesOn": "2023-12-25",
"paymentAmount": "<string>",
"paymentDetails": {
"isInterestOnly": true,
"isPropertyTaxIncluded": true
},
"rate": 123,
"description": "<string>",
"termMonths": 123
}
]
}
]
}
],
"notes": "<string>"
},
"referredByReferralCodeId": "<string>",
"convertedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Path Parameters
The id of the record to retrieve.
Example:
"abc123"
Body
application/json
The data to create 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
201 - application/json
Successful response
Show child attributes
Show child attributes
⌘I