Update contact
To update a contact, you must pass either the contact's email address or user ID, and any custom fields you want to update. Note that the custom fields must already have been created for the site's contacts in the Loopbear dashboard.
[PUT] /v1/contacts/update
Request
Body
user_emailstringrequiredThe email address of the contact.
user_idstringThe user ID of the contact. Note that if you are not passing user_email, this field is required.
Custom fields
You can pass any custom fields you want to associate with the contact as long as they are not the reserved user_email
or user_id
keys. These fields can be used to store additional information about the contact.
For example, first_name
and last_name
are custom fields here.
{
"user_email": "johndoe@gmail.com",
"first_name": "John",
"last_name": "Doe"
}
Example request
curl -X PUT https://www.loopbear.com/api/v1/contacts/update \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_SECRET_KEY" \
-d '{
"user_email": "johndoe@gmail.com",
"first_name": "John",
"last_name": "Doe"
}'