---
title: "Get template by ID"
full: true
_openapi:
  method: GET
  toc: []
  structuredData:
    headings: []
    contents:
      - content: "Retrieves a single template by its ID"
_apiData:
  document: "https://reloop.sh/api/template/openapi/json"
  operationData: [{"path":"/api/template/v1/{id}","method":"get"}]
  parameterList: [{"name":"id","type":"string","required":true,"description":"","location":"path"}]
  responseMap: {"200":{"description":"Response for status 200","schema":{"id":"con_123456789","name":"Newsletter","description":"example_description","subject":"Welcome to Reloop","fromEmail":"example_fromEmail","replyTo":"example_replyTo","previewText":"example_previewText","organizationId":"example_organizationId","createdByUserId":"example_createdByUserId","status":"draft","content":[],"variables":[{"name":"Newsletter","type":"string","defaultValue":null}],"currentVersion":0,"thumbnailUrl":"example_thumbnailUrl","isDefault":true,"deletedAt":null,"createdAt":"2026-03-23T10:00:00.000Z","updatedAt":"2026-03-23T10:00:00.000Z"}},"400":{"description":"Standard error response format","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"401":{"description":"Standard error response format","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"403":{"description":"Standard error response format","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"404":{"description":"Standard error response format","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}},"500":{"description":"Standard error response format","schema":{"message":"Contact already exists","why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}}}
  codeSamples:
    - id: node
      lang: javascript
      label: Node.js
      source: |-
        import { Reloop } from "reloop-email";
        
        const reloop = new Reloop({ apiKey: "rl_123456789" });
        
        const template = await reloop.template.retrieve("tpl_123456789");
    - id: curl
      lang: bash
      label: cURL
      source: |-
        curl https://reloop.sh/template/v1/tpl_123456789 \\
          -H "Authorization: Bearer rl_123456789"
    - id: python
      lang: python
      label: Python
      source: |-
        import requests
        
        response = requests.get(
            "https://reloop.sh/template/v1/tpl_123456789",
            headers={
                "Authorization": "Bearer rl_123456789",
            },
        )
        
        template = response.json()
    - id: php
      lang: php
      label: PHP
      source: |-
        <?php
        $client = new \\GuzzleHttp\\Client();
        
        $response = $client->get('https://reloop.sh/template/v1/tpl_123456789', [
            'headers' => [
                'Authorization' => 'Bearer rl_123456789',
            ],
        ]);
        
        $template = json_decode($response->getBody(), true);
    - id: java
      lang: java
      label: Java
      source: |-
        import java.net.URI;
        import java.net.http.*;
        
        HttpClient client = HttpClient.newHttpClient();
        
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://reloop.sh/template/v1/tpl_123456789"))
            .header("Authorization", "Bearer rl_123456789")
            .GET()
            .build();
        
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
    - id: dotnet
      lang: csharp
      label: .NET
      source: |-
        using System.Net.Http;
        
        var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer rl_123456789");
        
        var response = await client.GetAsync(
            "https://reloop.sh/template/v1/tpl_123456789"
        );
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


{/* This file was generated by the OpenAPI doc generator. Do not edit this file directly. Run `bun run generate:api-docs` to regenerate. */}

<APIPage />
