# List content type templates

_NgCms / Content Types_

`GET /ng-cms/content-type-templates/{projectId}`

## Parameters

- `projectId` (string, required) — The unique identifier of the project

## Responses

### `200` — List of available content type templates, ordered by displayOrder.

Type: `CmsProjectTemplateDto[]`

- `id` (string) — Unique identifier of the template
- `code` (string) — Machine-readable template code used to apply it (e.g. 'website', 'blog')
- `name` (string) — Human-readable template name
- `description` (string) — Short description of the template
- `useCase` (string) — Typical use case this template is designed for
- `version` (number) — Template version
- `contentTypes` (CmsProjectTemplateContentTypeDefinition[]) — Content type definitions bundled in this template
  - `templateKey` (string) — Identifier unique within this template, used to resolve reference fields between the template's own content types
  - `name` (string) — Display name the content type will be created with
  - `key` (string) — Machine-readable key the content type will be created with
  - `description` (string) — Optional description of the content type
  - `displayField` (string) — Schema field key to use as the display/title field
  - `schema` (CmsSchemaField[]) — Field definitions for the content type. Reference fields carry a referenceTemplateKey instead of a real content type ID, resolved when the template is applied
- `displayOrder` (number) — Sort order used to display templates
- `isActive` (boolean) — Whether the template is currently available

### `401` — Unauthorized. A valid API key is required.


### `412` — Precondition Failed. The project's current plan does not allow access to this resource, or payment is required.


### `500` — Unexpected server error.

Type: `ApiResponse<T>`

- `success` (boolean) — Always false
- `errors` (ErrorDetail[]) — List of server-side errors
  - `correlationId` (string) — Unique ID for tracing the error
  - `message` (string) — Error message
  - `stack` (string) — Stack trace (non-production only)


## Code Examples

### curl

```curl
curl --request GET \
  --url https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId} \
  --header 'x-api-key: <api-key>'
```

### javascript

```js
const options = {
  method: 'GET',
  headers: { 'x-api-key': '<api-key>' }
};

fetch('https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId}', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
```

### dotnet

```dotnet
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "<api-key>");

var response = await client.GetAsync("https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId}");
var templates = await response.Content
    .ReadFromJsonAsync<List<CmsProjectTemplateDto>>();
```

### python

```python
import requests

url = "https://apis-spb.konso.io/ng-cms/content-type-templates/{projectId}"
headers = { "x-api-key": "<api-key>" }

response = requests.get(url, headers=headers)
print(response.json())
```

### Response Example (200)

```json
[
  {
    "id": "tpl_website",
    "code": "website",
    "name": "Website",
    "description": "Best for corporate websites, marketing websites, and landing pages.",
    "useCase": "Corporate websites, marketing websites, and landing pages",
    "version": 1,
    "contentTypes": [
      {
        "templateKey": "page",
        "name": "Page",
        "key": "page",
        "description": null,
        "displayField": "title",
        "schema": [
          { "key": "slug", "label": "Slug", "type": "slug", "required": true, "unique": true },
          { "key": "title", "label": "Title", "type": "shorttext", "required": true }
        ]
      },
      {
        "templateKey": "navigation",
        "name": "Navigation",
        "key": "navigation",
        "description": null,
        "displayField": "name",
        "schema": [
          { "key": "name", "label": "Name", "type": "shorttext", "required": true },
          { "key": "items", "label": "Items", "type": "reference", "referenceTemplateKey": "navigationItem", "multiple": true }
        ]
      }
    ],
    "displayOrder": 1,
    "isActive": true
  },
  {
    "id": "tpl_blog",
    "code": "blog",
    "name": "Blog",
    "description": "Best for blogs, editorial content, and news sections.",
    "useCase": "Blogs, editorial content, and news sections",
    "version": 1,
    "contentTypes": [
      {
        "templateKey": "author",
        "name": "Author",
        "key": "author",
        "description": null,
        "displayField": "name",
        "schema": [
          { "key": "name", "label": "Name", "type": "shorttext", "required": true },
          { "key": "bio", "label": "Bio", "type": "longtext" }
        ]
      },
      {
        "templateKey": "blogPost",
        "name": "Blog Post",
        "key": "blog_post",
        "description": null,
        "displayField": "title",
        "schema": [
          { "key": "title", "label": "Title", "type": "shorttext", "required": true },
          { "key": "author", "label": "Author", "type": "reference", "referenceTemplateKey": "author" }
        ]
      }
    ],
    "displayOrder": 2,
    "isActive": true
  }
]
```
