---
title: "Post Platforms"
method: POST
path: "/api/account/platforms"
tags: ["account"]
---

# Post Platforms

`POST /api/account/platforms`

## 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/platforms`
- Auth: none declared

"My platforms", all of them at once: `{platforms: [...]}`, any of
gcg.platforms.FAMILIES' four, the empty list for every platform. The
account as it now is, as `POST /username` answers, so the page that
saved it hands it to lib/session.ts and the listings follow at once.

Kept each once and in FAMILIES' order, however it was sent. 422
`invalid-platform` for anything but a list of the four's exact names,
and nothing is saved: a client that sent "ps5" meant a choice, and
saving the rest of the list would answer it with a different one.

No password and no code: this changes what the account is shown, not
how it is reached. The most a stolen cookie does with it is make the
owner's choice for them, which the owner sees, and undoes, on the
account page.

## Response `200`

Successful Response

- MeOut: The signed-in account, as `/api/account/me` and every sign-in answer it.
  - `id` integer, required
  - `username` string, required
  - `email` string, nullable, required
  - `emailVerified` boolean, required
  - `twoFactor` boolean, required
  - `methods` MethodsOut, required: The ways this account can sign in.
    - `password` boolean, required
    - `google` boolean, required
    - `steam` boolean, required
    - `epic` boolean, required
  - `platforms` string[], required
  - `createdAt` string, date-time, 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)
