Problem with email adress validation "EMAIL1 Email Address is invalid"

​Hi,

i have a problem with the create/update contact REST webservice.
The result ist a invalid email adress for “felipe.mejia@castor.com.co”, but i can create a contact with this email adress with the GUI and i think this is a valid adress.

Is here a problem in the REST webservice?

Best regards,
Dominik

Hi @Dominik_Klein,
I haven’t yet been able to reproduce the issue you’re having. From the tests I’ve done the email address you provided should be valid. I’ve tested this on POST, PUT, and PATCH. Here’s an example using POST /contact:

{
    "given_name": "Test",
    "family_name": "Tester",
    "email_addresses": [{
        "email": "felipe.mejia@castor.com.co",
        "field": "EMAIL1"
    }]
}

Perhaps if you give us the request you’re trying to send it may be easier for us to determine why you’re getting that message.

1 Like

Hi, this is my request (/contacts PUT):

  'company' => {
    'company_name' => '​​Castor. Consultorías y Software en Servicios',
    'id' => '0'
  },
  'custom_fields' => [
    {
      'content' => 'English',
      'id' => '2'
    }
  ],
  'duplicate_option' => 'Email',
  'email_addresses' => [
    {
      'email' => '​felipe.mejia@castor.com.co',
      'field' => 'EMAIL1'
    }
  ],
  'family_name' => 'Mejia',
  'given_name' => 'Felipe',
  'job_title' => '​Director de operaciones',
  'opt_in_reason' => 'Customer opted-in through otrs portal'

and this is the response:

{"message":"EMAIL1 Email Address is invalid"}

Ok, i think it is related to my code, because at a other place it works.