# Get Template GET https://api.hellosign.com/v3/template/{template_id} Returns the Template specified by the `template_id` parameter. Reference: https://developer.hellosign.com/api/template/get ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Template version: endpoint_template.get paths: /template/{template_id}: get: operationId: get summary: Get Template description: Returns the Template specified by the `template_id` parameter. tags: - - subpackage_template parameters: - name: template_id in: path description: The id of the Template to retrieve. required: true schema: type: string - name: Authorization in: header description: Basic authentication of the form `Basic `. required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/TemplateGetResponse' '400': description: failed_operation content: {} components: schemas: TemplateResponseSignerRole: type: object properties: name: type: string description: The name of the Role. order: type: integer description: If signer order is assigned this is the 0-based index for this role. TemplateResponseCCRole: type: object properties: name: type: string description: The name of the Role. TemplateResponseDocumentFieldGroupRule: type: object properties: requirement: type: string description: >- Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. groupLabel: type: string description: Name of the group TemplateResponseDocumentFieldGroup: type: object properties: name: type: string description: The name of the form field group. rule: $ref: '#/components/schemas/TemplateResponseDocumentFieldGroupRule' TemplateResponseFieldAvgTextLength: type: object properties: num_lines: type: integer description: Number of lines. num_chars_per_line: type: integer description: Number of characters per line. TemplateResponseDocumentFormFieldTextValidationType: type: string enum: - value: numbers_only - value: letters_only - value: phone_number - value: bank_routing_number - value: bank_account_number - value: email_address - value: zip_code - value: social_security_number - value: employer_identification_number - value: custom_regex TemplateResponseDocumentFormFieldBase: oneOf: - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. avg_text_length: $ref: '#/components/schemas/TemplateResponseFieldAvgTextLength' isMultiline: type: boolean description: Whether this form field is multiline text. originalFontSize: type: integer description: Original font size used in this form field's text. fontFamily: type: string description: Font family used in this form field's text. validation_type: oneOf: - $ref: >- #/components/schemas/TemplateResponseDocumentFormFieldTextValidationType - type: 'null' description: >- Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. validation_custom_regex: type: - string - 'null' description: >- When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field. validation_custom_regex_format_label: type: - string - 'null' description: >- When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: text variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: dropdown variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. avg_text_length: $ref: '#/components/schemas/TemplateResponseFieldAvgTextLength' isMultiline: type: boolean description: Whether this form field is multiline text. originalFontSize: type: integer description: Original font size used in this form field's text. fontFamily: type: string description: Font family used in this form field's text. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: hyperlink variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: checkbox variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: string description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type - group description: radio variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: signature variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: date_signed variant - type: object properties: type: type: string api_id: type: string description: A unique id for the form field. name: type: string description: The name of the form field. signer: type: string description: The signer of the Form Field. x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. required: - type description: initials variant discriminator: propertyName: type TemplateResponseDocumentCustomFieldBase: oneOf: - type: object properties: type: type: string api_id: type: string description: The unique ID for this field. name: type: string description: The name of the Custom Field. signer: type: - string - 'null' description: >- The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. avg_text_length: $ref: '#/components/schemas/TemplateResponseFieldAvgTextLength' isMultiline: type: boolean description: Whether this form field is multiline text. originalFontSize: type: integer description: Original font size used in this form field's text. fontFamily: type: string description: Font family used in this form field's text. required: - type description: text variant - type: object properties: type: type: string api_id: type: string description: The unique ID for this field. name: type: string description: The name of the Custom Field. signer: type: - string - 'null' description: >- The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). x: type: integer description: The horizontal offset in pixels for this form field. 'y': type: integer description: The vertical offset in pixels for this form field. width: type: integer description: The width in pixels of this form field. height: type: integer description: The height in pixels of this form field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: checkbox variant discriminator: propertyName: type TemplateResponseDocumentStaticFieldBase: oneOf: - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: text variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: dropdown variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: hyperlink variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: checkbox variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: radio variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: signature variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: date_signed variant - type: object properties: type: type: string api_id: type: string description: A unique id for the static field. name: type: string description: The name of the static field. signer: type: string default: me_now description: The signer of the Static Field. x: type: integer description: The horizontal offset in pixels for this static field. 'y': type: integer description: The vertical offset in pixels for this static field. width: type: integer description: The width in pixels of this static field. height: type: integer description: The height in pixels of this static field. required: type: boolean description: Boolean showing whether or not this field is required. group: type: - string - 'null' description: >- The name of the group this field is in. If this field is not a group, this defaults to `null`. required: - type description: initials variant discriminator: propertyName: type TemplateResponseDocument: type: object properties: name: type: string description: Name of the associated file. index: type: integer description: >- Document ordering, the lowest index is displayed first and the highest last (0-based indexing). field_groups: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentFieldGroup' description: An array of Form Field Group objects. form_fields: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' description: >- An array of Form Field objects containing the name and type of each named field. custom_fields: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentCustomFieldBase' description: >- An array of Form Field objects containing the name and type of each named field. static_fields: type: array items: $ref: '#/components/schemas/TemplateResponseDocumentStaticFieldBase' description: >- An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. TemplateResponseAccountQuota: type: object properties: templates_left: type: integer description: API templates remaining. api_signature_requests_left: type: integer description: API signature requests remaining. documents_left: type: integer description: Signature requests remaining. sms_verifications_left: type: integer description: SMS verifications remaining. TemplateResponseAccount: type: object properties: account_id: type: string description: The id of the Account. email_address: type: string description: The email address associated with the Account. is_locked: type: boolean description: >- Returns `true` if the user has been locked out of their account by a team admin. is_paid_hs: type: boolean description: Returns `true` if the user has a paid Dropbox Sign account. is_paid_hf: type: boolean description: Returns `true` if the user has a paid HelloFax account. quotas: $ref: '#/components/schemas/TemplateResponseAccountQuota' SignatureRequestResponseAttachment: type: object properties: id: type: string description: The unique ID for this attachment. signer: type: string description: The Signer this attachment is assigned to. name: type: string description: The name of this attachment. required: type: boolean description: A boolean value denoting if this attachment is required. instructions: type: - string - 'null' description: Instructions for Signer. uploaded_at: type: - integer - 'null' description: Timestamp when attachment was uploaded by Signer. required: - id - signer - name - required TemplateResponse: type: object properties: template_id: type: string description: The id of the Template. title: type: string description: >- The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. message: type: string description: >- The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. updated_at: type: integer description: Time the template was last updated. is_embedded: type: - boolean - 'null' description: >- `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. is_creator: type: boolean description: >- `true` if you are the owner of this template, `false` if it's been shared with you by a team member. can_edit: type: boolean description: >- Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). is_locked: type: boolean description: >- Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. metadata: type: object additionalProperties: description: Any type description: The metadata attached to the template. signer_roles: type: array items: $ref: '#/components/schemas/TemplateResponseSignerRole' description: >- An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. cc_roles: type: array items: $ref: '#/components/schemas/TemplateResponseCCRole' description: >- An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. documents: type: array items: $ref: '#/components/schemas/TemplateResponseDocument' description: >- An array describing each document associated with this Template. Includes form field data for each document. custom_fields: type: - array - 'null' items: $ref: '#/components/schemas/TemplateResponseDocumentCustomFieldBase' description: >- Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. named_form_fields: type: - array - 'null' items: $ref: '#/components/schemas/TemplateResponseDocumentFormFieldBase' description: >- Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. accounts: type: array items: $ref: '#/components/schemas/TemplateResponseAccount' description: An array of the Accounts that can use this Template. attachments: type: array items: $ref: '#/components/schemas/SignatureRequestResponseAttachment' description: Signer attachments. WarningResponse: type: object properties: warning_msg: type: string description: Warning message warning_name: type: string description: Warning name required: - warning_msg - warning_name TemplateGetResponse: type: object properties: template: $ref: '#/components/schemas/TemplateResponse' warnings: type: array items: $ref: '#/components/schemas/WarningResponse' description: A list of warnings. required: - template ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateGet( template_id: "f57db65d3f933b5316d398057a36176831451a35", ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling TemplateApi#templateGet: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class TemplateGetExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { var response = new TemplateApi(config).TemplateGet( templateId: "f57db65d3f933b5316d398057a36176831451a35" ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling TemplateApi#TemplateGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.templateGet( "f57db65d3f933b5316d398057a36176831451a35", // templateId ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling TemplateApi#templateGet:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class TemplateGetExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); try { var response = new TemplateApi(config).templateGet( "f57db65d3f933b5316d398057a36176831451a35" // templateId ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling TemplateApi#templateGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" # config.access_token = "YOUR_ACCESS_TOKEN" end begin response = Dropbox::Sign::TemplateApi.new.template_get( "f57db65d3f933b5316d398057a36176831451a35", # template_id ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling TemplateApi#template_get: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: try: response = api.TemplateApi(api_client).template_get( template_id="f57db65d3f933b5316d398057a36176831451a35", ) pprint(response) except ApiException as e: print("Exception when calling TemplateApi#template_get: %s\n" % e) ``` ```go Get Template package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/template/f57db65d3f933b5316d398057a36176831451a35" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Basic :") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Get Template import Foundation let headers = ["Authorization": "Basic :"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/template/f57db65d3f933b5316d398057a36176831451a35")! 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() ```