When using HubSpot's search endpoint, I always convert datetimes to milliseconds and pass the milliseconds as strings in the filters, similar to the example below taken directly from HubSpot's documentation here: https://developers.hubspot.com/docs/guides/api/crm/search
curl https://api.hubapi.com/crm/v3/objects/tasks/search \
--request POST \
--header "Content-Type: application/json" \
--header "authorization: Bearer YOUR_ACCESS_TOKEN" \
--data '{
"filterGroups":[{
"filters":[
{
"propertyName":"hs_lastmodifieddate",
"operator":"BETWEEN",
"highValue": "1642672800000",
"value":"1579514400000"
}
]
}]
}'