Adding a Contact to a List
By default, VerticalResponse creates and assigns a Master list (aka "All Contacts" list) to each user. When a contact is created, the contact is added to the user’s master list. A contact can also be added to a custom list, though the contact will always be part of the user’s Master list.
Adding a contact to a list involves performing a POST operation on the endpoint of the contacts for a specific list passing in a name/value URL parameter where the name is “email” and the “value” is the email address of an existing contact. The following example snippet shows the addition of the existing contact John Smith to the existing list created previously:
The response from the server is as follows:
This endpoint also allows for the creation of a new contact and the addition of that new contact to the list, all in one operation. This is accomplished by passing in a new email address for the value, as well as any additional contact attributes to store for the contact (see the API reference guide).
For example, the following snippet shows the creation of a new contact called Maggy Smith which is then added to the existing list:
Note: if additional parameters such as first_name etc. are passed in for an existing contact, the operation will fail.