Answered

Unable to POST Contact using email

  • 23 April 2024
  • 1 reply
  • 13 views

I’m currently trying to POST a Contact with just an email, and am currently being met with a 400 error:

Request body:

{"name": "Kim Chuc", "email": "email@gmail.com"}

Response body:

{
"type": "error.list",
"request_id": "0004n8c4t4e6a3olv82g",
"errors": [
{
"code": "invalid_document",
"message": "either_email_or_user_id_present validation failed"
}
]
}

 

Based on the docs, email is the only required field to POST a Contact and I’ve double checked to make sure the email doesn’t already exist:

 

Has anyone ever come across this issue before? 

icon

Best answer by Jacob Cox 28 April 2024, 23:47

View original

1 reply

Userlevel 4
Badge +5

Hey @kmchuc !

I’m not able to replicate this behavior. When I try creating a Contact with just a name and an email it creates it for me. Are you using version 2.10 of our REST API to make your call? Also are you passing the correct headers as shown here?

 

Reply