using the rest API, I am able to change 'normal' fields with a single occurence. But I can't figure out what I should do to change the first email addressl.

Civicrm only accepts post requests to do a database change. If I put in the post parameter hash something like

{ :contact_type => 'Individual',
:id => 14330,
:job_title => 'workaholic',
'email[0][email]' => '[email protected]',
:entity => 'Contact' }))

the corresponding record is changed (job title is changed) and the email address is added. But not replaced. Do I miss some required parameter to make this work?

thanks in advance

1 Answer 1


This can best be done through the Email object. Find the collection of Email objects having contact_id 14330. Take the first object and use its id to change it:

issue a post request with

{ :entity=> 'Email',
   :id=> *EMAILID*,
   :email=> '[email protected]',
   :action => 'create'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.