Skip to main content
Answered

Unable to POST Contact using email

  • April 23, 2024
  • 1 reply
  • 48 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? 

Best answer by Jacob Cox

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?

 

View original
Did this topic help you find an answer to your question?

1 reply

Jacob Cox
Intercom Team
Forum|alt.badge.img+5
  • Sr. Technical Support Engineer
  • 441 replies
  • Answer
  • April 28, 2024

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?

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings