PUT
/
v1
/
contacts
/
update
curl --request PUT \
  --url https://app.loops.so/api/v1/contacts/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "source": "<string>",
  "subscribed": true,
  "userGroup": "<string>",
  "userId": "<string>"
}'
{
  "success": true,
  "id": "id_of_contact"
}

Update an existing contact by sending a request containing contact properties.

This endpoint will create a contact if a matching contact does not already exist in your audience.

If you want to update a contact’s email address, the contact will first need a userId value. You can then make a request containing the userId field along with an updated email address.

Request

Body

email
string
required

The contact’s email address. If there is no contact with this email, one will be created.

firstName
string

The contact’s first name.

lastName
string

The contact’s last name.

source
string

A custom source value to replace the default “API”. Read more

subscribed
boolean

Whether the contact will receive campaign and loops emails. Read more

userGroup
string

You can use groups to segment users when sending emails. Currently, a contact can only be in one user group. Read more

userId
string

A unique user ID (for example, from an external application). Read more

Custom properties

You can also include custom contact properties in your request body. Custom properties can be of type string, number, boolean or date (see allowed date formats).

For example, plan and favoriteColor here are custom properties:

{
  "email": "[email protected]",
  "plan": "pro",
  "favoriteColor": "Blue"
}

To empty or reset the value of a property, send a null value.

Response

Success

success
boolean
required
id
string
required

The ID of the contact.

Error

success
boolean
required
message
string
required

An error message.