79556351

Date: 2025-04-04 23:13:59
Score: 0.5
Natty:
Report link

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"
        }
      ]
    }]
}'
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: Colin Perel