Form API only allows subnetwork IPs



I’m trying to store user IPs with the Form API from server side. I’ve been able to do it, sending hs_context with ipAddress attribute, and contact gets updated… but only if ipAddress belongs to my server network. I’d like to send user IP, which I know, but as soon as I use his IP, the submission won’t change user IP (even though form submission is registered).

As contact ipaddress is read-only, I assume that hs_context.ipAddress should allow random IPs to be assigned to users.


Forms API does not update the correct User IP Address

Hi @juanignaciosl

The ipAddress in hs_context should accept any IP address, and in fact we wouldn’t have a way to limit it to specific domains for a portal.

Do you have an example of the POST data you’re using? If there’s a problem with the ipAddress in the submission data, we grab the IP of the system making the request, so if you’re always seeing your server IP then it’s likely that there’s a formatting issue with the data.


Sure. I’ve reproduced the problem with plain cURL. These next submissions are registered as form submissions, but only the first one actually changes the form. I’ve slightly changed the first, working IP, the form and the repo ids, but I’ve kept the IP that doesn’t work:

curl -X POST -d "{\"ipAddress\":\"\"}"

curl -X POST -d "{\"ipAddress\":\"\"}"

If you need the actual requests please write to me.



The value of the hs_context field needs to be URL encoded, and cURL may not be handling that automatically.

curl -X POST -d ""


I can’t understand what’s going on here. I’ve resumed this task today. After reading your comment I run the curl command that didn’t work previously, and it did work (10/13/2016 3:04 PM). Since then I’ve been struggling to replicate the exact encoding from Ruby without success. Just before giving up, I retried the exact command that worked today and it didn’t work. Could we move this discussion to private Hubspot support so I can give you the exact data for you to check it, please?

PS: in this context, “works” means “form submission was received and contact IP was updated”, and “won’t work” means “although form submission was received, contact IP was not updated”.


I’ll message you directly.


Much appreciated, thank you


I’ve sent a couple of private messages. The exact curl request works once and stops working soon. It makes testing impossible, I can’t understand what’s going on here.


Did you find a solution to this problem? I too am facing this same issue with client Ip Address not getting updated.

I noticed that it uses my ISP router IP and not the IP address I am passing in the hscontext