---
title: "Get a flattened list of media categories"
method: GET
path: "/media-categories/flattened"
tags: ["Media categories"]
---

# Get a flattened list of media categories

`GET /media-categories/flattened`

## Request

- Base URL: `https://example.com/api`
- URL: `https://example.com/api/media-categories/flattened`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://example.com/oauth2/authorize`
    - Token URL: `https://example.com/api/oauth2/token` scopes: `media_category:read`
  - API key in header `XF-Api-Key`
- TypeScript: <https://skmtc.dev/xenforo-ltd/apis/xenforo-api/docs/media-categories/flattened/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a flattened list of media categories.

## Response `200`

OK

## Other responses

- `default`: Error

## Changes

- **2026-03-18** `e271d0e41f6d`: 5 info
  - api operation id `get_media_categories_flattened` removed and replaced with `getMediaCategoriesFlattened`
  - the endpoint scheme security `XF-Api-Key` was added to the API
  - the endpoint scheme security `XF-OAuth2` was added to the API
  - added the new optional `header` request parameter `XF-Api-User` to all path's operations
  - …1 more
- **2026-03-06** `0f490cfb7931`: 2 info
  - api tag `Media categories` added
  - api tag `media-categories` removed
- **2026-03-05** `6b68c4d49c45`: 1 info
  - endpoint added
- **2026-02-03** `fc0a40f3b859`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/xenforo-ltd/apis/xenforo-api/changes/media-categories/flattened/get.md)

---

[API](https://skmtc.dev/xenforo-ltd/apis/xenforo-api.md) - [All operations](https://skmtc.dev/xenforo-ltd/apis/xenforo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/xenforo-ltd/apis/xenforo-api/revisions/b15eba33657a?raw)
