---
title: "Upload Cover"
method: POST
path: "/api/admin/news/{post_id}/cover"
tags: ["news"]
---

# Upload Cover

`POST /api/admin/news/{post_id}/cover`

## 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/admin/news/{post_id}/cover`
- Auth: none declared

A picture for the post: JPEG, PNG, WebP or AVIF, up to 10 MB, at least
320x180. Known by its bytes, not by what it was sent as; cut to 16:9 and
stripped of its metadata before anything is stored. It replaces the
video's still or the borrowed game cover until it is removed.

Sent as a form's `file` field or as the raw picture (see "the upload"
above). A body declared or found to be past the cap is a 413 before any
more of it is read; a form that cannot be read is a 400, one without the
field a 422.

## Path parameters

- `post_id` integer, required

## Headers

- `authorization` string

## Response `200`

Successful Response

- AdminNewsPostOut: A post as the Midfeed admin edits it, drafts included.
  - `id` integer, required
  - `slug` string, required
  - `title` string, required
  - `dek` string, required
  - `tag` string, required
  - `author` string, required
  - `bodyMd` string, required
  - `blocks` object[], required
  - `readingMinutes` integer, required
  - `videoId` string, nullable, required
  - `gameIds` integer[], required
  - `games` NewsGameRefOut[], required
    - `id` integer, required
    - `slug` string, required
    - `title` string, required
  - `cover` NewsCoverOut, required: A post's picture: `src` a 960-wide WebP, the two `srcset`s the widths in AVIF and WebP (`url 480w, url 960w, url 1600w` for a stored cover; a game's own widths when it is borrowed), and the frame's size for the box a page reserves. Pages crop it to 16:9. Site-relative, like `coverBase`.
    - `src` string, required
    - `srcsetAvif` string, required
    - `srcsetWebp` string, required
    - `width` integer, required
    - `height` integer, required
  - `coverSource` 'upload' | 'youtube' | 'game', nullable, required
  - `publishedAt` string, date-time, nullable, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `status` 'draft' | 'scheduled' | 'published', required
  - `url` string, required
  - `translations` object

## Other responses

- `422`: Validation Error

---

[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/962824bb76da?raw)
