---
title: "GET /api/admin/courses/options"
method: GET
path: "/api/admin/courses/options"
tags: ["Admin: Courses"]
---

# GET /api/admin/courses/options

`GET /api/admin/courses/options`

## Request

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

Every course as id and name, unpaginated and oldest first, for selects.
      It is the post form's course picker, so it is classified under blog posts:
      an editor of posts picks the courses a post promotes without being allowed
      to edit courses.

## Response `200`

The request has succeeded.

- CourseOption[]
  - `id` integer, required
  - `name` string, required: The course's name, or its slug when it has none.

## 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** `1ee921bfa25f`: 1 info
  - endpoint added
- **2026-10-17** `5699b007887b`: 1 breaking
  - api path removed without deprecation
- **2026-10-17** `8fadb983180c`: 1 info
  - endpoint added
- **2026-10-17** `d09902c84ca9`: 1 breaking
  - api path removed without deprecation

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