Skip to navigation

Create embeddable agreement URL

View as Markdown

Creates a unique URL for the elastic signing agreement that you can embed in your application. The URL expires after one hour.

Required authentication scopes: click.manage and click.send.

The request must include at least the clientUserId. This is a value that you generate to identify the unique recipient of the agreement.

If you are using a dynamic content document, you can supply the values in the documentData property of the request, like this:

{
"clientUserId": "cl-bc7f-48a9",
"documentData": {
"fullName": "T. J. Fanning",
"email": "tj@example.com",
"company": "Fanning Industries",
"title": "Cat wrangler",
"date": "2022-10-13T05:17:14-07:00"
}
}

A response looks like this. The agreementUrl is unique to the user identified by the clientUserId. Your user can open the URL to approve the agreement. The documentData property appears only if you provided it in the request.

{
"accountId": "624e3e00-xxxx-xxxx-xxxx-43918c520dab",
"clickwrapId": "0e64e4a7-xxxx-xxxx-xxxx-ce5a93b162af",
"clientUserId": "tcl-bc7f-48a9j",
"agreementId": "1f346c7d-xxxx-xxxx-xxxx-a5c968666785",
"documents": [ . . .],
"consumerDisclosureEnabled": true,
"agreementUrl": "https://demo.docusign.net/clickapi/v1/redeem?agreementToken=AcTZT8g ... cxEqrUsA1lQ8DPPy05dE0",
"createdOn": "2022-10-20T16:27:25.1287685Z",
"status": "created",
"versionId": "5957716d-xxxx-xxxx-xxxx-e1594f00ff12",
"versionNumber": 1,
"settings": {
"displayName": "Agree with me",
"hasDeclineButton": true,
. . .
"statementAlignment": "bottom"
},
"documentData": {
"fullName": "T. J. Fanning",
"email": "tj@example.com",
"company": "Fanning Industries",
"title": "Cat wrangler",
"date": "2022-10-13T05:17:14-07:00"
}
}

A successful response always includes the following response. The response code is different, depending on whether the user has agreed:

Response codeMeaningNotes
200User has agreed.The agreementUrl property does not appear in the response body.
201User has not yet agreed.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

accountIdstringRequired

The external account number (int) or account ID GUID.

clickwrapIdstringRequired
The GUID of the elastic template.

Request

This endpoint expects an object: userAgreementRequest

clientUserIdstringOptional

A unique value that identifies a user. You can use anything that your system uses to identify unique users, such as employee IDs, email addresses, and surrogate keys as the value of clientUserId.

A clickwrap with a specific clientUserId will not appear again once it has been accepted.

documentDatamap from strings to stringsOptional

This property specifies the data used to create an elastic template with dynamic content.

metadatastringOptional

A customer-defined string you can use in requests. This string will appear in the corresponding response.

returnUrlstringOptional
The URL to redirect to after the agreement is complete when the agreement is not rendered in an iframe.

Response

Successful response.
accountIdstringOptional

The external account number (int) or account ID GUID.

agreedOnobjectOptional

Date that the client last completed the agreement.

This property is null if agreementUrl is not null and status is not agreed.

agreementIdstringOptional
The agreement ID.
agreementUrlstringOptional

When not null, an agreement is required for user specified by clientUserId.

When missing the user specified by clientUserId has already agreed and does not require a new acceptance.

Use this URL to render the agreement in a web page.

clickwrapIdstringOptional
The GUID of the elastic template.
clientUserIdstringOptional

A unique value that identifies a user. You can use anything that your system uses to identify unique users, such as employee IDs, email addresses, and surrogate keys as the value of clientUserId.

An elastic signing agreement with a specific clientUserId will not appear again once it has been accepted.

consumerDisclosureEnabledbooleanOptional

True if consumer disclosure was required by this agreement.

consumerDisclosureHtmlstringOptional

The customer-branded HTML with the Electronic Record and Signature Disclosure information

createdOnobjectOptional
The date when the elastic template was created. May be null.
dataFieldslist of objectsOptional

An array of dataField objects.

declinedOnobjectOptional

The date when the user declined the most recent required agreement.

This property is valid only when status is declined. Otherwise it is null.

documentDatamap from strings to stringsOptional

This property specifies the data used to create an elastic template with dynamic content.

documentslist of objectsOptional
An array of documents.
metadatastringOptional

A customer-defined string you can use in requests. This string will appear in the corresponding response.

returnUrlstringOptional
The URL redirected to after the agreement was completed.
settingsobjectOptional
Information about how an agreement is displayed.
statusstringOptional

User agreement status. One of:

  • created
  • agreed
  • declined
styleobjectOptional

This property specifies the custom style provided when the agreement was created by customizing the template appearance.

versionstringOptional

The human-readable semver version string.

versionIdstringOptional
The ID of the version.
versionNumberintegerOptional

Human-readable version number. For example 1.2.

Errors

400
Bad Request Error