Create Association
Allow you to create contact - contact , contact - custom objects associations, will add more in the future.See: https://help.hoopai.com/api-reference/overview/associations
POST
/
associations
Create Association
curl --request POST \
--url https://services.leadconnectorhq.com/associations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"locationId": "string",
"key": "student_teacher",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locationId: 'string',
key: 'student_teacher',
firstObjectLabel: 'student',
firstObjectKey: 'custom_objects.children',
secondObjectLabel: 'Teacher',
secondObjectKey: 'contact'
})
};
fetch('https://services.leadconnectorhq.com/associations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/associations"
payload = {
"locationId": "string",
"key": "student_teacher",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_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"
}Authorizations
Body
application/json
Response
Successful response
Last modified on March 8, 2026
Was this page helpful?
Create Association
curl --request POST \
--url https://services.leadconnectorhq.com/associations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"locationId": "string",
"key": "student_teacher",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locationId: 'string',
key: 'student_teacher',
firstObjectLabel: 'student',
firstObjectKey: 'custom_objects.children',
secondObjectLabel: 'Teacher',
secondObjectKey: 'contact'
})
};
fetch('https://services.leadconnectorhq.com/associations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/associations"
payload = {
"locationId": "string",
"key": "student_teacher",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_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"
}