Update a contact

Updates the specified contact by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

🚧

Note

Contacts that return "Editable": "true" can have any parameter updated. Contacts that return "Editable": "false" can only have "Labels" updated.

Parameters


FirstName optional

The first name for this contact.


LastName optional

The last name for this contact.


EmailAddress optional

The email address for this contact.


Title optional

A title for this contact.


ProfileImageUrl optional

The URL location of an image file to use as the profile image for this contact. Can't be used if using ProfileImageFile.


ProfileImageFile optional

Name of the image file to upload as the profile image for this contact. Including this parameter requires using Content-Type: multipart/form-data and an additional parameter that specifies the location to this file. See the cURL (Form Data) example. Can't be used if using ProfileImageUrl instead.


WorkPhoneNumber optional

The contact's work phone number. Requires WorkPhoneNumberCountry if updated.


WorkPhoneNumberCountry required by WorkPhoneNumber

Two letter country code for the contact's work phone number. See ISO 3166.


CellphoneNumber optional

The contact's cellphone number. Requires CellphoneNumberCountry if updated.


CellphoneNumberCountry required by CellphoneNumber

Two letter country code for the contact's cellphone number. See ISO 3166.


LabelsAdd optional

A comma-separated string of labels that will be added to this contact.


LabelsRemove optional

A comma-separated string of labels that will be removed to this contact.


AccountsAdd optional

A comma-separated string of the partner account Id values that will be added to this contact.


AccountsRemove optional

A comma-separated string of the partner account Id values that will be removed from this contact.

Returns


Returns the status of the request and the URI of the newly updated contact. Returns an error if update parameters are invalid or the contact isn't editable.

Example Request


curl 'https://api.impact.com/Advertisers/<AccountSID>/Campaigns/1000/Contacts/2750' \
  -X PUT \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'FirstName=Road' \
  -d 'LastName=Runner' \
  -d 'Title=Acme Ambassador' \
  -d 'ProfileImageUrl=https://www.example.com/images/roadrunner.jpg' \
  -d 'WorkPhoneNumberCountry=US' \
  -d 'WorkPhoneNumber=8051234567' \
  -d 'CellphoneNumberCountry=US' \
  -d 'CellphoneNumber=8059876543' \
  -d 'LabelsAdd=Acme Contact,Influencer' \
  -d 'LabelsRemove=Affiliate' \
  -d 'AccountsAdd=10000,10001' \
  -d 'AccountsRemove=99999'
curl 'https://api.impact.com/Advertisers/<AccountSID>/Campaigns/1000/Contacts/2750' \
  -X PUT \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'FirstName=Road' \
  -F 'LastName=Runner' \
  -F 'Title=Acme Ambassador' \
  -F 'ProfileImageFile=image.jpg' \
  -F 'image.jpg=@"/path/to/an/image.jpg"' \
  -F 'WorkPhoneNumberCountry=US' \
  -F 'WorkPhoneNumber=8051234567' \
  -F 'CellphoneNumberCountry=US' \
  -F 'CellphoneNumber=8059876543' \
  -F 'LabelsAdd=Acme Contact,Influencer' \
  -F 'LabelsRemove=Affiliate' \
  -F 'AccountsAdd=10000,10001' \
  -F 'AccountsRemove=99999'

Example Response


{
  "Status": "OK",
  "Uri": "Advertisers/<AccountSID>/Campaigns/1000/Contacts/2750"
}