---
title: "Download a template or a specific version."
method: GET
path: "/template/{templateId-or-versionId}"
tags: ["Template"]
---

# Download a template or a specific version.

`GET /template/{templateId-or-versionId}`

## Request

- Base URL: `https://api.carbone.io`
- URL: `https://api.carbone.io/template/{templateId-or-versionId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/carbone/apis/carbone-api/docs/template/:templateId-or-versionId/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetches a specific template or version of a template from the Carbone storage. It supports retrieving the latest deployed version of a template using the `templateId`, as well as individual versions via `versionId`. This endpoint also allows downloading JSON data samples associated with templates or specific versions, which are used in the Studio for testing and development purposes.

### Features
- Template Retrieval: Downloads the template file or its associated JSON sample based on the provided ID.
- Version Specificity: Retrieve specific versions of a template using `versionId`, or fetch the latest deployed template using `templateId`.
- Data Samples: Access data samples stored with templates or versions, which are useful for testing and development in the Carbone Studio environment.

### Parameters
The `id` of the template or version to download, can also be specified as `{templateId}_sample.json` or `{versionId}_sample.json` to download associated data samples.

### Use Cases
Ideal for accessing templates and their associated data samples for testing, integration, or deployment purposes. Supports scenarios requiring version-specific template retrieval or the latest deployed template versions.

## Path parameters

- `templateId-or-versionId` string, required

## Headers

- `carbone-version` '5' | '4' | '3' | 'staging', required

## Response `200`

Stream of the file content

## Other responses

- `400`: The template ID in the URL is not valid, or the template could not be retrieved.
- `401`: Unauthorized, please provide a correct API key on the `Authorization` header. The API key is available on your Carbone account: https://account.carbone.io.
- `404`: The template is not found
- `500`: Server or Database Error.

## Changes

- **2026-11-06** `c06cc573e3b0`: 2 breaking, 5 info
  - the `carbone-version` request header's property undefined was restricted to a list of enum values
  - the `header` request parameter `carbone-version` was restricted to a list of enum values
  - added the new enum value `3` to the `header` request parameter `carbone-version`
  - added the new enum value `4` to the `header` request parameter `carbone-version`
  - …3 more

[Operation history](https://skmtc.dev/carbone/apis/carbone-api/changes/template/:templateId-or-versionId/get.md)

---

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