---
title: "Get a template"
method: GET
path: "/templates/{templateId}"
tags: ["Templates"]
---

# Get a template

`GET /templates/{templateId}`

## Request

- Base URL: `https://api.grapesjs.com/v1`
- URL: `https://api.grapesjs.com/v1/templates/{templateId}`
- Auth: HTTP bearer

Returns a single template and optionally includes project data.

## Query parameters

- `withProjectData` boolean

## Response `200`

Template fetched successfully

- TemplateResponse
  - `template` TemplateSummary, required
    - `id` string, required: Template ID.
    - `source` 'public' | 'workspace', required
    - `name` string, required: Template name.
    - `description` string, nullable, required: Short template description.
    - `type` 'web' | 'email', required
    - `createdAt` string, date-time, required: Template creation date and time.
    - `updatedAt` string, date-time, required: Last template update date and time.
    - `previewUrl` string, nullable: URL of the template preview image.
    - `publishedUrl` string, nullable: Published template URL. `null` means the template is not published.
    - `lastPublishedAt` string, date-time, nullable, required: Last publish date and time.
  - `projectData` ProjectData: JSON payload produced by the editor that contains the full project structure and content.

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `404`: Resource not found
- `500`: Server error

---

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