APIs & Integrations

jarlewis
Member

400 Response - Contacts

We have an OAuth integration that posts to Contacts API when a new tracked call completes. For a single customer, we are getting 400 responses on all of our POST attempts. Similar requests for other customers are succeeding, so I'm not sure if there is an issue with the Contact property setup that is causing this particular integration to fail. Could you please advise? Hub ID and example failing request below
 

https://api.hubapi.com/contacts/v1/contact
"hub_id"=>"6580897
{:properties=>[{"property"=>"phone", "value"=>"+44 1293 344581"}, 
{"property"=>"firstname", "value"=>"CrawleyGb"}, {"property"=>"city", "value"=>"Crawley"},
{"property"=>"caller_id", "value"=>"Crawley,Gb"}, {"property"=>"email", "value"=>"441293344581@call.com"},
{"property"=>"source", "value"=>"Flyer Start 2020"}, {"property"=>"first_source_contacted", "value"=>"Flyer Start 2020"},
{"property"=>"first_tracking_number_contacted", "value"=>"+44 330 058 9395"}, {"property"=>"last_source_contacted", "value"=>"Flyer Start 2020"},
{"property"=>"last_tracking_number_contacted", "value"=>"+44 330 058 9395"}, {"property"=>"tracking_number_company_name", "value"=>"Low Cost E-Learning"}]}
0 Upvotes
1 Reply 1
IsaacTakushi
HubSpot Employee
HubSpot Employee

400 Response - Contacts

Hi, @jarlewis.

 

It looks like you're attempting to create contacts with this endpoint. Is that correct?

 

Looking into account 6580897's enumeration property source, I see no options with the internal name Flyer Start 2020.

 

When testing in my own account, I confirmed that trying to send a POST request containing non-existent enumeration values throws a 400 INVALID_OPTION error.

 

That seems to be what's going on here. Could you add an option for Flyer Start 2020 in the UI or via the API before trying with this request again?

 

If you still encounter a 400 error, please share the full error message so that we can troubleshoot further.

Isaac Takushi

Associate Certification Manager
0 Upvotes