// You can find your project ID in the Overview tab of any Integration
// Authenticate the user
paragon.authenticate(<ProjectId>, <UserToken>);
// Create a Contact
await paragon.request("zendesksell", "/contacts", {
method: "POST",
body: {
"contact_id": 1,
"name": "Mark Johnson",
"first_name": "Mark",
"last_name": "Johnson",
"title": "CEO",
"description": "I know him via Tom",
"industry": "Design Services",
"website": "http://www.designservice.com",
"email": "[email protected]",
"phone": "508-778-6516",
"mobile": "508-778-6516",
"fax": "+44-208-1234567",
"twitter": "mjohnson",
"facebook": "mjohnson",
"linkedin": "mjohnson",
"skype": "mjohnson",
"address": {
"line1": "2726 Smith Street",
"city": "Hyannis",
"postal_code": "02601",
"state": "MA",
"country": "US"
},
"tags": [
"contractor",
"early-adopter"
],
"custom_fields": {
"referral_website": "http://www.example.com"
}
}
}
});
// Create a Lead
await paragon.request("zendesksell", "/leads", {
method: "POST",
body: {
"first_name": "Mark",
"last_name": "Johnson",
"organization_name": "Design Services Company",
"source_id": 10,
"title": "CEO",
"description": "I know him via Tom",
"industry": "Design Services",
"website": "http://www.designservice.com",
"email": "[email protected]",
"phone": "508-778-6516",
"mobile": "508-778-6516",
"fax": "+44-208-1234567",
"twitter": "mjohnson",
"facebook": "mjohnson",
"linkedin": "mjohnson",
"skype": "mjohnson",
"address": {
"line1": "2726 Smith Street",
"city": "Hyannis",
"postal_code": "02601",
"state": "MA",
"country": "US"
},
"tags": [
"important"
],
"custom_fields": {
"known_via": "tom"
}
}
});
// Get all Deals
await paragon.request("zendesksell", "/deals", {
method: "GET"
})