---
title: "Post Notifications"
method: POST
path: "/api/account/notifications"
tags: ["account"]
---

# Post Notifications

`POST /api/account/notifications`

## Request

- Base URL: `https://api.getcheapgames.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getcheapgames.com/api/account/notifications`
- Auth: none declared

One switch, `{key, on, cc}`: `key` one of `NOTIFICATION_KEYS`, `on` true
or false, `cc` the storefront the page is on, which a list joined here
then writes its emails for. The switches as they now are, as `GET`
answers them, so the page shows what was saved.

A list's switch is the address's row on it, the very one its emails'
links change (`alerts.join_confirmed`, `alerts.leave`): on is on the
list at once, with no confirmation email — the account's own
verification was one — and off is the unsubscribe the email's link
makes. The price alerts' is `User.price_alerts`: off holds the alerts and
keeps every target.

409 `verify-first` without a confirmed address: there is no inbox yet to
speak for (en.ts says which is missing, from `GET`). 422
`invalid-notification` for a key that is not one, or an `on` that is not
a boolean, and nothing changes. No password and no code, as `POST
/platforms`: this changes what the inbox is sent, not how the account is
reached, and the owner sees the switch and turns it back.

## Response `200`

Successful Response

- NotificationsOut: `/api/account/notifications`: the switches, and the address they are about.
  - `email` string, nullable, required
  - `emailVerified` boolean, required
  - `items` NotificationItemsOut, required: The account page's email switches, each on or off, by the key `POST /api/account/notifications` takes. The account and security emails are not among them: those always go.
    - `giveaways` boolean, required
    - `sales` boolean, required
    - `priceAlerts` boolean, required
    - `news` boolean, required

---

[API](https://skmtc.dev/getcheapgames/apis/getcheapgames-api.md) · [All operations](https://skmtc.dev/getcheapgames/apis/getcheapgames-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getcheapgames/apis/getcheapgames-api/revisions/57333a690301?raw)
