// You can find your project ID in the Overview tab of any Integration
// Authenticate the user
paragon.authenticate(<ProjectId>, <UserToken>);
// Create a contact
paragon.request("close", "/contact", {
method: "POST",
body: {
"lead_id":"lead_QyNaWw4fdSwxl5Mc5daMFf3Y27PpIcH0awPbC9l7uyo",
"name":"John Appleseed",
"title":"CEO",
"phones":[
{"phone":"9045551234","type":"mobile"}
],
"emails":[
{"email":"john@example.com","type":"office"}
],
"urls":[
{"url":"http://twitter.com/google/","type":"url"}
],
}
});
// Create a lead
paragon.request("close", "[relative URL]", {
method: "POST",
body {
"name": "Example Company",
"url": "http://company.domain.com/",
"description": "A company",
"status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
"contacts": [
{
"name": "Gob",
"title": "Sr. Vice President",
"emails": [
{
"type": "office",
"email": "gob@example.com"
}
],
"phones": [
{
"type": "office",
"phone": "8004445555"
}
]
}
]
}
});
// Get all opportunities
paragon.request("close", "/opportunity", {
method: "GET"
});