curl --request POST \
--url 'https://api.hubapi.com/crm/v3/schemas' \
--header 'content-type: application/json' \
--header 'authorization: Bearer $TOKEN' \
--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"
}'
{"status":"error","message":"The scope needed for this API call isn't available for public use. If you have questions, contact support or post in our developer forum.","correlationId":"96e40266-00fd-4597-9bff-94bc4a9bc079","links":{"support":"https://help.hubspot.com/","forum":"https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations"},"category":"MISSING_SCOPES"}⏎
The documentation at Accounts Dashboard | HubSpot actually suggests HAPI key here, which are going away in a month or so.