Skip to content

Instantly share code, notes, and snippets.

@jbender
Created April 5, 2016 17:55
Show Gist options
  • Save jbender/0a023f3c2fbe93dde3d56528be223359 to your computer and use it in GitHub Desktop.
Save jbender/0a023f3c2fbe93dde3d56528be223359 to your computer and use it in GitHub Desktop.
Getting Started with Contactually API v2 - cURL
curl https://api.contactually.com/v2/me \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
# First let's add the contact
# Take note of the ID given in response
curl https://api.contactually.com/v2/contacts \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-X POST \
-d '{ "data": { "first_name": "Jonathan", "last_name": "Bender", "email": "[email protected]" } }'
# Let's get a list of all the buckets on the account
# Pick one of the returned buckets and note the ID
curl https://api.contactually.com/v2/buckets \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
# Put the contact into the selected bucket
curl https://api.contactually.com/v2/contacts/CREATED_CONTACT_ID/buckets \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-X POST \
-d '{ "data": [{ "id": "BUCKET_ID" }] }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment