contacts integration - invalid e-mails

Hi, guys. I was trying to create a new object by https://api.hubapi.com/crm/v3/objects/contacts using an invalid email, and the error message returned was:

message: ‘Property values were not valid: [{“isValid”:false,“message”:“Endereço de e-mail tb.tb@yahoo.comtttt inválido”,“error”:“INVALID_EMAIL”,“name”:“email”}]’

I know that this domains has a problem, but will this also happen with other valid domains such as @test.design, @test.vegas and others that don’t end with two or three digits??

When I apply a regex on these domains, including the invalid email in the message above, I always get a positive response, so I don’t know what the evaluation criteria is implemented by hubspot.

Hi @GdaSilvaCarlo,

HubSpot validates email addresses used for any process that would create or update a contact record. This includes using the contacts endpoints to create or update a contact as well as form submissions or events.

These processes don’t check the email address itself for validity (like an embedded form would), but rather its format. In addition to being valid according to RFC 2822, HubSpot places the following restrictions on email addresses:

Hopefully this helps in some way. For what it’s worth I was able to successfully create a contact using “POST /crm/v3/objects/contact” with email “xyz@test.design” and “abc.test.vegas”. Request information below:

REQUEST 1
POST https://api.hubapi.com/crm/v3/objects/contacts
BODY
{
 "properties": {
 "email": "xyz@test.design"
 }
}
RESPONSE
{
 "id": "251",
 "properties": {
 "createdate": "2023-08-14T09:40:21.432Z",
 "email": "xyz@test.design",
 "hs_all_contact_vids": "251",
 "hs_email_domain": "test.design",
 "hs_is_contact": "true",
 "hs_is_unworked": "true",
 "hs_lifecyclestage_lead_date": "2023-08-14T09:40:21.432Z",
 "hs_marketable_status": "false",
 "hs_marketable_until_renewal": "false",
 "hs_object_id": "251",
 "hs_object_source": "INTEGRATION",
 "hs_object_source_id": "1998344",
 "hs_pipeline": "contacts-lifecycle-pipeline",
 "lastmodifieddate": "2023-08-14T09:40:21.432Z",
 "lifecyclestage": "lead"
 },
 "createdAt": "2023-08-14T09:40:21.432Z",
 "updatedAt": "2023-08-14T09:40:21.432Z",
 "archived": false
}

REQUEST 2
POST https://api.hubapi.com/crm/v3/objects/contacts
BODY
{
 "properties": {
 "email": "abc@test.vegas"
 }
}
RESPONSE
{
 "id": "301",
 "properties": {
 "createdate": "2023-08-14T09:40:47.002Z",
 "email": "abc@test.vegas",
 "hs_all_contact_vids": "301",
 "hs_email_domain": "test.vegas",
 "hs_is_contact": "true",
 "hs_is_unworked": "true",
 "hs_lifecyclestage_lead_date": "2023-08-14T09:40:47.002Z",
 "hs_marketable_status": "false",
 "hs_marketable_until_renewal": "false",
 "hs_object_id": "301",
 "hs_object_source": "INTEGRATION",
 "hs_object_source_id": "1998344",
 "hs_pipeline": "contacts-lifecycle-pipeline",
 "lastmodifieddate": "2023-08-14T09:40:47.002Z",
 "lifecyclestage": "lead"
 },
 "createdAt": "2023-08-14T09:40:47.002Z",
 "updatedAt": "2023-08-14T09:40:47.002Z",
 "archived": false
}

I hope this is in some way helpful!