Many of the HubSpot "date" properties, including createdate and lastmodifieddate, are calculated by the system and cannot be set or updated directly via an API. HubSpot will automatically fill these properties when a contact record is created. For additional insight, this article lists the definitions of all default contact properties.
If you wish to sync historical date values to new contact records, you must use custom object properties.
Can't edit or update or create any of the date property of a contact through api
SOLVE
Hey @varadan, Working with Isaac here, this actually seemed to be a temporary glitch where I was able to update the deal record's last modified date, but can no longer do so, and get the same error as Isaac does. I would not expect this field to be modified, since it's a default HubSpot property that gets set by the system.
This property can not be altered via API
I apologize for giving conflicting information, but the hs_lastmodifieddate for deals and lastmodifieddate are not editable fields, and they get set whenever there's an update to a deal, contact, or company by the system.
Can't edit or update or create any of the date property of a contact through api
SOLVE
It's worth noting that my explanation above applies to contacts. As @Connor_Barley found in your other topic, some properties like a deal'shs_lastmodifieddate property can be updated via the API.
If you try to do the same for contact properties, you will get the following response:
{
"status": "error",
"message": "Property values were not valid",
"correlationId": "372c5906-ea67-4fc1-be08-eac27f1ceb11",
"validationResults": [
{
"isValid": false,
"message": "\"lastmodifieddate\" is a read only property; its value cannot be set.",
"error": "READ_ONLY_VALUE",
"name": "lastmodifieddate"
},
{
"isValid": false,
"message": "\"createdate\" is a read only property; its value cannot be set.",
"error": "READ_ONLY_VALUE",
"name": "createdate"
}
],
"requestId": "632a3aa2312ed5853e604ecf47706656"
}
Many of the HubSpot "date" properties, including createdate and lastmodifieddate, are calculated by the system and cannot be set or updated directly via an API. HubSpot will automatically fill these properties when a contact record is created. For additional insight, this article lists the definitions of all default contact properties.
If you wish to sync historical date values to new contact records, you must use custom object properties.