# Get Embedded Template Edit URL POST https://api.hellosign.com/v3/embedded/edit_url/{template_id} Content-Type: application/json Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. Reference: https://developer.hellosign.com/api/embedded/edit-url ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Embedded Template Edit URL version: endpoint_embedded.editUrl paths: /embedded/edit_url/{template_id}: post: operationId: edit-url summary: Get Embedded Template Edit URL description: >- Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. tags: - - subpackage_embedded parameters: - name: template_id in: path description: The id of the template to edit. 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/EmbeddedEditUrlResponse' '400': description: failed_operation content: {} requestBody: content: application/json: schema: $ref: '#/components/schemas/EmbeddedEditUrlRequest' components: schemas: SubEditorOptions: type: object properties: allow_edit_signers: type: boolean default: false description: Allows requesters to edit the list of signers allow_edit_documents: type: boolean default: false description: Allows requesters to edit documents, including delete and add SubMergeFieldType: type: string enum: - value: text - value: checkbox SubMergeField: type: object properties: name: type: string description: The name of the merge field. Must be unique. type: $ref: '#/components/schemas/SubMergeFieldType' description: >- The type of merge field. Below are the allowed [field types](/api/reference/constants/#field-types). required: - name - type EmbeddedEditUrlRequest: type: object properties: allow_edit_ccs: type: boolean default: false description: >- This allows the requester to enable/disable to add or change CC roles when editing the template. cc_roles: type: array items: type: string description: >- The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. editor_options: $ref: '#/components/schemas/SubEditorOptions' force_signer_roles: type: boolean default: false description: Provide users the ability to review/edit the template signer roles. force_subject_message: type: boolean default: false description: >- Provide users the ability to review/edit the template subject and message. merge_fields: type: array items: $ref: '#/components/schemas/SubMergeField' description: >- Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template. Remove all merge fields on the template by passing an empty array `[]`. preview_only: type: boolean default: false description: >- This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set). show_preview: type: boolean default: false description: This allows the requester to enable the editor/preview experience. show_progress_stepper: type: boolean default: true description: >- When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. test_mode: type: boolean default: false description: >- Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. EmbeddedEditUrlResponseEmbedded: type: object properties: edit_url: type: string description: A template url that can be opened in an iFrame. expires_at: type: integer description: The specific time that the the `edit_url` link expires, in epoch. WarningResponse: type: object properties: warning_msg: type: string description: Warning message warning_name: type: string description: Warning name required: - warning_msg - warning_name EmbeddedEditUrlResponse: type: object properties: embedded: $ref: '#/components/schemas/EmbeddedEditUrlResponseEmbedded' warnings: type: array items: $ref: '#/components/schemas/WarningResponse' description: A list of warnings. required: - embedded ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); $merge_fields = [ ]; $embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) ->setCcRoles([ "", ]) ->setMergeFields($merge_fields); try { $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( template_id: "f57db65d3f933b5316d398057a36176831451a35", embedded_edit_url_request: $embedded_edit_url_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$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 EmbeddedEditUrlExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; var mergeFields = new List(); var embeddedEditUrlRequest = new EmbeddedEditUrlRequest( ccRoles: [ "", ], mergeFields: mergeFields ); try { var response = new EmbeddedApi(config).EmbeddedEditUrl( templateId: "f57db65d3f933b5316d398057a36176831451a35", embeddedEditUrlRequest: embeddedEditUrlRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedEditUrl: " + 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.EmbeddedApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; const mergeFields = [ ]; const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { ccRoles: [ "", ], mergeFields: mergeFields, }; apiCaller.embeddedEditUrl( "f57db65d3f933b5316d398057a36176831451a35", // templateId embeddedEditUrlRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); 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 EmbeddedEditUrlExample { 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"); var mergeFields = new ArrayList(List.of ()); var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); embeddedEditUrlRequest.ccRoles(List.of ( "" )); embeddedEditUrlRequest.mergeFields(mergeFields); try { var response = new EmbeddedApi(config).embeddedEditUrl( "f57db65d3f933b5316d398057a36176831451a35", // templateId embeddedEditUrlRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); 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 merge_fields = [ ] embedded_edit_url_request = Dropbox::Sign::EmbeddedEditUrlRequest.new embedded_edit_url_request.cc_roles = [ "", ] embedded_edit_url_request.merge_fields = merge_fields begin response = Dropbox::Sign::EmbeddedApi.new.embedded_edit_url( "f57db65d3f933b5316d398057a36176831451a35", # template_id embedded_edit_url_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling EmbeddedApi#embedded_edit_url: #{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: merge_fields = [ ] embedded_edit_url_request = models.EmbeddedEditUrlRequest( cc_roles=[ "", ], merge_fields=merge_fields, ) try: response = api.EmbeddedApi(api_client).embedded_edit_url( template_id="f57db65d3f933b5316d398057a36176831451a35", embedded_edit_url_request=embedded_edit_url_request, ) pprint(response) except ApiException as e: print("Exception when calling EmbeddedApi#embedded_edit_url: %s\n" % e) ``` ```go Embedded Edit URL package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/embedded/edit_url/f57db65d3f933b5316d398057a36176831451a35" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Basic :") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Embedded Edit URL import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/embedded/edit_url/f57db65d3f933b5316d398057a36176831451a35")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ``` ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); $merge_fields = [ ]; $embedded_edit_url_request = (new Dropbox\Sign\Model\EmbeddedEditUrlRequest()) ->setCcRoles([ "", ]) ->setMergeFields($merge_fields); try { $response = (new Dropbox\Sign\Api\EmbeddedApi(config: $config))->embeddedEditUrl( template_id: "f57db65d3f933b5316d398057a36176831451a35", embedded_edit_url_request: $embedded_edit_url_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling EmbeddedApi#embeddedEditUrl: {$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 EmbeddedEditUrlExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; var mergeFields = new List(); var embeddedEditUrlRequest = new EmbeddedEditUrlRequest( ccRoles: [ "", ], mergeFields: mergeFields ); try { var response = new EmbeddedApi(config).EmbeddedEditUrl( templateId: "f57db65d3f933b5316d398057a36176831451a35", embeddedEditUrlRequest: embeddedEditUrlRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling EmbeddedApi#EmbeddedEditUrl: " + 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.EmbeddedApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; const mergeFields = [ ]; const embeddedEditUrlRequest: models.EmbeddedEditUrlRequest = { ccRoles: [ "", ], mergeFields: mergeFields, }; apiCaller.embeddedEditUrl( "f57db65d3f933b5316d398057a36176831451a35", // templateId embeddedEditUrlRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling EmbeddedApi#embeddedEditUrl:"); 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 EmbeddedEditUrlExample { 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"); var mergeFields = new ArrayList(List.of ()); var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); embeddedEditUrlRequest.ccRoles(List.of ( "" )); embeddedEditUrlRequest.mergeFields(mergeFields); try { var response = new EmbeddedApi(config).embeddedEditUrl( "f57db65d3f933b5316d398057a36176831451a35", // templateId embeddedEditUrlRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); 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 merge_fields = [ ] embedded_edit_url_request = Dropbox::Sign::EmbeddedEditUrlRequest.new embedded_edit_url_request.cc_roles = [ "", ] embedded_edit_url_request.merge_fields = merge_fields begin response = Dropbox::Sign::EmbeddedApi.new.embedded_edit_url( "f57db65d3f933b5316d398057a36176831451a35", # template_id embedded_edit_url_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling EmbeddedApi#embedded_edit_url: #{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: merge_fields = [ ] embedded_edit_url_request = models.EmbeddedEditUrlRequest( cc_roles=[ "", ], merge_fields=merge_fields, ) try: response = api.EmbeddedApi(api_client).embedded_edit_url( template_id="f57db65d3f933b5316d398057a36176831451a35", embedded_edit_url_request=embedded_edit_url_request, ) pprint(response) except ApiException as e: print("Exception when calling EmbeddedApi#embedded_edit_url: %s\n" % e) ``` ```go Default Example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/embedded/edit_url/f57db65d3f933b5316d398057a36176831451a35" payload := strings.NewReader("{\n \"cc_roles\": [\n \"\"\n ],\n \"merge_fields\": []\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Basic :") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Default Example import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let parameters = [ "cc_roles": [""], "merge_fields": [] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/embedded/edit_url/f57db65d3f933b5316d398057a36176831451a35")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```