← Back to API Reference

/notifications

Tag: notifications

getThe notifications for an account

Parameters

NameInTypeFormatRequiredDescription
idquerystring
account_idquerystringThe account the notification is for (null for system messages)
typequerystringThe type of the notification
bodyquerystringThe body of the notification
linkquerystringThe link for the notification
channelquerystringThe channel for the notification
dismissedquerystringWhether the notification has been dismissed
expires_atquerystringThe expiry date for the notification
created_atquerystringThe creation date for the notification
selectquerystringFiltering Columns
orderquerystringOrdering
RangeheaderstringLimiting and Pagination
Range-UnitheaderstringLimiting and Pagination
offsetquerystringLimiting and Pagination
limitquerystringLimiting and Pagination
PreferheaderstringPreference

Example

bash
curl "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/notifications?select=*&limit=10" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Responses

200OK
206Partial Content

postThe notifications for an account

Parameters

NameInTypeFormatRequiredDescription
notificationsbodyobjectnotifications
selectquerystringFiltering Columns
PreferheaderstringPreference

Example

bash
curl -X POST "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/notifications" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
  "account_id": "00000000-0000-0000-0000-000000000000",
  "type": "info",
  "body": "example",
  "channel": "in_app",
  "dismissed": true
}'

Responses

201Created

patchThe notifications for an account

Parameters

NameInTypeFormatRequiredDescription
idquerystring
account_idquerystringThe account the notification is for (null for system messages)
typequerystringThe type of the notification
bodyquerystringThe body of the notification
linkquerystringThe link for the notification
channelquerystringThe channel for the notification
dismissedquerystringWhether the notification has been dismissed
expires_atquerystringThe expiry date for the notification
created_atquerystringThe creation date for the notification
notificationsbodyobjectnotifications
PreferheaderstringPreference

Example

bash
curl -X PATCH "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/notifications?id=eq.YOUR_ID" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{"account_id": "00000000-0000-0000-0000-000000000000"}'

Responses

204No Content

deleteThe notifications for an account

Parameters

NameInTypeFormatRequiredDescription
idquerystring
account_idquerystringThe account the notification is for (null for system messages)
typequerystringThe type of the notification
bodyquerystringThe body of the notification
linkquerystringThe link for the notification
channelquerystringThe channel for the notification
dismissedquerystringWhether the notification has been dismissed
expires_atquerystringThe expiry date for the notification
created_atquerystringThe creation date for the notification
PreferheaderstringPreference

Example

bash
curl -X DELETE "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/notifications?id=eq.YOUR_ID" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Responses

204No Content

Schema

The notifications for an account

ColumnTypeFormatNullableDefaultNotes
idPK
integerbigintThis is a Primary Key.
account_id
stringuuidFK → accounts.id
type
enumpublic.notification_typeinfoinfo, warning, error
body
stringcharacter varyingThe body of the notification
link
stringcharacter varyingThe link for the notification
channel
enumpublic.notification_channelin_appin_app, email
dismissed
booleanbooleanWhether the notification has been dismissed
expires_at
stringtimestamp with time zone(now() + '1 mon'::interval)The expiry date for the notification
created_at
stringtimestamp with time zonenow()The creation date for the notification