NAV
javascript shell

Introduction

Welcome to the Confetti API reference.

Authentication

To authorize, use this code:

const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
# With shell, you can just pass the correct header with each request
curl "https://api.confetti.events"
  -H "Authorization: apikey your-key"

Make sure to replace your-key with your API key.

Confetti uses API keys to allow access to the API. You can create a new API key via your Workspace > Settings > API & Webhooks

Confetti expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: apikey your-key

Events

Get all events


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const events = await confetti.events.findAll({
  filter: {
    signupType: 'rsvp'
  },
  page: {
    limit: 10,
    offset: 3
  }
})

[
 {
  "name": "My first event",
  "startDate": "2020-09-19T16:00:00.000Z",
  "endDate": "2020-09-19T19:00:00.000Z",
  "timeZone": "Europe/Berlin",
  "slug": "green-summer-18717b",
  "status": "open",
  "featureLevel": "business",
  "signupType": "rsvp",
  "website": "http://jonny-action.confetti.test/my-first-event",
  "email": "jonny.stromberg@gmail.com",
  "rsvpLimit": 100,
  "rsvpLeft": 85,
  "waitlisted": 0,
  "hasPassed": false,
  "createdAt": "2018-10-11T13:06:16.432Z",
  "updatedAt": "2020-03-09T20:19:40.956Z",
  "summary": "Write a three sentence pitch for your event here.",
  "timeFormat": "24",
  "locale": "en",
  "primaryColor": "#00DB7D",
  "colors": {},
  "waitlist": true,
  "location": {
   "url": "http://www.google.com/maps?q=undefined"
  },
  "id": "16500",
  "type": "event",
  "images": null
 },
 {
  "name": "My first event",
  "startDate": "2020-09-19T16:00:00.000Z",
  "endDate": "2020-09-19T19:00:00.000Z",
  "timeZone": "Europe/Berlin",
  "slug": "green-summer-18717b",
  "status": "open",
  "featureLevel": "business",
  "signupType": "rsvp",
  "website": "http://jonny-action.confetti.test/my-first-event",
  "email": "jonny.stromberg@gmail.com",
  "rsvpLimit": 100,
  "rsvpLeft": 85,
  "waitlisted": 0,
  "hasPassed": false,
  "createdAt": "2018-10-11T13:06:16.432Z",
  "updatedAt": "2020-03-09T20:19:40.956Z",
  "summary": "Write a three sentence pitch for your event here.",
  "timeFormat": "24",
  "locale": "en",
  "primaryColor": "#00DB7D",
  "colors": {},
  "waitlist": true,
  "location": {
   "url": "http://www.google.com/maps?q=undefined"
  },
  "id": "16500",
  "type": "event",
  "images": null
 }
]

curl "https://api.confetti.events/events?filter[signupType]=rsvp"
  -H "Authorization: apikey your-key"

{
 "data": [
  {
   "id": "16500",
   "type": "event",
   "attributes": {
    "name": "My first event",
    "startDate": "2020-09-19T16:00:00.000Z",
    "endDate": "2020-09-19T19:00:00.000Z",
    "timeZone": "Europe/Berlin",
    "slug": "green-summer-18717b",
    "status": "open",
    "featureLevel": "business",
    "signupType": "rsvp",
    "website": "http://jonny-action.confetti.test/my-first-event",
    "email": "jonny.stromberg@gmail.com",
    "rsvpLimit": 100,
    "rsvpLeft": 85,
    "waitlisted": 0,
    "hasPassed": false,
    "createdAt": "2018-10-11T13:06:16.432Z",
    "updatedAt": "2020-03-09T20:19:40.956Z",
    "summary": "Write a three sentence pitch for your event here.",
    "timeFormat": "24",
    "locale": "en",
    "primaryColor": "#00DB7D",
    "colors": {},
    "waitlist": true,
    "location": {
     "url": "http://www.google.com/maps?q=undefined"
    }
   },
   "relationships": {
    "images": {
     "data": null
    }
   }
  },
  {
   "id": "16500",
   "type": "event",
   "attributes": {
    "name": "My first event",
    "startDate": "2020-09-19T16:00:00.000Z",
    "endDate": "2020-09-19T19:00:00.000Z",
    "timeZone": "Europe/Berlin",
    "slug": "green-summer-18717b",
    "status": "open",
    "featureLevel": "business",
    "signupType": "rsvp",
    "website": "http://jonny-action.confetti.test/my-first-event",
    "email": "jonny.stromberg@gmail.com",
    "rsvpLimit": 100,
    "rsvpLeft": 85,
    "waitlisted": 0,
    "hasPassed": false,
    "createdAt": "2018-10-11T13:06:16.432Z",
    "updatedAt": "2020-03-09T20:19:40.956Z",
    "summary": "Write a three sentence pitch for your event here.",
    "timeFormat": "24",
    "locale": "en",
    "primaryColor": "#00DB7D",
    "colors": {},
    "waitlist": true,
    "location": {
     "url": "http://www.google.com/maps?q=undefined"
    }
   },
   "relationships": {
    "images": {
     "data": null
    }
   }
  }
 ]
}

This endoint retreives all events.

HTTP Request

GET https://api.confetti.events/events

URL Parameters

Parameter Default Values
signupType ,
type ,
Page Default Description
limit 1000 Maximum number of results
offset 0 Skip X results

Get a specific event


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const event = await confetti.events.find(2)

{
 "name": "My first event",
 "startDate": "2020-09-19T16:00:00.000Z",
 "endDate": "2020-09-19T19:00:00.000Z",
 "timeZone": "Europe/Berlin",
 "slug": "green-summer-18717b",
 "status": "open",
 "featureLevel": "business",
 "signupType": "rsvp",
 "website": "http://jonny-action.confetti.test/my-first-event",
 "email": "jonny.stromberg@gmail.com",
 "rsvpLimit": 100,
 "rsvpLeft": 85,
 "waitlisted": 0,
 "hasPassed": false,
 "createdAt": "2018-10-11T13:06:16.432Z",
 "updatedAt": "2020-03-09T20:19:40.956Z",
 "summary": "Write a three sentence pitch for your event here.",
 "timeFormat": "24",
 "locale": "en",
 "primaryColor": "#00DB7D",
 "colors": {},
 "waitlist": true,
 "location": {
  "url": "http://www.google.com/maps?q=undefined"
 },
 "id": "16500",
 "type": "event",
 "images": null,
 "meta": {
  "webhookType": "event.updated"
 }
}

curl "https://api.confetti.events/events/2"
  -H "Authorization: apikey your-key"

{
 "data": {
  "id": "16500",
  "type": "event",
  "attributes": {
   "name": "My first event",
   "startDate": "2020-09-19T16:00:00.000Z",
   "endDate": "2020-09-19T19:00:00.000Z",
   "timeZone": "Europe/Berlin",
   "slug": "green-summer-18717b",
   "status": "open",
   "featureLevel": "business",
   "signupType": "rsvp",
   "website": "http://jonny-action.confetti.test/my-first-event",
   "email": "jonny.stromberg@gmail.com",
   "rsvpLimit": 100,
   "rsvpLeft": 85,
   "waitlisted": 0,
   "hasPassed": false,
   "createdAt": "2018-10-11T13:06:16.432Z",
   "updatedAt": "2020-03-09T20:19:40.956Z",
   "summary": "Write a three sentence pitch for your event here.",
   "timeFormat": "24",
   "locale": "en",
   "primaryColor": "#00DB7D",
   "colors": {},
   "waitlist": true,
   "location": {
    "url": "http://www.google.com/maps?q=undefined"
   }
  },
  "relationships": {
   "images": {
    "data": null
   }
  }
 },
 "meta": {
  "webhookType": "event.updated"
 }
}

This endpoint retrieves a specific event.

HTTP Request

GET https://api.confetti.events/events/<ID>

URL Parameters

Parameter Description
ID The ID of the record to retrieve

Tickets

Get all tickets


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const tickets = await confetti.tickets.findAll({
  filter: {
    eventId: 16969
  },
  page: {
    limit: 10,
    offset: 3
  }
})

[
 {
  "persons": 1,
  "hashid": "g265xg",
  "description": "My cool batch",
  "price": 10,
  "currency": "SEK",
  "name": "Foo Bar",
  "email": "foo@bar.com",
  "token": "d92614282978451b7942fffda421df47740c",
  "status": "attending",
  "emailStatus": "subscribed",
  "checkinAt": null,
  "waitlistAt": null,
  "startDate": "2021-06-18T16:00:00.000Z",
  "endDate": null,
  "values": {
   "field-one-field": "Veg",
   "field-what-do-you-think": [
    "Yes"
   ]
  },
  "comment": null,
  "guests": 0,
  "termsAcceptedAt": "2020-03-09T19:53:30.304Z",
  "deletionRequestedAt": null,
  "createdAt": "2020-03-09T19:51:32.274Z",
  "updatedAt": "2020-03-09T19:53:30.354Z",
  "ticketBatchId": 16090,
  "paymentId": 288297,
  "eventId": 16969,
  "contactId": 112395,
  "id": "3344691",
  "type": "ticket"
 },
 {
  "persons": 1,
  "hashid": "g265xg",
  "description": "My cool batch",
  "price": 10,
  "currency": "SEK",
  "name": "Foo Bar",
  "email": "foo@bar.com",
  "token": "d92614282978451b7942fffda421df47740c",
  "status": "attending",
  "emailStatus": "subscribed",
  "checkinAt": null,
  "waitlistAt": null,
  "startDate": "2021-06-18T16:00:00.000Z",
  "endDate": null,
  "values": {
   "field-one-field": "Veg",
   "field-what-do-you-think": [
    "Yes"
   ]
  },
  "comment": null,
  "guests": 0,
  "termsAcceptedAt": "2020-03-09T19:53:30.304Z",
  "deletionRequestedAt": null,
  "createdAt": "2020-03-09T19:51:32.274Z",
  "updatedAt": "2020-03-09T19:53:30.354Z",
  "ticketBatchId": 16090,
  "paymentId": 288297,
  "eventId": 16969,
  "contactId": 112395,
  "id": "3344691",
  "type": "ticket"
 }
]

curl "https://api.confetti.events/tickets?filter[eventId]=16969"
  -H "Authorization: apikey your-key"

{
 "data": [
  {
   "id": "3344691",
   "type": "ticket",
   "attributes": {
    "persons": 1,
    "hashid": "g265xg",
    "description": "My cool batch",
    "price": 10,
    "currency": "SEK",
    "name": "Foo Bar",
    "email": "foo@bar.com",
    "token": "d92614282978451b7942fffda421df47740c",
    "status": "attending",
    "emailStatus": "subscribed",
    "checkinAt": null,
    "waitlistAt": null,
    "startDate": "2021-06-18T16:00:00.000Z",
    "endDate": null,
    "values": {
     "field-one-field": "Veg",
     "field-what-do-you-think": [
      "Yes"
     ]
    },
    "comment": null,
    "guests": 0,
    "termsAcceptedAt": "2020-03-09T19:53:30.304Z",
    "deletionRequestedAt": null,
    "createdAt": "2020-03-09T19:51:32.274Z",
    "updatedAt": "2020-03-09T19:53:30.354Z",
    "ticketBatchId": 16090,
    "paymentId": 288297,
    "eventId": 16969,
    "contactId": 112395
   }
  },
  {
   "id": "3344691",
   "type": "ticket",
   "attributes": {
    "persons": 1,
    "hashid": "g265xg",
    "description": "My cool batch",
    "price": 10,
    "currency": "SEK",
    "name": "Foo Bar",
    "email": "foo@bar.com",
    "token": "d92614282978451b7942fffda421df47740c",
    "status": "attending",
    "emailStatus": "subscribed",
    "checkinAt": null,
    "waitlistAt": null,
    "startDate": "2021-06-18T16:00:00.000Z",
    "endDate": null,
    "values": {
     "field-one-field": "Veg",
     "field-what-do-you-think": [
      "Yes"
     ]
    },
    "comment": null,
    "guests": 0,
    "termsAcceptedAt": "2020-03-09T19:53:30.304Z",
    "deletionRequestedAt": null,
    "createdAt": "2020-03-09T19:51:32.274Z",
    "updatedAt": "2020-03-09T19:53:30.354Z",
    "ticketBatchId": 16090,
    "paymentId": 288297,
    "eventId": 16969,
    "contactId": 112395
   }
  }
 ]
}

This endoint retreives all tickets.

HTTP Request

GET https://api.confetti.events/tickets

URL Parameters

Parameter Default Values
eventId* number
search string
description string
checkedIn boolean
status attending, waitlist, declined, invited, consumed, deletion.requested attending, waitlist, declined, invited, consumed, deletion-requested
Page Default Description
limit 1000 Maximum number of results
offset 0 Skip X results

Get a specific ticket


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const ticket = await confetti.tickets.find(2)

{
 "persons": 1,
 "hashid": "g265xg",
 "description": "My cool batch",
 "price": 10,
 "currency": "SEK",
 "name": "Foo Bar",
 "email": "foo@bar.com",
 "token": "d92614282978451b7942fffda421df47740c",
 "status": "attending",
 "emailStatus": "subscribed",
 "checkinAt": null,
 "waitlistAt": null,
 "startDate": "2021-06-18T16:00:00.000Z",
 "endDate": null,
 "values": {
  "field-one-field": "Veg",
  "field-what-do-you-think": [
   "Yes"
  ]
 },
 "comment": null,
 "guests": 0,
 "termsAcceptedAt": "2020-03-09T19:53:30.304Z",
 "deletionRequestedAt": null,
 "createdAt": "2020-03-09T19:51:32.274Z",
 "updatedAt": "2020-03-09T19:53:30.354Z",
 "ticketBatchId": 16090,
 "paymentId": 288297,
 "eventId": 16969,
 "contactId": 112395,
 "id": "3344691",
 "type": "ticket",
 "meta": {
  "webhookType": "ticket.attending"
 }
}

curl "https://api.confetti.events/tickets/2"
  -H "Authorization: apikey your-key"

{
 "data": {
  "id": "3344691",
  "type": "ticket",
  "attributes": {
   "persons": 1,
   "hashid": "g265xg",
   "description": "My cool batch",
   "price": 10,
   "currency": "SEK",
   "name": "Foo Bar",
   "email": "foo@bar.com",
   "token": "d92614282978451b7942fffda421df47740c",
   "status": "attending",
   "emailStatus": "subscribed",
   "checkinAt": null,
   "waitlistAt": null,
   "startDate": "2021-06-18T16:00:00.000Z",
   "endDate": null,
   "values": {
    "field-one-field": "Veg",
    "field-what-do-you-think": [
     "Yes"
    ]
   },
   "comment": null,
   "guests": 0,
   "termsAcceptedAt": "2020-03-09T19:53:30.304Z",
   "deletionRequestedAt": null,
   "createdAt": "2020-03-09T19:51:32.274Z",
   "updatedAt": "2020-03-09T19:53:30.354Z",
   "ticketBatchId": 16090,
   "paymentId": 288297,
   "eventId": 16969,
   "contactId": 112395
  }
 },
 "meta": {
  "webhookType": "ticket.attending"
 }
}

This endpoint retrieves a specific ticket.

HTTP Request

GET https://api.confetti.events/tickets/<ID>

URL Parameters

Parameter Description
ID The ID of the record to retrieve

Payments

Get all payments


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const payments = await confetti.payments.findAll({
  filter: {
    eventId: 16969
  },
  page: {
    limit: 10,
    offset: 3
  }
})

[
 {
  "name": "Foo Bar",
  "email": "foo@bar.com",
  "company": "The Company",
  "amount": 13,
  "vat": 3,
  "vatPercentage": 30,
  "token": "2447b4acef764836169b53c4",
  "currency": "SEK",
  "status": "paid",
  "paidAt": "2020-03-09T20:05:10.000Z",
  "commission": "5.65",
  "commissionVat": "1.13",
  "customer": {
   "other": "Extra information"
  },
  "id": "288298",
  "type": "payment"
 },
 {
  "name": "Foo Bar",
  "email": "foo@bar.com",
  "company": "The Company",
  "amount": 13,
  "vat": 3,
  "vatPercentage": 30,
  "token": "2447b4acef764836169b53c4",
  "currency": "SEK",
  "status": "paid",
  "paidAt": "2020-03-09T20:05:10.000Z",
  "commission": "5.65",
  "commissionVat": "1.13",
  "customer": {
   "other": "Extra information"
  },
  "id": "288298",
  "type": "payment"
 }
]

curl "https://api.confetti.events/payments?filter[eventId]=16969"
  -H "Authorization: apikey your-key"

{
 "data": [
  {
   "id": "288298",
   "type": "payment",
   "attributes": {
    "name": "Foo Bar",
    "email": "foo@bar.com",
    "company": "The Company",
    "amount": 13,
    "vat": 3,
    "vatPercentage": 30,
    "token": "2447b4acef764836169b53c4",
    "currency": "SEK",
    "status": "paid",
    "paidAt": "2020-03-09T20:05:10.000Z",
    "commission": "5.65",
    "commissionVat": "1.13",
    "customer": {
     "other": "Extra information"
    }
   }
  },
  {
   "id": "288298",
   "type": "payment",
   "attributes": {
    "name": "Foo Bar",
    "email": "foo@bar.com",
    "company": "The Company",
    "amount": 13,
    "vat": 3,
    "vatPercentage": 30,
    "token": "2447b4acef764836169b53c4",
    "currency": "SEK",
    "status": "paid",
    "paidAt": "2020-03-09T20:05:10.000Z",
    "commission": "5.65",
    "commissionVat": "1.13",
    "customer": {
     "other": "Extra information"
    }
   }
  }
 ]
}

This endoint retreives all payments.

HTTP Request

GET https://api.confetti.events/payments

URL Parameters

Parameter Default Values
eventId* number
status paid, refunded, pending-invoice, sent-invoice, paid-invoice, cancelled-invoice paid, refunded, pending-invoice, sent-invoice, paid-invoice, cancelled-invoice
Page Default Description
limit 1000 Maximum number of results
offset 0 Skip X results

Get a specific payment


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const payment = await confetti.payments.find(2)

{
 "name": "Foo Bar",
 "email": "foo@bar.com",
 "company": "The Company",
 "amount": 13,
 "vat": 3,
 "vatPercentage": 30,
 "token": "2447b4acef764836169b53c4",
 "currency": "SEK",
 "status": "paid",
 "paidAt": "2020-03-09T20:05:10.000Z",
 "commission": "5.65",
 "commissionVat": "1.13",
 "customer": {
  "other": "Extra information"
 },
 "id": "288298",
 "type": "payment",
 "meta": {
  "webhookType": "payment.paid"
 }
}

curl "https://api.confetti.events/payments/2"
  -H "Authorization: apikey your-key"

{
 "data": {
  "id": "288298",
  "type": "payment",
  "attributes": {
   "name": "Foo Bar",
   "email": "foo@bar.com",
   "company": "The Company",
   "amount": 13,
   "vat": 3,
   "vatPercentage": 30,
   "token": "2447b4acef764836169b53c4",
   "currency": "SEK",
   "status": "paid",
   "paidAt": "2020-03-09T20:05:10.000Z",
   "commission": "5.65",
   "commissionVat": "1.13",
   "customer": {
    "other": "Extra information"
   }
  }
 },
 "meta": {
  "webhookType": "payment.paid"
 }
}

This endpoint retrieves a specific payment.

HTTP Request

GET https://api.confetti.events/payments/<ID>

URL Parameters

Parameter Description
ID The ID of the record to retrieve

Webhooks

Get all webhooks


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const webhooks = await confetti.webhooks.findAll()

[
 {
  "type": "ticket.attending",
  "url": "http://foo.com/bar",
  "provider": "zapier",
  "status": "active",
  "createdAt": "2020-02-29T15:12:12.435Z",
  "updatedAt": "2020-02-29T15:12:12.435Z",
  "id": "1"
 },
 {
  "type": "ticket.attending",
  "url": "http://foo.com/bar",
  "provider": "zapier",
  "status": "active",
  "createdAt": "2020-02-29T15:12:12.435Z",
  "updatedAt": "2020-02-29T15:12:12.435Z",
  "id": "1"
 }
]

curl "https://api.confetti.events/webhooks"
  -H "Authorization: apikey your-key"

{
 "data": [
  {
   "id": "1",
   "type": "webhook",
   "attributes": {
    "type": "ticket.attending",
    "url": "http://foo.com/bar",
    "provider": "zapier",
    "status": "active",
    "createdAt": "2020-02-29T15:12:12.435Z",
    "updatedAt": "2020-02-29T15:12:12.435Z"
   }
  },
  {
   "id": "1",
   "type": "webhook",
   "attributes": {
    "type": "ticket.attending",
    "url": "http://foo.com/bar",
    "provider": "zapier",
    "status": "active",
    "createdAt": "2020-02-29T15:12:12.435Z",
    "updatedAt": "2020-02-29T15:12:12.435Z"
   }
  }
 ]
}

This endoint retreives all webhooks.

HTTP Request

GET https://api.confetti.events/webhooks

URL Parameters

Parameter Default Values
eventId number
Page Default Description
limit 1000 Maximum number of results
offset 0 Skip X results

Get a specific webhook


const Confetti = require('confetti')

const confetti = new Confetti({ apiKey: 'your-key' })
const webhook = await confetti.webhooks.find(2)

{
 "type": "ticket.attending",
 "url": "http://foo.com/bar",
 "provider": "zapier",
 "status": "active",
 "createdAt": "2020-02-29T15:12:12.435Z",
 "updatedAt": "2020-02-29T15:12:12.435Z",
 "id": "1"
}

curl "https://api.confetti.events/webhooks/2"
  -H "Authorization: apikey your-key"

{
 "data": {
  "id": "1",
  "type": "webhook",
  "attributes": {
   "type": "ticket.attending",
   "url": "http://foo.com/bar",
   "provider": "zapier",
   "status": "active",
   "createdAt": "2020-02-29T15:12:12.435Z",
   "updatedAt": "2020-02-29T15:12:12.435Z"
  }
 }
}

This endpoint retrieves a specific webhook.

HTTP Request

GET https://api.confetti.events/webhooks/<ID>

URL Parameters

Parameter Description
ID The ID of the record to retrieve

Workspaces

Get your workspace

undefined
{
 "id": 1,
 "name": "My workspace",
 "type": "workspace"
}
undefined
{
 "data": {
  "id": 1,
  "type": "workspace",
  "attributes": {
   "name": "My workspace"
  }
 }
}

This endpoint retrieves your workspace.

HTTP Request

GET https://api.confetti.events/workspaces/<ID>