> ## 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: 812b9442-ff3c-4407-9371-72bd0acfa8fc
---

# Get the previous version of the Template

> Get a specific revision of a template. Version id is the id of the version from the list previous versions endpoint.

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}/versions/{version_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}/versions/{version_id}:
    get:
      tags:
        - Templates
      summary: Get the previous version of the Template
      description: >-
        Get a specific revision of a template. Version id is the id of the
        version from the list previous versions endpoint.
      operationId: getTemplateVersion
      parameters:
        - name: template_id
          in: path
          required: true
          description: Unique identifier for the template.
          schema:
            type: string
        - name: version_id
          in: path
          required: true
          description: Unique identifier for a specific version.
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
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

````