APIs & Integrations

JNagel
Member

API Post Request Add Contact not working

SOLVE

Hi out there,

 

I just connected my Wordpress fluent form with hubspot. The plugin is fetching the list and the attributes, but new form submissions are not added to the list.

 

I am not sure if the post request is not right or if some settings on hubspot or not right.

 

Here is the P ost request that received by hubspot but not creating a new contact (private information is XXXed out):

 

POST /contacts/v1/contact/

User-Agent: WordPress/5.9.3; https://XXX.io
CDN-Loop: cloudflare; subreqs=1
Accept-Encoding: gzip
CF-Connecting-IP: 35.207.181.133
True-Client-IP: XXX
X-HubSpot-Trace: XXX
X-HubSpot-Correlation-Id: XXX
X-HS-Internal-Request: 1
Content-Length: 533
X-Real-IP: XXX
Content-Type: application/json
cf-worker: hubapi.com
CF-Ray: XXX
CF-IPCountry: DE
Accept: */*
X-Forwarded-Proto: https
Connection: close
Referer: https://api.hubapi.com/contacts/v1/contact/?hapikey=XXX&properties%5B0%5D%5Bproperty%5D=email&am...
X-Request-Start: 1651156140.604
X-HS-Internal-User-Request: 0
Host: api.hubapi.com
CF-Visitor: {"scheme":"https"}
X-HS-User-Request: 0
CF-EW-Via: 15
X-Forwarded-Port: 443
X-Amzn-Trace-Id: Root=XXX
X-Forwarded-For: 35.207.181.133, 172.70.250.228, 35.207.181.133
X-Scheme: https

 

Any ideas how to get this working?

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

API Post Request Add Contact not working

SOLVE

Hi @JNagel 

 

I would advise against using the contact API when a form is submitted. It is better to use non-hubspot form tracking or use the Form Submission API because the also stores the value of the HubSpot UTK cookie.

If you do use the Contact API, you will miss important data like the original source or pages viewed etc.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
1 Reply 1
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

API Post Request Add Contact not working

SOLVE

Hi @JNagel 

 

I would advise against using the contact API when a form is submitted. It is better to use non-hubspot form tracking or use the Form Submission API because the also stores the value of the HubSpot UTK cookie.

If you do use the Contact API, you will miss important data like the original source or pages viewed etc.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes