Allows you to create a custom object schema. To understand objects and records, please have a look at the documentation here : https://help.hoopai.com/api-reference/overview/objects
POST
/
objects
Create Custom Object
curl --request POST \
--url https://services.leadconnectorhq.com/objects \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"key": "custom_objects.pet",
"locationId": "ve9EPM428h8vShlRW1KT",
"primaryDisplayPropertyDetails": {
"key": "custom_objects.pet.name",
"name": "Pet name",
"dataType": "TEXT"
},
"description": "These are non vaccinated pets"
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
labels: {singular: 'Pet', plural: 'Pets'},
key: 'custom_objects.pet',
locationId: 've9EPM428h8vShlRW1KT',
primaryDisplayPropertyDetails: {key: 'custom_objects.pet.name', name: 'Pet name', dataType: 'TEXT'},
description: 'These are non vaccinated pets'
})
};
fetch('https://services.leadconnectorhq.com/objects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/objects"
payload = {
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"key": "custom_objects.pet",
"locationId": "ve9EPM428h8vShlRW1KT",
"primaryDisplayPropertyDetails": {
"key": "custom_objects.pet.name",
"name": "Pet name",
"dataType": "TEXT"
},
"description": "These are non vaccinated pets"
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": {
"id": "661c06b4ffde146bdb469442",
"standard": false,
"key": "custom_objects.pet",
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"locationId": "Q9DT3OAqEXDLYuob1G32",
"primaryDisplayProperty": "custom_objects.pet.name",
"dateAdded": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"description": "These are non vaccinated pets",
"type": "The Object type can either USER_DEFINED or SYSTEM_DEFINED"
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Headers
API Version
Available options:
2021-07-28 Body
application/json
Show child attributes
Show child attributes
Example:
{ "singular": "Pet", "plural": "Pets" }
key that would be used to refer the Custom Object internally (lowercase + underscore_separated). 'custom_objects.' would be added as prefix by default
Example:
"custom_objects.pet"
Location Id
Example:
"ve9EPM428h8vShlRW1KT"
Show child attributes
Show child attributes
Pet Object`s description
Example:
"These are non vaccinated pets"
Response
Successful response
Show child attributes
Show child attributes
Last modified on March 8, 2026
Was this page helpful?
Create Custom Object
curl --request POST \
--url https://services.leadconnectorhq.com/objects \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"key": "custom_objects.pet",
"locationId": "ve9EPM428h8vShlRW1KT",
"primaryDisplayPropertyDetails": {
"key": "custom_objects.pet.name",
"name": "Pet name",
"dataType": "TEXT"
},
"description": "These are non vaccinated pets"
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
labels: {singular: 'Pet', plural: 'Pets'},
key: 'custom_objects.pet',
locationId: 've9EPM428h8vShlRW1KT',
primaryDisplayPropertyDetails: {key: 'custom_objects.pet.name', name: 'Pet name', dataType: 'TEXT'},
description: 'These are non vaccinated pets'
})
};
fetch('https://services.leadconnectorhq.com/objects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/objects"
payload = {
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"key": "custom_objects.pet",
"locationId": "ve9EPM428h8vShlRW1KT",
"primaryDisplayPropertyDetails": {
"key": "custom_objects.pet.name",
"name": "Pet name",
"dataType": "TEXT"
},
"description": "These are non vaccinated pets"
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": {
"id": "661c06b4ffde146bdb469442",
"standard": false,
"key": "custom_objects.pet",
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"locationId": "Q9DT3OAqEXDLYuob1G32",
"primaryDisplayProperty": "custom_objects.pet.name",
"dateAdded": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"description": "These are non vaccinated pets",
"type": "The Object type can either USER_DEFINED or SYSTEM_DEFINED"
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}