Getting 404 status on createOrUpdate/email calls the last couple days


#1

Hi,

The last couple days it looks like all of my calls to
https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/
are failing with a 404 return status.

Example request with some data scrubbed:

{ “properties”: [ { “property”: “email”, “value”: "test@gmail.com" } ,{ “property”: “firstname”, “value”: “Mark” } ,{ “property”: “lastname”, “value”: “Test” } ,{ “property”: “organization_name”, “value”: “Mark Test” } ,{ “property”: “address”, “value”: “123 Main Street” } ,{ “property”: “city”, “value”: “Lincoln” } ,{ “property”: “state”, “value”: “NE” } ,{ “property”: “company”, “value”: “Mark Test” } ,{ “property”: “phone”, “value”: “4025551212” } ,{ “property”: “zip”, “value”: “68501” } ,{ “property”: “organization_id”, “value”: “15441” } ,{ “property”: “start_30_day_trial”, “value”: “1513814400000” } ,{ “property”: “ministry_area”, “value”: “Small Group Director or Pastor” } ,{ “property”: “looking_for”, “value”: “409113” } ,{ “property”: “referral_method”, “value”: “Referred by a friend” } ,{ “property”: “referral_code”, “value”: “John Consumer” } ,{ “property”: “website”, “value”: “www.google.com” } ,{ “property”: “database_size”, “value”: “0” } ,{ “property”: “initial_referral_url”, “value”: “https://www.google.com/” } ] }

This just returns a status of 404 with no response data.

This started happening yesterday and otherwise these API calls have been used daily for many months without incident. Let me know if you need anything else from me.

Thanks, Mark


#2

Hi @markcteams,

What is the full URL you’re making that request to? That endpoint requires the email address be in the URL as well, like this: https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/test@gmail.com


#3

Hi Derek,

I am including the email in the URL and the apikey (removed from link below). Below is another example URL that just failed and the json body is of course different but of the same structure. I would expect to get back some error if it didn’t like the json or even if the apikey was bad etc.

https://api.hubapi.com/contacts/v1/contact//createOrUpdate/email/mark@churchteams.com/?hapikey=

In what cases should a 404 status be returned with no response data?

Thanks, Mark


#4

Hi Derek,

It looks like a URL constant was changed in my code which doubled the / before the createOrUpdate portion so that fixed it. Thanks for prompting for the URL as that pointed me right to it!

Thanks, Mark


#5

I m getting 404 randomly while using https://api.hubapi.com/contacts/v1/contact/email/ api..... 404{"status":"error","message":"resource not found","correlationId":"xxxxxxxxxxxxxxxxxx","requestId":"xxxxxxxxxxxxxxxxx"}


#6

HI @Ankur_Saldhi,

That URL appears to be our 'Update an existing contact by email' endpoint, which will return a 404 if no contact record is found for a particular email. It sounds like you want the 'Create or update a contact' endpoint (POST /contacts/v1/contact/createOrUpdate/email/:contact_email)

Also, it's usually better to create a new thread (rather than post on an old thread). Creating your own thread keeps things cleaner and helps with troubleshooting your specific issue.