Create object type
curl --request POST \
--url https://api.voxworks.ai/api/v1/object-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type_name": "property",
"display_name": "Property",
"description": "Property records imported from a CRM",
"validation_mode": "strict",
"unique_by_contact": false,
"schema": {
"address": "string",
"bedrooms": "number"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type_name: 'property',
display_name: 'Property',
description: 'Property records imported from a CRM',
validation_mode: 'strict',
unique_by_contact: false,
schema: {address: 'string', bedrooms: 'number'}
})
};
fetch('https://api.voxworks.ai/api/v1/object-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voxworks.ai/api/v1/object-types"
payload = {
"type_name": "property",
"display_name": "Property",
"description": "Property records imported from a CRM",
"validation_mode": "strict",
"unique_by_contact": False,
"schema": {
"address": "string",
"bedrooms": "number"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"object_type_id": "<string>",
"object_type": {
"id": "<string>",
"type_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"schema": {},
"unique_by_contact": true
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Invalid API key"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Rate limit exceeded"
}{
"success": false,
"message": "Internal server error"
}Custom Variables
Create object type
Create an object type for your team. The legacy /api/v1/create-object-type route is also accepted.
POST
/
api
/
v1
/
object-types
Create object type
curl --request POST \
--url https://api.voxworks.ai/api/v1/object-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type_name": "property",
"display_name": "Property",
"description": "Property records imported from a CRM",
"validation_mode": "strict",
"unique_by_contact": false,
"schema": {
"address": "string",
"bedrooms": "number"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type_name: 'property',
display_name: 'Property',
description: 'Property records imported from a CRM',
validation_mode: 'strict',
unique_by_contact: false,
schema: {address: 'string', bedrooms: 'number'}
})
};
fetch('https://api.voxworks.ai/api/v1/object-types', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voxworks.ai/api/v1/object-types"
payload = {
"type_name": "property",
"display_name": "Property",
"description": "Property records imported from a CRM",
"validation_mode": "strict",
"unique_by_contact": False,
"schema": {
"address": "string",
"bedrooms": "number"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"object_type_id": "<string>",
"object_type": {
"id": "<string>",
"type_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"schema": {},
"unique_by_contact": true
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Invalid API key"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Rate limit exceeded"
}{
"success": false,
"message": "Internal server error"
}Authorizations
API key from Voxworks, sent as Authorization: Bearer YOUR_API_KEY.
Body
application/json
⌘I

