APIs & Integrations

massarogi
Member

Contact Property to use for birthdate

SOLVE

We are using the hubspot API and trying to pass birthdate in, but we keep getting this error: 

 

Property "dateofbirth" does not exist";s:5:"error";s:21:"PROPERTY_DOESNT_EXIST";s:4:"name";s:11:"date

 

Property "birthday" does not exist";s:5:"error";s:21:"PROPERTY_DOESNT_EXIST";s:4:"name";s:11:"date

 

 

What property name do we need to use to pass through birthday?

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact Property to use for birthdate

SOLVE

Welcome, @massarogi.

 

Is your Hub ID 389278?

 

If so, there are no contact properties with the internal names dateofbirth or birthday in that account. Instead, I found this one, so I would try with date_of_birth.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
6 Replies 6
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact Property to use for birthdate

SOLVE

Welcome, @massarogi.

 

Is your Hub ID 389278?

 

If so, there are no contact properties with the internal names dateofbirth or birthday in that account. Instead, I found this one, so I would try with date_of_birth.

Isaac Takushi

Associate Certification Manager
0 Upvotes
maryoneill1
Member

Contact Property to use for birthdate

SOLVE

Hi Isaac,

 

Where is the field for birthday? I'd like to be able to just put in Month and Day or Month, Day and Year.

 

Mary O'Neill

maryoneill1

0 Upvotes
Mike_Eastwood
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Contact Property to use for birthdate

SOLVE

Hi @maryoneill1 

 

Beware – the default HubSpot Contact Property "Date of birth" is a line of text (so you could literally enter "My birthday" as their birthdate... not so helpful (the field is populated by Facebook... which is useful).

 

With our Birthday HubSpot Integration we create a new Date Picker Field for the "Date of Birth". We're working on a new version that has fields for Year, Month, Date.

 

In answer to your question – yes – in HubSpot you can create a Custom Property for Year, Month, Date. I would label the fields clearly so nobody accidentally uses the default field.

 

Have fun

Mike

massarogi
Member

Contact Property to use for birthdate

SOLVE

Ok this actually does not work across accounts -- as it works on our account, but when trying on another users account, it returns an error of invalid birthday.

 

The issue is that one account uses date of birth but field type is set to 'single-line text', while the other account uses date of birth but field type is set to 'datepicker'.

 

When trying to pass birthday via the API to the one set as datepicker, it returns an invalid birthday response.

 

So the question is, how do we pass date of birth via the API when two different accounts use a different field type?

0 Upvotes
Mike_Eastwood
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Contact Property to use for birthdate

SOLVE

Hi @massarogi 

 

You can create a date from the string, the other way round, if you're using the API.

 

One "gotcha" is HubSpot uses milliseconds for date objects rather than seconds.

 

https://developers.hubspot.com/docs/faq/how-should-timestamps-be-formatted-for-hubspots-apis

 

Personally I would make both fields the same data type to make life easier.

 

Mike

IsaacTakushi
HubSpot Employee
HubSpot Employee

Contact Property to use for birthdate

SOLVE

I agree with @Mike_Eastwood.

 

If you're actually creating the "birthday" contact property yourselves, then I would go with the "date picker" type.

 

If you need to check your client accounts for existing "birthday" properties, you can use this endpoint, which also returns the property's type.

Isaac Takushi

Associate Certification Manager
0 Upvotes