Skip to content

Instantly share code, notes, and snippets.

curl https://vrapi.verticalresponse.com/api/v1/contacts
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc"
-H "Content-Type:application/json"
--request POST --data
'{"email":"albusd@verticalresponse.com","first_name":"Albus"}'
@nivikumar
nivikumar / Creating Contact.rb
Last active August 29, 2015 13:56
Creating a Contact in VR using Ruby code
require 'contact'
VerticalResponse::API::Contact.create(
{
:email => 'albusd@verticalresponse.com',
:first_name => 'Albus',
:last_name => 'Dumbledore'
}
)
@nivikumar
nivikumar / Read Contact
Last active August 29, 2015 13:56
Retrieve Contact Details in VR
curl https://vrapi.verticalresponse.com/api/v1/contacts/1099513934856
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc" | python -mjson.tool
@nivikumar
nivikumar / Creating a list
Last active August 29, 2015 13:56
Curl call to create a list
curl https://vrapi.verticalresponse.com/api/v1/lists
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc"
-H "Content-Type:application/json"
--request POST --data '{"name":"Dumbledore Army List"}'
@nivikumar
nivikumar / List Read
Last active August 29, 2015 13:56
Reading the details of a list.
curl https://vrapi.verticalresponse.com/api/v1/lists/1099511658997?type=all
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc" | python -mjson.tool
@nivikumar
nivikumar / Adding Contact to List
Last active August 8, 2022 13:38
Adding a contact to a list
curl https://vrapi.verticalresponse.com/api/v1/lists/1099511658997/contacts
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc"
-H "Content-Type:application/json"
--request POST --data '{"email":" sblack@test.com "}'
@nivikumar
nivikumar / Adding Contact to a List - Creating Contacts.json
Last active August 29, 2015 13:56
Creating a new contact to a list by adding a contact that does not exist already
curl https://vrapi.verticalresponse.com/api/v1/lists/1099511658997/contacts
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc"
-H "Content-Type:application/json"
--request POST --data '{"email":"fweasley@verticalresponse.com", "first_name":"Fred", "last_name":"Weasley"}'
@nivikumar
nivikumar / Creating an Email.json
Last active August 29, 2015 13:56
Creating an email
curl https://vrapi.verticalresponse.com/api/v1/messages/emails
-H "Content-Type:application/json"
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc"
--request POST --data '{"name":"My Email Campaign for January",
"subject":"Exciting new deals in January","message":"Our inventory is overstock and now half price.",
"company":"My Company",
"from_address":info@mycompany.com,
"from_label":"My Company",
"message":"We have lots of great stuff for sale now…",
"postal_address":"1234 Main Street. Seattle WA."
@nivikumar
nivikumar / Launching an Email
Last active August 29, 2015 13:56
Sending an email to a list
curl https://vrapi.verticalresponse.com/api/v1/messages/emails/1099511656162
-H "Authorization: Bearer tndttwx95dsdfsfsfskvc"
-H "Content-Type:application/json"
--request POST --data '{"list_ids":["1099511658955"]}'
@nivikumar
nivikumar / LaunchingEmail.rb
Created February 22, 2014 20:41
Launching an email (POST request to *{{ API root }}/messages/emails/{{ email ID }}*)
require 'email'
email = VerticalResponse::API::Email.find(<Email ID>)
email.launch(
{
:list_ids => [ <List IDs to send email to> ]
}
)