Form API not accepting IP values



Hey guys,

Having some trouble with the Form API adding ipAddress to contacts, and therefore the location that’s generated based on this.

I’ve removed the IP Exclusion for the test, to no avail.

When viewing the submission on the form the hutk and ipAddress are both present, with the correct formatting to match HubSpot’s, but for some reason it’s not appearing in the contact’s information - the field history lists the only change as “HubSpot Location Service” - no mention of the form API.

An example post is below (I x’d out a few characters just in case)

Any help would be much appreciated.


Hi @timsearle,

The form submission endpoint takes a POST request with the fields (including hs_context) in the POST body, not included as query parameters. Can you give me a link to an example contact so that I can look at the raw form submission?


Hi Derek,

I just did a test submission which can be found here:

Thanks for your help.


Hi @timsearle.

So it looks like you're including the IP address as it's own form field. The IP address needs to be included as a part of the hs_context field in order to be processed correctly. The hs_context field is a JSON object with submission meta info, like IP address and page name/URL. The doc below has some info on how exactly that field should be formatted/included.