---
title: "Get template count for a sub-group"
method: GET
path: "/admin/sub-groups/{id}/template-count"
tags: ["Task Sub-Groups"]
---

# Get template count for a sub-group

`GET /admin/sub-groups/{id}/template-count`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/admin/sub-groups/{id}/template-count`
- Auth: HTTP bearer

Get the number of templates in a sub-group (for archive warning)

## Path parameters

- `id` string, uuid, required

## Response `200`

Template count retrieved successfully

- object
  - `success` boolean
  - `data` object
    - `template_count` integer

## Other responses

- `401`: Unauthorized
- `404`: Sub-group not found

---

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