Contact API Update
Update a contact with the API
Marcel Ursprung avatar
Written by Marcel Ursprung
Updated over a week ago

Visit api.envoke.com 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
URL: https://e1.envoke.com/v1/contacts/{CONTACT_ID}

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"

https://e1.envoke.com/v1/contacts/1234

{
"province" : "MB",
"city" : "Winnipeg"
}
curl -X PATCH -u API_ID:API_KEY -d "{\"province\":\"MB\",\"city\":\"Winnipeg\"}" "https://e1.envoke.com/v1/contacts/1234"

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.

https://e1.envoke.com/v1/contacts

{
   "email" : "example@api.com",
"first_name" : "UPDATED"
}
curl -X PATCH -u API_ID:API_KEY -d "{\"email\":\"example@api.com\",\"first_name\":\"UPDATED\"}" "https://e1.envoke.com/v1/contacts"
Did this answer your question?