Create a lead
curl --request POST \
--url https://anzapi.onboardme.app/api/v1/leads \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"entityType": "Individual",
"entityName": "Alex",
"entitySurname": "Morgan",
"email": "alex@example.com",
"mobile": "+61 400 555 010",
"externalSystemID": "CRM-LEAD-9901",
"leadSource": "Website enquiry",
"leadStatus": "New",
"leadValue": 3200,
"noteText": "Interested in annual compliance and bookkeeping.",
"noteType": "API intake"
}
'import requests
url = "https://anzapi.onboardme.app/api/v1/leads"
payload = {
"entityType": "Individual",
"entityName": "Alex",
"entitySurname": "Morgan",
"email": "alex@example.com",
"mobile": "+61 400 555 010",
"externalSystemID": "CRM-LEAD-9901",
"leadSource": "Website enquiry",
"leadStatus": "New",
"leadValue": 3200,
"noteText": "Interested in annual compliance and bookkeeping.",
"noteType": "API intake"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityType: 'Individual',
entityName: 'Alex',
entitySurname: 'Morgan',
email: 'alex@example.com',
mobile: '+61 400 555 010',
externalSystemID: 'CRM-LEAD-9901',
leadSource: 'Website enquiry',
leadStatus: 'New',
leadValue: 3200,
noteText: 'Interested in annual compliance and bookkeeping.',
noteType: 'API intake'
})
};
fetch('https://anzapi.onboardme.app/api/v1/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://anzapi.onboardme.app/api/v1/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([
'entityType' => 'Individual',
'entityName' => 'Alex',
'entitySurname' => 'Morgan',
'email' => 'alex@example.com',
'mobile' => '+61 400 555 010',
'externalSystemID' => 'CRM-LEAD-9901',
'leadSource' => 'Website enquiry',
'leadStatus' => 'New',
'leadValue' => 3200,
'noteText' => 'Interested in annual compliance and bookkeeping.',
'noteType' => 'API intake'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://anzapi.onboardme.app/api/v1/leads"
payload := strings.NewReader("{\n \"entityType\": \"Individual\",\n \"entityName\": \"Alex\",\n \"entitySurname\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"mobile\": \"+61 400 555 010\",\n \"externalSystemID\": \"CRM-LEAD-9901\",\n \"leadSource\": \"Website enquiry\",\n \"leadStatus\": \"New\",\n \"leadValue\": 3200,\n \"noteText\": \"Interested in annual compliance and bookkeeping.\",\n \"noteType\": \"API intake\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://anzapi.onboardme.app/api/v1/leads")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"entityType\": \"Individual\",\n \"entityName\": \"Alex\",\n \"entitySurname\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"mobile\": \"+61 400 555 010\",\n \"externalSystemID\": \"CRM-LEAD-9901\",\n \"leadSource\": \"Website enquiry\",\n \"leadStatus\": \"New\",\n \"leadValue\": 3200,\n \"noteText\": \"Interested in annual compliance and bookkeeping.\",\n \"noteType\": \"API intake\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://anzapi.onboardme.app/api/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityType\": \"Individual\",\n \"entityName\": \"Alex\",\n \"entitySurname\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"mobile\": \"+61 400 555 010\",\n \"externalSystemID\": \"CRM-LEAD-9901\",\n \"leadSource\": \"Website enquiry\",\n \"leadStatus\": \"New\",\n \"leadValue\": 3200,\n \"noteText\": \"Interested in annual compliance and bookkeeping.\",\n \"noteType\": \"API intake\"\n}"
response = http.request(request)
puts response.read_body{
"entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
"leadDetailID": 501,
"leadNoteID": 8801
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Leads
Create a lead
Creates a new lead in the practice: a client entity with lead status, lead details, and optionally an initial note in one request.
Requires an API client with write access (canWrite from /api/v1/auth/validate).
Body fields (common)
entityType/entityTypeID: see/api/v1/settings/entity-types. Defaults to Individual when omitted.- Naming (depends on entity type):
- Individual / Sole Trader:
entityName(required) = given/first name;entitySurname= family/last name. OptionalotherName,entityInitials. Names are not split automatically — send both fields. - Company and other non-individual types:
entityName(required) = full legal or trading name; leaveentitySurnameunset.
- Individual / Sole Trader:
email,mobile,telephone, addresses: optional contact fields.externalSystemID: your system’s identifier for this lead.leadSource,leadStatus,leadValue: optional pipeline fields. Usenamevalues from GET/api/v1/settings/lead-sourcesand GET/api/v1/settings/lead-statuses.noteText/noteType: optional initial lead note (noteTypemax 45 characters).
Example (individual)
{
"entityType": "Individual",
"entityName": "Alex",
"entitySurname": "Morgan",
"email": "alex@example.com",
"leadSource": "Website enquiry",
"leadStatus": "New"
}
201: Location references the new lead; body includes entityKey, leadDetailID, and leadNoteID when a note was created.
403: API client is read-only.
429: Rate limit exceeded.
POST
/
api
/
v1
/
leads
Create a lead
curl --request POST \
--url https://anzapi.onboardme.app/api/v1/leads \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"entityType": "Individual",
"entityName": "Alex",
"entitySurname": "Morgan",
"email": "alex@example.com",
"mobile": "+61 400 555 010",
"externalSystemID": "CRM-LEAD-9901",
"leadSource": "Website enquiry",
"leadStatus": "New",
"leadValue": 3200,
"noteText": "Interested in annual compliance and bookkeeping.",
"noteType": "API intake"
}
'import requests
url = "https://anzapi.onboardme.app/api/v1/leads"
payload = {
"entityType": "Individual",
"entityName": "Alex",
"entitySurname": "Morgan",
"email": "alex@example.com",
"mobile": "+61 400 555 010",
"externalSystemID": "CRM-LEAD-9901",
"leadSource": "Website enquiry",
"leadStatus": "New",
"leadValue": 3200,
"noteText": "Interested in annual compliance and bookkeeping.",
"noteType": "API intake"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityType: 'Individual',
entityName: 'Alex',
entitySurname: 'Morgan',
email: 'alex@example.com',
mobile: '+61 400 555 010',
externalSystemID: 'CRM-LEAD-9901',
leadSource: 'Website enquiry',
leadStatus: 'New',
leadValue: 3200,
noteText: 'Interested in annual compliance and bookkeeping.',
noteType: 'API intake'
})
};
fetch('https://anzapi.onboardme.app/api/v1/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://anzapi.onboardme.app/api/v1/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([
'entityType' => 'Individual',
'entityName' => 'Alex',
'entitySurname' => 'Morgan',
'email' => 'alex@example.com',
'mobile' => '+61 400 555 010',
'externalSystemID' => 'CRM-LEAD-9901',
'leadSource' => 'Website enquiry',
'leadStatus' => 'New',
'leadValue' => 3200,
'noteText' => 'Interested in annual compliance and bookkeeping.',
'noteType' => 'API intake'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://anzapi.onboardme.app/api/v1/leads"
payload := strings.NewReader("{\n \"entityType\": \"Individual\",\n \"entityName\": \"Alex\",\n \"entitySurname\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"mobile\": \"+61 400 555 010\",\n \"externalSystemID\": \"CRM-LEAD-9901\",\n \"leadSource\": \"Website enquiry\",\n \"leadStatus\": \"New\",\n \"leadValue\": 3200,\n \"noteText\": \"Interested in annual compliance and bookkeeping.\",\n \"noteType\": \"API intake\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://anzapi.onboardme.app/api/v1/leads")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"entityType\": \"Individual\",\n \"entityName\": \"Alex\",\n \"entitySurname\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"mobile\": \"+61 400 555 010\",\n \"externalSystemID\": \"CRM-LEAD-9901\",\n \"leadSource\": \"Website enquiry\",\n \"leadStatus\": \"New\",\n \"leadValue\": 3200,\n \"noteText\": \"Interested in annual compliance and bookkeeping.\",\n \"noteType\": \"API intake\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://anzapi.onboardme.app/api/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityType\": \"Individual\",\n \"entityName\": \"Alex\",\n \"entitySurname\": \"Morgan\",\n \"email\": \"alex@example.com\",\n \"mobile\": \"+61 400 555 010\",\n \"externalSystemID\": \"CRM-LEAD-9901\",\n \"leadSource\": \"Website enquiry\",\n \"leadStatus\": \"New\",\n \"leadValue\": 3200,\n \"noteText\": \"Interested in annual compliance and bookkeeping.\",\n \"noteType\": \"API intake\"\n}"
response = http.request(request)
puts response.read_body{
"entityKey": "2c4f6a88-1b3d-5e7f-90ab-cdef12345678",
"leadDetailID": 501,
"leadNoteID": 8801
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Swagger / Postman only: Client ID as username, Client secret as password. In Postman, set this once on the collection (Authorization → Basic Auth) so all requests inherit. For production server-to-server code, prefer X-OM-Auth-ID and X-OM-Auth-Key headers.
Body
application/jsontext/jsonapplication/*+json
Show child attributes
Show child attributes
Show child attributes
Show child attributes