curl --request POST \
--url https://api.hubapi.com/crm-object-schemas/v3/schemas \
--header 'Content-Type: application/json' \
--data '{
"name": "my_object",
"labels": {
"singular": "My object",
"plural": "My objects"
},
"primaryDisplayProperty": "my_object_property",
"requiredProperties": [
"my_object_property"
],
"properties": [
{
"name": "my_object_property",
"label": "My object property",
"isPrimaryDisplayLabel": true
}
],
"associatedObjects": [
"CONTACT"
],
"metaType": "PORTAL_SPECIFIC"
}'
{
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
Define a new object schema, along with custom properties and associations. The entire object schema, including its object type ID, properties, and associations will be returned in the response.
curl --request POST \
--url https://api.hubapi.com/crm-object-schemas/v3/schemas \
--header 'Content-Type: application/json' \
--data '{
"name": "my_object",
"labels": {
"singular": "My object",
"plural": "My objects"
},
"primaryDisplayProperty": "my_object_property",
"requiredProperties": [
"my_object_property"
],
"properties": [
{
"name": "my_object_property",
"label": "My object property",
"isPrimaryDisplayLabel": true
}
],
"associatedObjects": [
"CONTACT"
],
"metaType": "PORTAL_SPECIFIC"
}'
{
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
Object schema definition, including properties and associations.
Defines a new object type, its properties, and associations.
successful operation
Defines an object schema, including its properties and associations.
Was this page helpful?