Skip to content

app.notification_deliveries

TablePartitioned by monthRow level security on

One notification on one outside channel (Email, SMS, Push), partitioned on the notification's month so both expire together. Written by private.notify and the delivery worker.

Primary key: id, notification_created_at

Columns of app.notification_deliveries
ColumnTypeNullableDescription
iduuidNoDelivery id, UUID v7.
org_iduuidNoOwning org, derived from app.notifications on insert; never accepted from the caller and never changed.References app.organizations.id
notification_iduuidNoNotification delivered.References private.notifications_p202609.id
notification_created_attimestamp with time zoneNoCreation time of the notification: its partition key, checked by the foreign key.References private.notifications_p202609.created_at
channelapp.notification_channelNoEmail, SMS or Push.
message_statusapp.message_statusNoQueued, Deferred, Digest, Sent, Delivered, Bounced, Failed or Suppressed.
deliver_aftertimestamp with time zoneNoEarliest send time: now, or the end of the recipient's quiet hours.
attempt_countsmallintNoSend attempts so far.
provider_message_idtextYesMessage id returned by Resend, Twilio or Expo.
last_errortextYesError of the latest failed attempt, or why the delivery was suppressed.
sent_attimestamp with time zoneYesWhen the provider accepted the message.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.