Direct To Docusign Model
Overview
The Direct to DocuSign model allows you to generate and send DocuSign envelopes directly through Quik!'s eSignature API. Rather than building your own envelope creation service, you provide form IDs, prefill data, and recipient information — Quik! handles document rendering, tab mapping, and all DocuSign API communication.
This model is a good fit if you:
Don't want to build or host your own envelope creation service
Want Quik! to fully manage tab placement and role mapping
Need draft review capability before sending
Need to bundle multiple forms into a single envelope
Compared to the Self Service model, Direct to DocuSign removes the infrastructure burden while still supporting role-based signing, draft workflows, and multi-package envelopes.
Authentication
All requests require a Bearer token obtained via the Resource Owner Password Credentials OAuth flow.
Include the token in the Authorization header of every request:
http
Authorization: Bearer <access_token>Contact Quik! support for your token endpoint URL and credentials.
The Two-Call Flow
Sending an envelope requires two sequential API calls:
Generate SignData and PrintData — Call the QFE engine to render your forms and produce the tab mapping and recipient data needed for signing.
Create the Envelope — Pass the output from Call 1 into the envelope creation endpoint, which constructs and sends (or drafts) the DocuSign envelope.
Call 1 — Generate SignData and PrintData
Endpoint
http
POST /rest/quikformsengine/qfe/execute/htmlRequest
To use the Direct to DocuSign model, include GenerateSignData: true and GeneratePrintData: true in your request body alongside your form and recipient data.
json
{
"HostFormOnQuik": true,
"QuikFormID": "95507",
"ForSign": true,
"GeneratePrintData": true,
"GenerateSignData": true,
"FormFields": [
{ "FieldName": "1own.FullName", "FieldValue": "Margaret Holloway" },
{ "FieldName": "1own.H.Email", "FieldValue": "m.holloway@example.com" },
{ "FieldName": "2own.FullName", "FieldValue": "Derek Fontaine" },
{ "FieldName": "2own.H.Email", "FieldValue": "d.fontaine@example.com" },
{ "FieldName": "1authind.FullName", "FieldValue": "Sandra Keplinger" },
{ "FieldName": "1authind.H.Email", "FieldValue": "s.keplinger@example.com" }
],
"ESignType": {
"EnableInternationalPhoneNumber": false,
"AuthUserID": "DocuSignEngiIAM",
"UseDisclosure": false,
"SignMultipleDocs": true,
"EnforceSignerVisibility": true,
"SignEnvironmentID": 2,
"SignCallbackURL": "https://websvcs.quikforms.com/rest/ESignature/callbackurl",
"Type": "DocuSign",
"RecipientsLock": true
}
}Response
The response contains three key fields inside ResultData that are used to construct the Call 2 request body:
Field | Description |
|---|---|
| Serialized JSON string containing form data, field values, and rendering configuration |
| Serialized JSON string containing tab placements (sign here, date, initials, etc.) and recipient role mappings |
| Serialized JSON string containing envelope configuration — status, email subject/body, and DocuSign envelope settings |
Note:
PrintData,SignData, andSignSettingsare returned as serialized JSON strings. You mustJSON.parse()each one before passing them into the Call 2 request body.
json
{
"ResultData": {
"UNID": "fNZdT1bjpAHNoaf2WVHYexOAooTqVFuS0wyXIcyks6UCA%2flGJo0bOOt%2bCDV6bUrR",
"HTML": "https://quikforms.com/viewform/zqzf-pqF37q9dfR",
"FormIDs": "95507",
"PrintData": "{...}",
"SignData": "{...}",
"SignSettings": "{...}"
},
"ErrorCode": 0,
"Message": "Forms generated successfully",
"Errors": null
}Transforming Call 1 Output to Call 2 Input
The output of Call 1 maps directly to the packagesData and signSettings fields in the Call 2 request body. Use the following transformer to handle the conversion, including parsing the serialized JSON strings and normalizing PascalCase keys to camelCase:
javascript
function transformToEnvelopeRequest(step1Response, options = {}) {
const resultData = step1Response.ResultData;
// Parse the serialized JSON fields
const printData = JSON.parse(resultData.PrintData);
const signData = JSON.parse(resultData.SignData);
const signSettings = JSON.parse(resultData.SignSettings);
// Map tab fields from PascalCase (Call 1) to camelCase (Call 2)
const mapTabs = (tabs) =>
tabs.map((tab) => ({
formID: tab.FormID,
fieldName: tab.FieldName,
roleID: tab.RoleId,
pageNumber: tab.PageNumber,
xCoord: tab.XCoord,
yCoord: tab.YCoord,
fieldHeight: tab.FieldHeight,
fontColor: tab.FontColor,
fontName: tab.FontName,
}));
const recipients = signData.Recipients.map((r) => ({
roleID: r.roleID,
name: r.name,
mail: r.mail,
order: String(r.order),
sendType: r.sendType,
identityCheck: r.identityCheck,
signingGroup: r.signingGroup,
}));
return {
enableInternationalPhoneNumber: options.enableInternationalPhoneNumber ?? false,
customerID: parseInt(printData.CustomerID),
packagesData: [
{
printData: {
editablePDF: printData.EditablePDF,
includeCoverPage: printData.IncludeCoverPage,
unid: printData.UNID,
qfeVersion: printData.QFEVersion,
customerID: parseInt(printData.CustomerID),
fields: printData.Fields.map((f) => ({
formID: f.FormID,
formInstance: f.FormInstance,
order: f.Order,
htmlFields: f.HTMLFields.map((hf) => ({
name: hf.Name,
value: hf.Value,
})),
})),
nativeESign: printData.NativeESign,
nativeESignatures: printData.NativeESignatures,
signMultipleDocs: printData.SignMultipleDocs,
forSign: printData.ForSign,
customFields: {
metaData: printData.CustomFields.MetaData,
fields: printData.CustomFields.Fields,
},
},
signData: {
recipients,
fields: {
signHereTabs: mapTabs(signData.Fields.SignHereTabs),
signInitialTabs: mapTabs(signData.Fields.SignInitialTabs),
signDateTabs: mapTabs(signData.Fields.SignDateTabs),
textTabs: signData.Fields.TextTabs,
checkboxTabs: signData.Fields.CheckboxTabs,
radioGroupTabs: signData.Fields.RadioGroupTabs,
},
tabs: signData.Tabs,
},
},
],
signSettings: {
status: signSettings.Status,
mailSubject: signSettings.MailSubject,
mailBody: signSettings.MailBody,
soboFlag: signSettings.SOBOFlag,
authUserID: signSettings.AuthUserID,
senderUserID: signSettings.SenderUserID,
signMultipleDocs: signSettings.SignMultipleDocs,
signEnvironmentID: signSettings.SignEnvironmentID,
signTransDescription: signSettings.SignTransDescription,
hostName: signSettings.HostName,
hostEmail: signSettings.HostEmail,
accountID: signSettings.AccountID,
envelopeSettings: {
allowMarkup: signSettings.EnvelopeSettings.AllowMarkup,
allowReassign: signSettings.EnvelopeSettings.AllowReassign,
allowRecipientRecursion: signSettings.EnvelopeSettings.AllowRecipientRecursion,
asynchronous: signSettings.EnvelopeSettings.Asynchronous,
authoritativeCopy: signSettings.EnvelopeSettings.AuthoritativeCopy,
autoNavigation: signSettings.EnvelopeSettings.AutoNavigation,
brandId: signSettings.EnvelopeSettings.BrandId,
brandLock: signSettings.EnvelopeSettings.BrandLock,
enableWetSign: signSettings.EnvelopeSettings.EnableWetSign,
messageLock: signSettings.EnvelopeSettings.MessageLock,
recipientsLock: signSettings.EnvelopeSettings.RecipientsLock,
transactionId: signSettings.EnvelopeSettings.TransactionId,
useDisclosure: signSettings.EnvelopeSettings.UseDisclosure,
enforceSignerVisibility: signSettings.EnvelopeSettings.enforceSignerVisibility,
notification: signSettings.EnvelopeSettings.Notification,
customFields: signSettings.EnvelopeSettings.CustomFields,
emailSettings: signSettings.EnvelopeSettings.EmailSettings,
},
},
};
}Usage:
javascript
const step2Body = transformToEnvelopeRequest(step1Response, {
enableInternationalPhoneNumber: false
});Pass any fields not sourced from Call 1 (such as enableInternationalPhoneNumber) via the options argument.
Call 2 — Create the Envelope
Endpoint
http
POST https://websvcs.quikforms.com/rest/esignature/docusign/envelope/signHeaders
http
Authorization: Bearer <access_token>
Content-Type: application/jsonRequest
The following is a complete example request body produced by transforming the Call 1 response above:
json
{
"enableInternationalPhoneNumber": false,
"customerID": 10014477,
"packagesData": [
{
"printData": {
"editablePDF": false,
"includeCoverPage": false,
"unid": "fNZdT1bjpAHNoaf2WVHYexOAooTqVFuS0wyXIcyks6UCA%2flGJo0bOOt%2bCDV6bUrR",
"qfeVersion": "6.9.3.0",
"customerID": 10014477,
"fields": [
{
"formID": 95507,
"formInstance": 0,
"order": 1,
"htmlFields": [
{ "name": "1own.FullName", "value": "Margaret Holloway" },
{ "name": "1own.H.Email", "value": "m.holloway@example.com" },
{ "name": "2own.FullName", "value": "Derek Fontaine" },
{ "name": "2own.H.Email", "value": "d.fontaine@example.com" },
{ "name": "1authind.FullName", "value": "Sandra Keplinger" },
{ "name": "1authind.H.Email", "value": "s.keplinger@example.com" }
]
}
],
"nativeESign": false,
"nativeESignatures": [],
"signMultipleDocs": true,
"forSign": true,
"customFields": {
"metaData": [],
"fields": []
}
},
"signData": {
"recipients": [
{
"roleID": "1own_0",
"name": "Margaret Holloway",
"mail": "m.holloway@example.com",
"order": "1",
"sendType": "None",
"identityCheck": 0,
"signingGroup": ""
},
{
"roleID": "2own_0",
"name": "Derek Fontaine",
"mail": "d.fontaine@example.com",
"order": "2",
"sendType": "None",
"identityCheck": 0,
"signingGroup": ""
},
{
"roleID": "1authind_0",
"name": "Sandra Keplinger",
"mail": "s.keplinger@example.com",
"order": "3",
"sendType": "None",
"identityCheck": 0,
"signingGroup": ""
}
],
"fields": {
"signHereTabs": [
{ "formID": "95507", "fieldName": "1own.95507.1.Sign", "roleID": "1own_0", "pageNumber": "6", "xCoord": "36", "yCoord": "444", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "2own.95507.1.Sign", "roleID": "2own_0", "pageNumber": "6", "xCoord": "36", "yCoord": "489", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "1authind.95507.1.Sign", "roleID": "1authind_0", "pageNumber": "6", "xCoord": "36", "yCoord": "577", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "1own.95507.2.Sign", "roleID": "1own_0", "pageNumber": "7", "xCoord": "36", "yCoord": "522", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "2own.95507.2.Sign", "roleID": "2own_0", "pageNumber": "7", "xCoord": "36", "yCoord": "556", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "1own.95507.3.Sign", "roleID": "1own_0", "pageNumber": "8", "xCoord": "73", "yCoord": "586", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "2own.95507.3.Sign", "roleID": "2own_0", "pageNumber": "8", "xCoord": "73", "yCoord": "632", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "1own.95507.4.Sign", "roleID": "1own_0", "pageNumber": "10", "xCoord": "36", "yCoord": "587", "fieldHeight": "27.220", "fontColor": "", "fontName": "" },
{ "formID": "95507", "fieldName": "2own.95507.4.Sign", "roleID": "2own_0", "pageNumber": "10", "xCoord": "36", "yCoord": "621", "fieldHeight": "27.220", "fontColor": "", "fontName": "" }
],
"signInitialTabs": [],
"signDateTabs": [
{ "formID": "95507", "fieldName": "1own.95507.1.SignDate", "roleID": "1own_0", "pageNumber": "6", "xCoord": "434", "yCoord": "456", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "2own.95507.1.SignDate", "roleID": "2own_0", "pageNumber": "6", "xCoord": "434", "yCoord": "502", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "1authind.95507.1.SignDate", "roleID": "1authind_0", "pageNumber": "6", "xCoord": "434", "yCoord": "590", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "1own.95507.2.SignDate", "roleID": "1own_0", "pageNumber": "7", "xCoord": "434", "yCoord": "535", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "2own.95507.2.SignDate", "roleID": "2own_0", "pageNumber": "7", "xCoord": "434", "yCoord": "568", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "1own.95507.3.SignDate", "roleID": "1own_0", "pageNumber": "8", "xCoord": "434", "yCoord": "599", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "2own.95507.3.SignDate", "roleID": "2own_0", "pageNumber": "8", "xCoord": "434", "yCoord": "644", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "1own.95507.4.SignDate", "roleID": "1own_0", "pageNumber": "10", "xCoord": "434", "yCoord": "600", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" },
{ "formID": "95507", "fieldName": "2own.95507.4.SignDate", "roleID": "2own_0", "pageNumber": "10", "xCoord": "434", "yCoord": "634", "fieldHeight": "14.560", "fontColor": "0 0 0.545 rg", "fontName": "Helv" }
],
"textTabs": [],
"checkboxTabs": [],
"radioGroupTabs": []
},
"tabs": []
}
}
],
"signSettings": {
"status": "sent",
"mailSubject": "Please e-sign these forms.",
"mailBody": "The attached forms were completed and prepared for you to sign.\n\n- Nicolet Advisory Services RIA - DWMA Select Service Combined\n\nPlease sign these forms by clicking the link.\n",
"soboFlag": false,
"authUserID": "Docusign For Keplinger",
"senderUserID": "",
"signMultipleDocs": true,
"signEnvironmentID": 1,
"signTransDescription": "",
"hostName": "",
"hostEmail": "",
"accountID": null,
"envelopeSettings": {
"allowMarkup": false,
"allowReassign": false,
"allowRecipientRecursion": false,
"asynchronous": false,
"authoritativeCopy": false,
"autoNavigation": false,
"brandId": "",
"brandLock": false,
"enableWetSign": false,
"messageLock": false,
"recipientsLock": true,
"transactionId": "",
"useDisclosure": false,
"enforceSignerVisibility": true,
"notification": null,
"customFields": null,
"emailSettings": null
}
}
}Key Request Fields
Field | Type | Required | Description |
|---|---|---|---|
| integer | Yes | Must match the authenticated account or an authorized child account |
| object | Yes | Cannot be null. Controls envelope status, email, and DocuSign settings |
| array | Yes | Must contain at least one package with at least one recipient |
| boolean | No | Set to |
signSettings Fields
Field | Type | Description |
|---|---|---|
| string |
|
| string | Email subject line sent to recipients |
| string | Email body sent to recipients |
| integer | DocuSign environment identifier |
| boolean | Whether to combine multiple documents in one signing session |
| object | DocuSign envelope configuration options |
signEnvironmentID = is traditionally a value of 1 or 2 if your organization is testing outside of one of the following environments please contact Quik! support.
Response
On success, the API returns the DocuSign Envelope ID:
json
{
"EnvelopeId": "b3d2e1a0-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ErrorCode": 0,
"Message": "Envelope created successfully"
}Envelope Status
The status field in signSettings controls what happens after the envelope is created:
Value | Behavior |
|---|---|
| Envelope is immediately sent to all recipients via email |
| Envelope is saved as a draft in DocuSign — no emails are sent |
Draft Review Workflow
If you set status to "created", the envelope is saved to DocuSign Drafts. No recipients are notified. You or your team can then log into DocuSign, review the envelope, and send it manually.
You can also construct a deep link to take users directly to the draft in DocuSign:
https://apps.docusign.com/send/prepare/{envelopeId}Multi-Package Envelopes
To include multiple forms in a single DocuSign envelope, add additional objects to the packagesData array. Each package has its own printData and signData, but all packages are combined into one envelope and sent together.
json
{
"packagesData": [
{ "printData": {}, "signData": {} },
{ "printData": {}, "signData": {} }
]
}Authorization
The customerID in the request body must either match the authenticated customer account or belong to an authorized child account. Requests with unauthorized customerID values will be rejected.
Errors
ErrorCode | Meaning | What to check |
|---|---|---|
| Success | — |
| Unauthorized | Token is missing, expired, or invalid |
| Forbidden |
|
| Bad Request |
|
| Server Error | Contact Quik! support with your request payload and timestamp |
Note: This error table reflects common scenarios.
Comparison to Other Models
Feature | Self Service | Callback | Direct to DocuSign |
|---|---|---|---|
Customer builds envelope | ✔ | No | No |
Customer hosts endpoint | ✔ | No | No |
Quik! creates envelope | No | ✔ | ✔ |
Draft option | Customer controlled | Limited | ✔ |
Tab mapping handled by | Customer | Quik! | Quik! |
SignData generated by | Quik! | Quik! | Quik! |
