Create a contact

Creates a new contact.

Parameters


FirstName required

The first name for this contact.


LastName required

The last name for this contact.


EmailAddress required

The email address for this contact.


Accounts required

A comma-separated string of the partner account Ids that this contact is associated with.


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 submitted.


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.


CellphoneNumberCountry required by CellphoneNumber

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


Labels optional

A comma-separated string of labels for the contact.

Returns


Returns the status of the request and the URI of the newly created contact. Returns an error if create parameters are invalid or if a required parameter is missing.

Example Request


curl 'https://api.impact.com/Advertisers/<AccountSID>/Campaigns/1000/Contacts' \
  -X POST \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'FirstName=Wile' \
  -d 'LastName=Coyote' \
  -d '[email protected]' \
  -d 'Accounts=10000' \
  -d 'Title=Acme Partner Manager' \
  -d 'ProfileImageUrl=https://www.example.com/example.jpg' \
  -d 'WorkPhoneNumberCountry=US' \
  -d 'WorkPhoneNumber=8051234567'\
  -d 'CellphoneNumberCountry=US' \
  -d 'CellphoneNumber=8059876543' \
  -d 'Labels=Main Contact,Acme Partner'
curl 'https://api.impact.com/Advertisers/<AccountSID>/Campaigns/1000/Contacts' \
  -X POST \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'FirstName=Wile' \
  -F 'LastName=Coyote' \
  -F '[email protected]' \
  -F 'Accounts=10000' \
  -F 'Title=Acme Partner Manager' \
  -F 'ProfileImageFile=image.png' \
  -F 'image.jpg=@"/path/to/an/image.jpg"' \
  -F 'WorkPhoneNumberCountry=US' \
  -F 'WorkPhoneNumber=8051234567'\
  -F 'CellphoneNumberCountry=US' \
  -F 'CellphoneNumber=8059876543' \
  -F 'Labels=Main Contact,Acme Partner'

Example Response


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