List Contacts
GET
/contactsRetrieve a paginated list of contacts.
Parameters
| Parameter | Default | Values / Description |
|---|---|---|
page[size] | 50 | Maximum number of results per page |
page[number] | 1 | Page number |
Fields marked with * are required.
Request
js
import Confetti from 'confetti'
const confetti = new Confetti({ apiKey: 'your-key' })
const contacts = await confetti.contacts.findAll({
page: { size: 10, number: 1 },
})sh
curl "https://api.confetti.events/contacts" \
-H "Authorization: apikey your-key"Response
ts
interface Contact {
id: number
firstName: string
lastName: string
email: string
phone: string
token: string
status: string
comment: string
lastSeen: Date
deletionRequestedAt: Date
createdAt: Date
updatedAt: Date
organisationId: number
company: string
}json
[
{
"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"
},
{
"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"
}
]json
{
"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"
}
},
{
"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"
}
}
]
}