Calling the Forms API via cron job


Since I’m calling the API from a cron process, I don’t have access to the hutk cookie, should I simply skip sending the hs_context variable and the contact properties will be updated correctly?



@favrik The hs_context is an optional variable so you can skip it. Why is this being sent via a cron job? Usually people find the hs_context to be an important parameter as it can tie the form to a page and to a user token.


Hi @pmanca

I’m sending abandoned cart notifications via cron, and updating a few contact properties. Probably, need to rethink how to update those contacts while sending the hs_context variable, to get the ideal usage.

By the way, is sending an empty hutk (within hs_context) technically the same as NOT sending the hutk variable? To rephrase if I send hutk = ''; that’s the same as simply not sending that variable because the cookie is not available? Can this cause contact properties to be overwritten?



@favrik I would think it is the same as not sending it at all. I would just make sure you format it as

hutk = {} 

as it is an object and not a string.