> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.synthesia.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.synthesia.io/docs/_mcp/server.

# Retrieve a template

GET https://api.synthesia.io/v2/templates/{template_id}

You can use Retrieve a template endpoint to pull information on a template. In particular, you may use it to find out the variables available for customisation.

Reference: https://developers.synthesia.io/docs/video-api-reference/templates/retrieve-a-template

## Authentication

- `Authorization` header (required) — API Key authentication via header

## Request

### Path parameters

- `template_id` (string, required) — The ID of the template to be retrieved.

## Response

### 200

OK.

- `templateId` (string, required) — Unique identifier of the template from which to create this video. This may be retrieved from the templates page in STUDIO.
- `templateData` (TemplateResponseTemplateData, required)
- `callbackId` (string, optional) — A callback ID that you may attach to the Video object. This is useful in the scenario where you need to store additional metadata on the video.
- `createdAt` (integer, optional)
- `ctaSettings` (CtaSettings, optional)
- `description` (string, optional) — Description of the video (used on the video's share page). Defaults to the template description.
- `test` (boolean, optional, default: false) — Describes if the video is a test video. Test videos do not count towards your quota but are rendered with a watermark.
- `title` (string, optional) — Title of the video (used on the video's share page). Defaults to the template title.
- `visibility` (enum, optional, default: private) — Describes the private settings of the video. - If public, the video's share page is active. - If private, the video's share page is not active; visitors will receive a 404 Not Found response.
  - Allowed values: `private`, `public`
- `brandKitId` (string, optional, nullable) — Brand kit ID for the video. Defaults to 'workspace_default' if not set. Use 'no_brand_kit' for no branding, or a UUID for a custom brand kit.
- `download` (string, optional)
- `duration` (string, optional)
- `id` (string, optional)
- `lastUpdatedAt` (integer, optional)
- `variables` (list of TemplateResponseVariablesItems, optional)

## Errors

### 400 Bad Request Error

Bad request.

- `error` (string, required)
- `context` (string, optional)

### 403 Forbidden Error

Forbidden - Wrong API key.

- `error` (string, required)
- `context` (string, optional)

### 404 Not Found Error

Template not found.

- `error` (string, required)
- `context` (string, optional)

## Types

### TemplateResponseTemplateData

### CtaSettings

- `label` (string, required) — Label for a call-to-action button.
- `url` (string, required) — URL to navigate to, when the call-to-action button is clicked.

### TemplateResponseVariablesItems

## Examples

**Response**

```json
{
  "templateId": "string",
  "templateData": {},
  "callbackId": "string",
  "createdAt": 1,
  "ctaSettings": {
    "label": [
      "Learn More",
      "Sign up"
    ],
    "url": [
      "https://example.com",
      "https://signup.example.com"
    ]
  },
  "description": "string",
  "test": false,
  "title": "string",
  "visibility": "private",
  "brandKitId": "string",
  "download": "string",
  "duration": "string",
  "id": "string",
  "lastUpdatedAt": 1,
  "variables": [
    {}
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.synthesia.io/v2/templates/template_id"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.synthesia.io/v2/templates/template_id';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.synthesia.io/v2/templates/template_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.synthesia.io/v2/templates/template_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.synthesia.io/v2/templates/template_id")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.synthesia.io/v2/templates/template_id', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.synthesia.io/v2/templates/template_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.synthesia.io/v2/templates/template_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```