curl --request POST \
--url https://api.hubapi.com/crm-object-schemas/v3/schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"associatedObjects": [
"CONTACT"
],
"labels": {
"plural": "My objects",
"singular": "My object"
},
"metaType": "PORTAL_SPECIFIC",
"name": "my_object",
"primaryDisplayProperty": "my_object_property",
"properties": [
{
"isPrimaryDisplayLabel": true,
"label": "My object property",
"name": "my_object_property"
}
],
"requiredProperties": [
"my_object_property"
]
}
'{
"associations": [
{
"fromObjectTypeId": "2-123456",
"id": "123",
"name": "my_object_to_contact",
"toObjectTypeId": "0-1"
}
],
"createdAt": "2020-02-20T18:07:11.390Z",
"fullyQualifiedName": "p7878787_my_object\"",
"id": "123456",
"labels": {
"plural": "My objects",
"singular": "My object"
},
"metaType": "PORTAL_SPECIFIC",
"name": "my_object",
"primaryDisplayProperty": "my_object_property",
"properties": [
{
"archived": false,
"calculated": false,
"createdAt": "2020-02-20T18:07:11.802Z",
"displayOrder": -1,
"externalOptions": false,
"fieldType": "text",
"groupName": "my_object_information",
"hasUniqueValue": false,
"label": "My object property",
"name": "my_object_property",
"type": "string",
"updatedAt": "2020-02-20T18:07:11.802Z"
}
],
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"updatedAt": "2020-02-20T18:09:07.555Z"
}Create a new custom object schema by defining its properties and associations.
curl --request POST \
--url https://api.hubapi.com/crm-object-schemas/v3/schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"associatedObjects": [
"CONTACT"
],
"labels": {
"plural": "My objects",
"singular": "My object"
},
"metaType": "PORTAL_SPECIFIC",
"name": "my_object",
"primaryDisplayProperty": "my_object_property",
"properties": [
{
"isPrimaryDisplayLabel": true,
"label": "My object property",
"name": "my_object_property"
}
],
"requiredProperties": [
"my_object_property"
]
}
'{
"associations": [
{
"fromObjectTypeId": "2-123456",
"id": "123",
"name": "my_object_to_contact",
"toObjectTypeId": "0-1"
}
],
"createdAt": "2020-02-20T18:07:11.390Z",
"fullyQualifiedName": "p7878787_my_object\"",
"id": "123456",
"labels": {
"plural": "My objects",
"singular": "My object"
},
"metaType": "PORTAL_SPECIFIC",
"name": "my_object",
"primaryDisplayProperty": "my_object_property",
"properties": [
{
"archived": false,
"calculated": false,
"createdAt": "2020-02-20T18:07:11.802Z",
"displayOrder": -1,
"externalOptions": false,
"fieldType": "text",
"groupName": "my_object_information",
"hasUniqueValue": false,
"label": "My object property",
"name": "my_object_property",
"type": "string",
"updatedAt": "2020-02-20T18:07:11.802Z"
}
],
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"updatedAt": "2020-02-20T18:09:07.555Z"
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
Object schema definition, including properties and associations.
Defines a new object type, its properties, and associations.
Associations defined for this object type.
Singular and plural labels for the object. Used in CRM display.
Show child attributes
{
"plural": "My objects",
"singular": "My object"
}A unique name for this object. For internal use only.
Properties defined for this object type.
Show child attributes
The names of properties that should be required when creating an object of this type.
Determines if the object type can include properties that are marked as sensitive.
A brief explanation of the object type.
The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type.
Names of properties that will be indexed for this object type in by HubSpot's product search.
The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type.
successful operation
Defines an object schema, including its properties and associations.
Associations defined for a given object type.
Show child attributes
A unique ID for this schema's object type. Will be defined as {meta-type}-{unique ID}.
Singular and plural labels for the object. Used in CRM display.
Show child attributes
{
"plural": "My objects",
"singular": "My object"
}A unique name for the schema's object type.
Properties defined for this object type.
Show child attributes
The names of properties that should be required when creating an object of this type.
When the object schema was created.
An assigned unique ID for the object, including portal ID and object name.
The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type.
Names of properties that will be indexed for this object type in by HubSpot's product search.
The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type.
When the object schema was last updated.
Was this page helpful?