Created
April 5, 2016 17:55
-
-
Save jbender/0a023f3c2fbe93dde3d56528be223359 to your computer and use it in GitHub Desktop.
Getting Started with Contactually API v2 - cURL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://api.contactually.com/v2/me \ | |
-H "Authorization: Bearer YOUR_TOKEN_HERE" \ | |
-H "Content-Type: application/json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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