Contact API Update

Update a contact with the API

Marcel Ursprung avatar
Written by Marcel Ursprung
Updated over a week ago

Visit to test APIs and get examples in 20+ languages

Update a single contact using the contact's Envoke ID or email address as the key field. Read more about the difference between various contact IDs.

Endpoint: /contacts/
HTTP method: PATCH

Replace {CONTACT_ID} with the contact's Envoke id and include the contact update object JSON in the PATCH data.

NOTE: All example below show the PATCH URL followed by the PATCH data. Each example below also includes a cURL request. Make sure to change the API_ID and API_KEY with your values.

Update a contact with the id "1234"

"province" : "MB",
"city" : "Winnipeg"
curl -X PATCH -u API_ID:API_KEY -d "{\"province\":\"MB\",\"city\":\"Winnipeg\"}" ""

Update a contact using email address

Alternatively you can update a contact by providing the email address in the PATCH JSON data. For this, just use the /v1/contacts route, the contact ID is not required.

   "email" : "",
"first_name" : "UPDATED"
curl -X PATCH -u API_ID:API_KEY -d "{\"email\":\"\",\"first_name\":\"UPDATED\"}" ""

Using a different key field

Set the 'keyfield' query parameter to 'remote_id' to be able to reference contacts for update with your own external database id using the remote_id field. The keyfield parameter can be set to one of the following options:

  • id (default)

  • email (default if id is missing)

  • remote_id

IMPORTANT: Using your own remote id as the keyfield will allow the creation of duplicate email addresses in the database with unique remote_id fields.

Note: Having duplicate emails in the database might lead to contacts receiving an email more than once.

IMPORTANT: Please contact Envoke support if you wish to use a remote_id as your keyfield so we can disable your account's email field duplicate check validation.


"remote_id" : "436D-SF92-J4G5",
"email" : "",
"first_name" : "John"
curl -X PATCH -u API_ID:API_KEY -d "{\"remote_id\":\"436D-SF92-J4G5\", \"email\":\"\",\"first_name\":\"John\"}" ""

Did this answer your question?