← Back to API Reference
/notifications
Tag: notifications
getThe notifications for an account
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
account_id | query | string | — | — | The account the notification is for (null for system messages) |
type | query | string | — | — | The type of the notification |
body | query | string | — | — | The body of the notification |
link | query | string | — | — | The link for the notification |
channel | query | string | — | — | The channel for the notification |
dismissed | query | string | — | — | Whether the notification has been dismissed |
expires_at | query | string | — | — | The expiry date for the notification |
created_at | query | string | — | — | The creation date for the notification |
select | query | string | — | — | Filtering Columns |
order | query | string | — | — | Ordering |
Range | header | string | — | — | Limiting and Pagination |
Range-Unit | header | string | — | — | Limiting and Pagination |
offset | query | string | — | — | Limiting and Pagination |
limit | query | string | — | — | Limiting and Pagination |
Prefer | header | string | — | — | Preference |
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
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
notifications | body | object | — | — | notifications |
select | query | string | — | — | Filtering Columns |
Prefer | header | string | — | — | Preference |
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
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
account_id | query | string | — | — | The account the notification is for (null for system messages) |
type | query | string | — | — | The type of the notification |
body | query | string | — | — | The body of the notification |
link | query | string | — | — | The link for the notification |
channel | query | string | — | — | The channel for the notification |
dismissed | query | string | — | — | Whether the notification has been dismissed |
expires_at | query | string | — | — | The expiry date for the notification |
created_at | query | string | — | — | The creation date for the notification |
notifications | body | object | — | — | notifications |
Prefer | header | string | — | — | Preference |
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
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
account_id | query | string | — | — | The account the notification is for (null for system messages) |
type | query | string | — | — | The type of the notification |
body | query | string | — | — | The body of the notification |
link | query | string | — | — | The link for the notification |
channel | query | string | — | — | The channel for the notification |
dismissed | query | string | — | — | Whether the notification has been dismissed |
expires_at | query | string | — | — | The expiry date for the notification |
created_at | query | string | — | — | The creation date for the notification |
Prefer | header | string | — | — | Preference |
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
| Column | Type | Format | Nullable | Default | Notes |
|---|---|---|---|---|---|
idPK | integer | bigint | — | — | This is a Primary Key. |
account_id | string | uuid | — | — | FK → accounts.id |
type | enum | public.notification_type | — | info | info, warning, error |
body | string | character varying | — | — | The body of the notification |
link | string | character varying | ✓ | — | The link for the notification |
channel | enum | public.notification_channel | — | in_app | in_app, email |
dismissed | boolean | boolean | — | Whether the notification has been dismissed | |
expires_at | string | timestamp with time zone | ✓ | (now() + '1 mon'::interval) | The expiry date for the notification |
created_at | string | timestamp with time zone | — | now() | The creation date for the notification |