Hey @alexluong1
Closing the loop on this one. I created a custom `date` property using the Properties API (this part can be done in-app as well) and successfully updated it (property itself) to be a datetime `type`.
Here’s my quick test:
Create the Property
Request
curl --request POST \
--url https://api.hubapi.com/crm/v3/properties/0-1 \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"hidden": false,
"displayOrder": 2,
"description": "string",
"label": "Date 2",
"type": "date",
"groupName": "contactinformation",
"name": "date_2",
"fieldType": "date",
"formField": false,
"hasUniqueValue": false,
"externalOptions": false
}'
Response
HTTP 201
{
"updatedAt": "2024-05-28T20:38:09.910Z",
"createdAt": "2024-05-28T20:38:09.910Z",
"name": "date_2",
"label": "Date 2",
"type": "date",
"fieldType": "date",
"description": "string",
"groupName": "contactinformation",
"options": [],
"createdUserId": "10233975",
"updatedUserId": "10233975",
"displayOrder": 2,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false,
"hidden": false,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": false,
"readOnlyValue": false
},
"formField": false,
"dataSensitivity": "non_sensitive"
}
Update the property type via an API call
Request
curl --request PATCH \
--url https://api.hubapi.com/crm/v3/properties/0-1/date_2 \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"groupName": "contactinformation",
"hidden": false,
"displayOrder": 2,
"description": "string",
"type": "datetime",
"fieldType": "date",
"formField": false
}'
Response
HTTP 200
{
"updatedAt": "2024-05-28T20:38:09.910Z",
"createdAt": "2024-05-28T20:38:09.910Z",
"name": "date_2",
"label": "Date 2",
"type": "datetime",
"fieldType": "date",
"description": "string",
"groupName": "contactinformation",
"options": [],
"createdUserId": "10233975",
"updatedUserId": "10233975",
"displayOrder": 2,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false,
"hidden": false,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": false,
"readOnlyValue": false
},
"formField": false,
"dataSensitivity": "non_sensitive"
}
I hope this helps get folks moving forward! — Jaycee