1

The following screenshot is the manual approach to duplicate a template.

enter image description here

Is there an API to do it?

# API like this

HelloSignClient.duplicate_template(template_id)
Ryan Lyu
  • 4,180
  • 5
  • 35
  • 51

1 Answers1

2

This is Hazem from HelloSign API Support team.

Take a look at the /template endpoints - to replicate the "Duplicate" feature on hellosign.com for templates, you'd use GET /template/files (if you need the original files), and then POST /template/update_files. That creates a new template using the original template's overlay, and the "new" or the same documents that you pass in (which in this case would be files from your GET /template/files call).

For more details about this endpoint, please check the links below:

*Update Template Files https://app.hellosign.com/api/reference#update_template_files

*Get Template Files https://app.hellosign.com/api/reference#get_template_files

hhamed
  • 21
  • 1
  • This approach works, but it also has a potential concurrency problem. when multiple users try to create duplications based on one template, this error will be raised. `Message: {"error":{"error_msg":"The template is still being created, please wait for the callback event: template_created","error_name":"conflict"}}` – Ryan Lyu Jul 30 '20 at 06:06
  • Totally understood, Ryan. If we may ask, how frequent is your flow going to hit that endpoint to duplicate the same template? Also, are those requests hitting the same template with the original ID or the newly created template ID to make a duplicate out of it? If you prefer to dig deeper into a better workaround, please feel free to email us at apisupport@hellosign.com. – hhamed Jul 31 '20 at 17:12