• Register

Creating a Contact

To create a contact using the API, perform a POST operation on the https://vrapi.verticalresponse.com/api/v1/contacts endpoint passing in the client id and access token in the header (note that these two header items are required for all API calls). For the name - value attributes, pass in a parameter named “email” with the value set to the contact’s email address, and any other name - value attributes that are to be stored for the contact at creation time (see the API reference guide for a complete list). 

The following example shows a request to create a new contact with the email address albusd@verticalresponse.com. This request includes the email and first name passed in via the respective URL parameters.

Below is the code in Ruby to create a contact in VR with custom fields "House" and "Wand Core" in addition to the standard fields.

The server will then return a response which includes the URL of the new contact, the status of the request, and the URL to the collection of contacts for the user.

The contact’s information can then be obtained at any time by performing a GET operation on the endpoint returned for the newly created contact.

The following shows an example response:

Alternatively, if the type URL parameter is included in the request and set to “all” (i.e. https://vrapi.verticalresponse.com/api/v1/contacts/1099513934863?type=all), then the server will  return all the contact’s fields including any custom fields, as shown here:

Note: the type parameter can be included in all API calls that request information, returning various levels of detail specific to each call.