---
title: "GET /api/banner"
method: GET
path: "/api/banner"
tags: ["Banners"]
---

# GET /api/banner

`GET /api/banner`

## Request

- The document declares no server URL.
- Auth: none declared

The newest published banner of the request locale whose window is open
now: it started (or has no start) and has not finished (or has no finish).

## Response `200`

The request has succeeded.

- ActiveBanner: The banner shown above the pages that carry one, or null when none is live.
  - `banner` Banner, required: 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`: 1 info
  - added the optional property `errors` to the response with the `default` status
- **2026-10-16** `147f9af8b2a6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/changes/api/banner/get.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)
