---
title: "POST /api/admin/banners/{id}/archive"
method: POST
path: "/api/admin/banners/{id}/archive"
tags: ["Admin: Banners"]
---

# POST /api/admin/banners/{id}/archive

`POST /api/admin/banners/{id}/archive`

## Request

- The document declares no server URL.
- Auth: API key in cookie `session`

Archive a draft or published banner.

## Path parameters

- `id` integer, required

## Response `200`

The request has succeeded.

- Banner: A site banner (legacy: `Banner`).
  - `id` integer, required
  - `locale` 'ru' | 'en', required: Banners only target ru/en today (legacy `BannerLocale`).
  - `body` string, required
  - `url` string, nullable, required
  - `background` 'cta_gradient' | 'dark' | 'blue', required: Banner display background.
  - `state` 'draft' | 'published' | 'archived', required: Banner publication state.
  - `startsAt` string, date-time, nullable, required
  - `finishesAt` string, date-time, nullable, required
  - `createdAt` string, date-time, required

## Other responses

- `default`: Default error response shared by every operation. `@error` emits an OpenAPI `default` response, keeping central transport failures typed without enumerating every status on every operation.

## Changes

- **2026-10-18** `9380d4c85a04`: 3 info
  - removed the non-success response with the status `401`
  - removed the non-success response with the status `403`
  - added the optional property `errors` to the response with the `default` status
- **2026-10-17** `023e7c2cd140`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/changes/api/admin/banners/:id/archive/post.md)

---

[API](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api.md) · [All operations](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/revisions/51c7f596b47c?raw)
