Create web form instance
The Web Forms API is available in all developer accounts, but only in certain production account plans. Contact Docusign Support or your account manager to find out whether the Web Forms API is available for your production account plan.
Creates an instance of a web form.
This endpoint returns a formUrl and instanceToken that you combine to obtain a secure URL. Use this URL to render the web form instance in your application.
Required authentication scopes: signature, webforms_instance_write.
Related topics
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
Key-value pairs used to prefill fields in the web form instance. The keys correspond to the componentName values of the formContent.components object on the WebForm (configuration) object. See Form field definitions for more information.
For keys of type TextBox, Email, Date, Select, and RadioButtonGroup, the value should be a string. For keys of type Number, the value should be a number. For keys of type CheckboxGroup, the value should be an array of strings. For keys of type PhoneNumber, the value should be an object with the properties countryCode and nationalNumber. See Supply prefill values in the request to create a web form instance for more information and an example Instances:createInstance request body with a formValues object.
Note that you do not have to include values for every component. This property is optional.
For remote web form instances, if the Instances:createInstance request does not include a recipients object, the formValues object must supply a name and email address for each user who will receive an envelope email. If a phone number is needed for identity verification, the formValues object must supply it as well if the request does not include a recipients object. See Deliver remote web form instances to users for more information.
A sender-generated value that indicates the date and time that the signer was authenticated.
A value that most closely matches the technique your application used to authenticate the recipient / signer.
Specify the number of hours after which the form instance expires. For example, if the form expiration is set to 5 days, you should specify 120. The default value is 720 hours (30 days).
For remote web form instances, this object defines users who will receive an envelope email. The recipients object can be included only when the sendOption property is set to now.
Instead of using the recipients object to define users who will receive an envelope email, you can use the formValues object to provide the required user information. However, if the recipients object is used, a roleName, name, and email are required for each user. If a phone number is needed for identity verification that is enabled for a user’s role in the web form template, a phoneNumber is required as well. See Deliver remote web form instances to users for more information.
For web form instances that are displayed in an embedded view or via a redirect to the Docusign platform, the recipients object should be omitted.
Response
This object represents the eSignature envelope that is associated with the web form instance. An instance has an associated envelope if any of the following is true:
- The instance was created from a template-based web form configuration, was displayed to the user in an embedded view, and the user submitted the instance, which resulted in the generation of an envelope.
- The instance was created from a template-based web form configuration, was displayed to the user via a redirect to the Docusign platform, and the user submitted the instance, which resulted in the generation of an envelope.
- The instance was created from a template-based web form configuration, and the
Instances:createInstancerequest specified a remote web form instance. For this flow, an envelope is generated when the instance is created.
Web form instances generated from standalone configurations do not have envelopes associated with them.
Key-value pairs that represent the current values of the fields in the web form instance. The keys correspond to the componentName values of the formContent.components object on the WebForm (configuration) object. See Form field definitions for more information.
See Request that retrieves web form instance values for an example of a formValues object returned by this request.
This object contains information about the users who fill out a web form instance and its associated envelope.
If the web form template has roles that do not fill out the web form instance, this object does not include users associated with those roles.