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

# Get Template Files as Data Uri

GET https://api.hellosign.com/v3/template/files_as_data_uri/{template_id}

Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only).

If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event.

Reference: https://developers.hellosign.com/api/template/files-as-data-uri

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Dropbox Sign API
  version: 1.0.0
paths:
  /template/files_as_data_uri/{template_id}:
    get:
      operationId: filesAsDataUri
      summary: Get Template Files as Data Uri
      description: >-
        Obtain a copy of the current documents specified by the `template_id`
        parameter. Returns a JSON object with a `data_uri` representing the
        base64 encoded file (PDFs only).


        If the files are currently being prepared, a status code of `409` will
        be returned instead. In this case please wait for the `template_created`
        callback event.
      tags:
        - Template
      parameters:
        - name: template_id
          in: path
          description: The id of the template files to retrieve.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >
            Your API key can be used to make calls to the Dropbox Sign API. See
            [Authentication](/api/reference/authentication) for more
            information.

            ✅ Supported by Try it console (calls sent in `test_mode`
            only).            
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResponseDataUri'
        '400':
          description: failed_operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
servers:
  - url: https://api.hellosign.com/v3
    description: https://api.hellosign.com/v3
components:
  schemas:
    FileResponseDataUri:
      type: object
      properties:
        data_uri:
          type: string
          description: File as base64 encoded string.
      required:
        - data_uri
      title: FileResponseDataUri
    ErrorResponseError:
      type: object
      properties:
        error_msg:
          type: string
          description: Message describing an error.
        error_path:
          type: string
          description: Path at which an error occurred.
        error_name:
          type: string
          description: >-
            Name of the error. See the `x-error-codes` catalog in openapi file
            for a complete list of possible error codes with detailed
            information including HTTP status codes, causes, remediation steps,
            and retry guidance.
      required:
        - error_msg
        - error_name
      description: Contains information about an error that occurred.
      title: ErrorResponseError
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorResponseError'
      required:
        - error
      title: ErrorResponse
  securitySchemes:
    Basic:
      type: http
      scheme: basic
      description: >
        Your API key can be used to make calls to the Dropbox Sign API. See
        [Authentication](/api/reference/authentication) for more information.

        ✅ Supported by Try it console (calls sent in `test_mode`
        only).            
    Bearer:
      type: http
      scheme: bearer
      description: >
        You can use an Access Token issued through an OAuth flow to send calls
        to the Dropbox Sign API from your app. The access scopes required by
        this endpoint are listed in the gray box above. See
        [Authentication](/api/reference/authentication) for more information.
          ❌ **Not supported** by Try it console.

```

## Examples



**Response**

```json
{
  "data_uri": "string",
  "expires_at": 1458605123,
  "file_url": "https://s3.amazonaws.com/hellofax_uploads/super_groups/2016/03/18/9aba07a585d7e223b4f137c8981c5e5892893c00/merged-completed.pdf?AWSAccessKeyId=AKIAJWEWDFQHQMBECJZA&amp;Expires=1452868903&amp;Signature=M%2FNDS%2BQre8xjPvzm7fHf%2BjO8Zbc%3D"
}
```

**SDK Code**

```php PHP
<?php

namespace Dropbox\SignSandbox;

require_once __DIR__ . '/../vendor/autoload.php';

use SplFileObject;
use Dropbox;

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();
$config->setUsername("YOUR_API_KEY");
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

try {
    $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateFilesAsDataUri(
        template_id: "f57db65d3f933b5316d398057a36176831451a35",
    );

    print_r($response);
} catch (Dropbox\Sign\ApiException $e) {
    echo "Exception when calling TemplateApi#templateFilesAsDataUri: {$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 TemplateFilesAsDataUriExample
{
    public static void Run()
    {
        var config = new Configuration();
        config.Username = "YOUR_API_KEY";
        // config.AccessToken = "YOUR_ACCESS_TOKEN";

        try
        {
            var response = new TemplateApi(config).TemplateFilesAsDataUri(
                templateId: "f57db65d3f933b5316d398057a36176831451a35"
            );

            Console.WriteLine(response);
        }
        catch (ApiException e)
        {
            Console.WriteLine("Exception when calling TemplateApi#TemplateFilesAsDataUri: " + 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.templateFilesAsDataUri(
  "f57db65d3f933b5316d398057a36176831451a35", // templateId
).then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling TemplateApi#templateFilesAsDataUri:");
  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 TemplateFilesAsDataUriExample
{
    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).templateFilesAsDataUri(
                "f57db65d3f933b5316d398057a36176831451a35" // templateId
            );

            System.out.println(response);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri");
            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_files_as_data_uri(
        "f57db65d3f933b5316d398057a36176831451a35", # template_id
    )

    p response
rescue Dropbox::Sign::ApiError => e
    puts "Exception when calling TemplateApi#template_files_as_data_uri: #{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_files_as_data_uri(
            template_id="f57db65d3f933b5316d398057a36176831451a35",
        )

        pprint(response)
    except ApiException as e:
        print("Exception when calling TemplateApi#template_files_as_data_uri: %s\n" % e)

```

```go Template Files
package main

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

func main() {

	url := "https://api.hellosign.com/v3/template/files_as_data_uri/f57db65d3f933b5316d398057a36176831451a35"

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

	req.SetBasicAuth("<apiKey>", "")

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

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

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

}
```

```swift Template Files
import Foundation

let credentials = Data("<apiKey>:".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/template/files_as_data_uri/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()
```