---
title: "List categories"
method: GET
path: "/spaces/{spaceId}/categories"
tags: ["Spaces"]
---

# List categories

`GET /spaces/{spaceId}/categories`

## Request

- Base URL: `https://api.youscan.io/api/external`
- URL: `https://api.youscan.io/api/external/spaces/{spaceId}/categories`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in query parameter `apiKey`
- TypeScript: <https://skmtc.dev/youscan/apis/youscan-api/docs/spaces/:spaceId/categories/get.ts> (a function with typed inputs; its response is checked against the schema)

List categories configured in the specified space.

## Path parameters

- `spaceId` integer, required

## Response `200`

Categories configured in the space.

- object
  - `categories` Category[]
    - `id` integer: Category ID.
    - `name` string: Category name.
    - `subCategories` SubCategory[]: Configured (or, in mention responses, assigned) subcategories.
      - `id` integer: Subcategory ID.
      - `name` string: Subcategory name.

## Other responses

- `401`: The API key is missing or invalid.
- `404`: Space not found or you don't have access to it.

---

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