API Reference

Events

Read the event log — every event that fired for your workspace, newest first: what happened to an email after it went out (delivered, opened, clicked, bounced, complained, failed), an email we did not send (skipped, with the reason) or held for review (held, released, blocked), and opt-outs (unsubscribed). This is a pull log: events are recorded for every email whether or not you've configured a webhook endpoint, so you can poll this endpoint to observe what happened to your sends without setting up any webhooks. Each event also carries a per-endpoint delivery summary if you do have webhook endpoints. Read-only — to configure endpoints and verify signatures, see Webhooks.

Overview

MethodPathDescription
GET/api/v1/eventsList webhook events (cursor-paginated)

The event object

Each event in the list has this shape:

FieldTypeDescription
idstringThe event ID, prefixed evt_ (e.g. evt_3f1a8c2e-…).
typestringThe event type, e.g. email.delivered.
created_atstringISO 8601 timestamp the event was recorded.
email_idstring | nullThe email this event is about: pass it to GET /v1/emails/:id. Null for an event about no email (a deal's, a confirmed signup's or a booking's) and for an opt-out with no known email (an automation email's link, or leaving one topic).
detailsobject | nullWhat the event carries beside the email. email.skipped: reason (suppressed, topic_opt_out, address_check, recipient_cap, recipient_burst). email.unsubscribed: email, scope (all or topic), topic, campaign_id and source. email.replied: replied_at. deal.created and deal.stage_changed: the deal_id, the stages, and who did it (actor). signup.confirmed: signup_id, contact_id, source (form, api or booking), form_id, confirmed_at and subscribed. booking.created, booking.rescheduled and booking.canceled: booking_id (pass it to GET /v1/meetings/:id), provider (pages, calendly or calcom), and for booking.canceled canceled_by (guest or host). Null for every other event.
deliveriesobject[]Per-endpoint delivery summary for this event (see below).

The delivery object

Each entry in deliveries summarises delivery to one endpoint:

FieldTypeDescription
endpoint_idstringUUID of the webhook endpoint the event was delivered to.
statusstringDelivery status to that endpoint, e.g. succeeded, failed, or pending.
attemptsnumberNumber of delivery attempts made.
last_status_codenumber | nullHTTP status code from the most recent attempt, or null if not yet attempted.

The full email object is not duplicated here — fetch it from GET /api/v1/emails/{id} (see Emails).

List events

GET/api/v1/events

Returns a cursor-paginated list of webhook events, newest first. Pass next_cursor back as the cursor parameter to fetch the next page.

Query parameters

FieldTypeRequiredDescription
limitnumberoptionalMax events to return. Default 50, max 100 (over-large values are clamped).
cursorstringoptionalOpaque pagination cursor from a previous response's next_cursor. Omit for the first page; a malformed cursor returns 400 invalid_field.
typestringoptionalFilter by event type. One of the supported types listed below.

Filterable event types

The type parameter accepts exactly these values; any other value returns 400 invalid_field:

Event type
email.delivered
email.bounced
email.complained
email.failed
email.opened
email.clicked
email.skipped
email.held
email.released
email.blocked
email.unsubscribed
email.replied
deal.created
deal.stage_changed
signup.confirmed
booking.created
booking.rescheduled
booking.canceled

A key reads deal.created and deal.stage_changed only if it also holds crm:read, signup.confirmed only with contacts:read, and the three booking.* events only with meetings:read. Without the scope those events are left out of the list, and asking for one by type answers 403.

Response

import { PristineSend } from "pristinesend"

const ps = new PristineSend(process.env.PRISTINESEND_API_KEY!)

// The returned page auto-paginates — iterate across every page transparently.
for await (const event of await ps.events.list({ limit: 100, type: "email.delivered" })) {
  console.log(event.id, event.type, event.deliveries[0]?.status)
}

Errors

Errors use the standard envelope — unauthorized (401) and invalid_field (400, for an unsupported type or a malformed cursor). See the full Error codes reference for the canonical envelope.