Find one
- JavaScript
- curl
const Confetti = require('confetti')
const confetti = new Confetti({ apiKey: 'your-key' })
const contact = await confetti.contacts.find(2)
Result
{
"id": "588032",
"firstName": "Jonny",
"lastName": "Stromberg",
"email": "jonny@foo.bar",
"phone": "+46701122333",
"token": "gsd00876ec00cdef2233b4ace769c54sdf46",
"status": "active",
"comment": "Hey comment",
"lastSeen": "2022-01-05T15:33:13.171Z",
"createdAt": "2022-01-05T15:33:13.171Z",
"updatedAt": "2022-01-05T15:33:13.171Z",
"organisationId": 57,
"company": "Company AB",
"type": "contact",
"meta": {
"webhookType": "contact.created"
}
}
curl "https://api.confetti.events/contacts/2"
-H "Authorization: apikey your-key"
Result
{
"data": {
"id": "588032",
"type": "contact",
"attributes": {
"firstName": "Jonny",
"lastName": "Stromberg",
"email": "jonny@foo.bar",
"phone": "+46701122333",
"token": "gsd00876ec00cdef2233b4ace769c54sdf46",
"status": "active",
"comment": "Hey comment",
"lastSeen": "2022-01-05T15:33:13.171Z",
"createdAt": "2022-01-05T15:33:13.171Z",
"updatedAt": "2022-01-05T15:33:13.171Z",
"organisationId": 57,
"company": "Company AB"
}
},
"meta": {
"webhookType": "contact.created"
}
}