> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Managing elastic templates

> See how to perform common elastic template management tasks, such as creating, activating, and embedding.

You can use the Click API to manage the different versions of your elastic templates, get a list of elastic templates, retrieve lists of users who have consented to your agreements, and more.

## Creating elastic templates

You can create an elastic template with the Click API, or you can generate one in the UI. For a detailed walkthrough of the process, see [How to create an elastic template](/docs/click-api/how-to/create-elastic-templates).

## Activating elastic templates

New elastic templates are inactive by default. After you create a new elastic templates, you must activate it before you can use it. To learn how, see [How to activate an elastic template](/docs/click-api/how-to/activate-elastic-template).

## Share elastic templates

Any users within your organization’s account can choose to share the elastic templates they have created.

To share an elastic template, open the **Elastic Templates** tab on the **Templates** page. Find the row of the elastic template you want to share, then choose the drop-down icon to the right of the **Copy Code** button. In the drop down menu, choose **Share**, then choose **Share** again in the confirmation window.

![Elastic template copy code dropdown image](/_fern-files/_img/6177238ca0ecd6b3f0840b4fcef893b31b991946516a699e9ab4b6255397e8fd.webp)

When an elastic template is shared, it becomes visible to the other users on your account in their **Shared with me** folder, under **Elastic Templates** on the left nav.

![Image of UI for sharing an elastic template](/_fern-files/_img/e6f20142c3fdfd8bfe49bd9d6bc5f4ffaf9cc9be926a91f9e181d77a9b2afa24.webp)

Other users can open, edit, and save their updates to your shared elastic template as **drafts**.

## Draft elastic templates

A *draft elastic template* is a set of updates to an existing elastic template that acts as a separate branch of the main elastic template from which it was created. A draft elastic template is created whenever you make and save updates to a elastic template without subsequently activating them.

The elastic template’s owner can choose to activate the draft at any time, merging it as a new version of the main elastic template.

Only one draft version of each elastic template can exist at once; if another user opens the current draft and makes a new set of edits before saving, the previous draft will be overwritten.

When you create an elastic template without activating it using an API or SDK method, a successful response will contain a GUID `draftVersionId`. To activate a draft using the API, you must provide the value of this draft version ID as the `clickwrapId` parameter for the [ClickWraps:updateClickwrapVersion](/docs/click-api/reference/accounts/clickwraps/updateclickwrapversion) method call.

## Embedding agreements using elastic templates

After you have [created](/docs/click-api/how-to/create-elastic-templates) and [activated](/docs/click-api/how-to/activate-elastic-template) your elastic template, you can use it by:

* **Embedding an agreement directly into your website or application**.
  Once your elastic template looks and behaves the way you expect, you can embed an instance of it in your own website or app. You can obtain the JavaScript code you need to embed your elastic signing agreement in one of the following ways:

  1. Writing a short piece of JavaScript code from scratch by following the steps in [How to embed an elastic signing agreement](/docs/click-api/how-to/embed-elastic-templates).
  2. Copying the JavaScript code from the UI by logging in to your [developer environment](https://account-d.docusign.com/) or [production environment](https://apps.docusign.com/send/home) account, going to **Templates -> Elastic Templates**, and selecting **COPY CODE** from the drop-down list next to the elastic template.

  See [To get the code for an elastic template](https://support.docusign.com/s/document-item?bundleId=igo1666647424726\&topicId=xmw1600983388178.html&_LANG=enus) in the Click API user guide for details on getting the code, and [How to embed an elastic signing agreement](/docs/click-api/how-to/embed-elastic-templates) for details on how to embed the elastic template instance within your website or application.
* **Generating an agreement URL through the API.**
  You can create a specific agreement URL that contains the client user ID and document data to be agreed on by the signer using the [ClickWraps:createHasAgreed](/docs/click-api/reference/accounts/clickwraps/createhasagreed) endpoint. You can create the agreement URL through the API for use with either of the above methods, either by embedding with `agreementUrl` instead of `environment`, `accountId`, and `clickwrapId`, or by sending this URL directly to the user to sign.

> **Note:** For compatibility with previous versions of the Click API, elastic templates use clickwrap endpoints.

## Download the certificate of completion

A certificate of completion is a record that is created after each Docusign eSignature and elastic signing agreement. It provides a permanent record of each sender, signer, approver, and recipient.

When using the Click API, you can download this certificate after an agreement is completed by using the [ClickWraps:getAgreementPdf](/docs/click-api/reference/accounts/clickwraps/getagreementpdf) endpoint and appending the query parameter `include_coc=true`.

For example:

```text
GET /clickapi/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements/{agreementId}?include_coc=true
```

You can get the agreement ID by:

* Looking at the body of the `onAgreed` [event callback](/docs/click-api/click101/callbacks):

  ```text
  docuSignClick.Clickwrap.render({ //... onAgreed: (agreementData) => { // agreementData.agreementId } }, '#host-element');
  ```
* Making a POST request to the [ClickWraps:createHasAgreed](/docs/click-api/reference/accounts/clickwraps/createhasagreed) endpoint, providing the `clientUserId` of the agreeing user as the value of the `accountId` parameter.

## Next steps

* See the [How-to guides](/docs/click-api/how-to) for code examples for common elastic signing scenarios.
* See the MyAPICalls sample app [Create and Activate an Elastic Template](https://myapicalls.sampleapps.docusign.com/scenario/3) scenario, which walks you through a sequence of API calls that define an elastic template and then activate it.