> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: 3a946aea-e502-4777-8f33-ca64d0392fc2
---

# Get the Template by ID

> Get a specific template by ID.

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['content']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/templates-v2.json GET /content/api/v2/templates/{template_id}
openapi: 3.0.1
info:
  title: Templates API
  description: Use the templates API to create and manage CMS templates.
  version: v2
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Templates
paths:
  /content/api/v2/templates/{template_id}:
    get:
      tags:
        - Templates
      summary: Get the Template by ID
      description: Get a specific template by ID.
      operationId: getTemplateById
      parameters:
        - name: template_id
          in: path
          required: true
          description: The unique id of the template.
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
              examples:
                template_by_id:
                  summary: Get template by ID 359393980
                  value:
                    category_id: 1
                    cdn_minified_url: ''
                    cdn_url: >-
                      http://cdn2.hubspot.net/hub/62515/hub_generated/template_resource/1382477851647/custom/page/examples/simple-template.html
                    deleted_at: 0
                    folder: examples
                    generated_from_layout_id: null
                    id: 359393980
                    is_available_for_new_content: true
                    is_from_layout: false
                    is_read_only: false
                    label: Simple-template
                    linked_style_id: ''
                    path: custom/page/examples/simple-template.html
                    portal_id: 62515
                    source: The template source goes here
                    template_type: '4'
                    thumbnail_path: null
                    thumbnail_width: 154
                    type: ''
                    updated: 1382477851000
                    updated_by: ''
components:
  schemas:
    Template:
      type: object
      properties:
        id:
          type: string
          description: The unique id of the template
        label:
          type: string
          description: The label of the template as it shows up in the template builder
        path:
          type: string
          description: >-
            The path of the template, as should be used for HubL include
            statements
        source:
          type: string
          description: The markup of the template
        category_id:
          type: integer
          description: >-
            The category of content this template can be used for. 1 for landing
            page, 2 for email, 3 for site page
        template_type:
          type: string
          description: The type of template
        folder:
          type: string
          description: The folder this template lives in
        is_available_for_new_content:
          type: boolean
          description: True if this template will show up in the content creation screen
        is_from_layout:
          type: boolean
          description: True if template was generated by publishing a layout
        is_read_only:
          type: boolean
          description: True if the template can only be read
        cdn_url:
          type: string
          description: >-
            For non-HTML templates, the URL to the version of the template that
            has been rendered and uploaded to the HubSpot CDN
        cdn_minified_url:
          type: string
          description: >-
            For JavaScript and CSS, this is the URL of the version of the
            content that has been rendered, minified, and uploaded to our
            Content Delivery Network
        deleted_at:
          type: integer
          description: >-
            When the template was deleted, in milliseconds since the epoch. Zero
            if the template was never deleted.
        generated_from_layout_id:
          type: string
          description: The id of the layout that generated this template
        thumbnail_path:
          type: string
          description: The thumbnail image of the template
        thumbnail_width:
          type: integer
          description: The width of the thumbnail image
        updated:
          type: integer
          description: When the template was last updated, in milliseconds since the epoch
        updated_by:
          type: string
          description: Who last updated the template
        portal_id:
          type: integer
          description: The portal/account ID
        archived:
          type: boolean
          description: >-
            If True, the template will not show up in your dashboard, although
            the template will still be live
        linked_style_id:
          type: string
          description: ID of linked stylesheet
        type:
          type: string
          description: Template type field

````