---
title: "Export Template"
method: GET
path: "/api/template/v2/templates/{templateId}/export"
tags: ["Template"]
---

# Export Template

`GET /api/template/v2/templates/{templateId}/export`

Use this API to export the metadata of a specific template in JSON format in order to migrate the template from one environment/tenant to another environment/tenant. The response body will be returned in JSON format and will include template details such as questions, rules, skip/show logic, etc. 

 > 🗒 Things to Know
 >
 > - The JSON response body returned by this API can be pasted within the [Import Template](https://developer.onetrust.com/onetrust/reference/importtemplatebyidusingpost) API's request body to import the metadata of the template into the environment/tenant.
 > - The `templateRootVersionId` must be passed as the value for the `templateId` parameter if you are passing the `templateVersion` query parameter in the request.
 > - The response of this API will vary based on whether the `templateVersion` parameter is passed.
 > - If this parameter is not passed, then the template corresponding to the `templateId` will be exported.
 > - If a specific version value is passed for this parameter, then that version of the template will be exported.
 > - If `latest` is passed for this parameter, then the latest version of the template will be exported.

## Path parameters

- `templateId` string, uuid, required — The UUID of the template to export

## Query parameters

- `templateVersion` string — The version of the template to export. If not specified, exports the template corresponding to templateId. If 'latest' is passed, exports the latest version of the template.

## Response `200`

OK

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/versions/21de3aa0b170/schema)
