Operations (sample payloads)

Main operations
Copy

Apply envelope document templates
Copy

Adds templates to a document in the specified envelope. Global properties such as recipients will not be applied.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f14f5d0-5e9a-4f0f-9b1a-7b2e8f3d1e4c",
5
"document_id": "1",
6
"document_templates": [
7
{
8
"document_id": "1",
9
"template_id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
10
"document_start_page": "1",
11
"document_end_page": "5"
12
},
13
{
14
"document_id": "2",
15
"template_id": "q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f",
16
"document_start_page": "6",
17
"document_end_page": "10"
18
}
19
],
20
"quota_wait": true
21
}

Sample Output

1
{
2
"documentTemplates": [
3
{
4
"documentId": "1",
5
"templateId": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
6
"documentStartPage": "1",
7
"documentEndPage": "5",
8
"errorDetails": null
9
},
10
{
11
"documentId": "2",
12
"templateId": "q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f",
13
"documentStartPage": "6",
14
"documentEndPage": "10",
15
"errorDetails": null
16
}
17
]
18
}

Apply envelope templates
Copy

Applies templates to the specified envelope.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f3a39d8-6b9e-4f62-a9c7-2d5a3cfb76b4",
5
"document_templates": [
6
{
7
"document_id": "1",
8
"template_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
9
"document_start_page": "1",
10
"document_end_page": "5"
11
},
12
{
13
"document_id": "2",
14
"template_id": "q7r8s9t0-u1v2-w3x4-y5z6-a7b8c9d0e1f2",
15
"document_start_page": "1",
16
"document_end_page": "3"
17
}
18
]
19
}

Sample Output

1
{
2
"documentTemplates": [
3
{
4
"documentId": "1",
5
"templateId": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
6
"documentStartPage": "1",
7
"documentEndPage": "5",
8
"errorDetails": null
9
},
10
{
11
"documentId": "2",
12
"templateId": "q7r8s9t0-u1v2-w3x4-y5z6-a7b8c9d0e1f2",
13
"documentStartPage": "1",
14
"documentEndPage": "3",
15
"errorDetails": null
16
}
17
]
18
}

Create Envelope
Copy

Create an envelope in your DocuSign account.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"email_subject": "Please sign this document",
5
"email_blurb": "Hello, please review and sign the attached document at your earliest convenience.",
6
"status": "sent",
7
"documents": [
8
{
9
"name": "Contract.pdf",
10
"documentId": "1",
11
"fileExtension": "pdf",
12
"documentBase64": "JVBERi0xLjcKJeLjz9MKNiAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDM3Mj4+c3RyZWFtCnicfVLLbsIwELzzFTm2h8h2..."
13
}
14
],
15
"signers": [
16
{
17
"name": "John Doe",
18
"email": "john.doe@example.com"
19
},
20
{
21
"name": "Jane Smith",
22
"email": "jane.smith@example.com"
23
}
24
],
25
"enable_wet_sign": false
26
}

Sample Output

1
{
2
"envelopeId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
3
"uri": "/envelopes/1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
4
"statusDateTime": "2023-06-15T14:30:45.123Z",
5
"status": "sent"
6
}

Create envelope custom fields
Copy

Creates the envelope custom fields for draft and in-process envelopes.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "93be49ab-xxxx-xxxx-xxxx-f752070d71ec",
5
"list_custom_fields": [
6
{
7
"name": "Department",
8
"value": "Sales",
9
"field_id": "CustomField1",
10
"show": true,
11
"required": false,
12
"list_items": [
13
"Sales",
14
"Marketing",
15
"Finance",
16
"HR"
17
]
18
}
19
],
20
"text_custom_fields": [
21
{
22
"name": "Employee ID",
23
"value": "EMP001",
24
"field_id": "CustomField2",
25
"show": true,
26
"required": true
27
}
28
]
29
}

Sample Output

1
{
2
"listCustomFields": [
3
{
4
"listItems": [
5
"Sales",
6
"Marketing",
7
"Finance",
8
"HR"
9
],
10
"fieldId": "CustomField1",
11
"name": "Department",
12
"show": "true",
13
"required": "false",
14
"value": "Sales"
15
}
16
],
17
"textCustomFields": [
18
{
19
"fieldId": "CustomField2",
20
"name": "Employee ID",
21
"show": "true",
22
"required": "true",
23
"value": "EMP001"
24
}
25
]
26
}

Create envelope from template
Copy

Create an envelope from a template in your DocuSign account.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"email_subject": "Please sign this document",
5
"email_blurb": "Hello, please review and sign the attached document at your earliest convenience.",
6
"status": "sent",
7
"template_id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
8
"template_roles": [
9
{
10
"name": "John Doe",
11
"email": "john.doe@example.com",
12
"roleName": "Signer 1"
13
},
14
{
15
"name": "Jane Smith",
16
"email": "jane.smith@example.com",
17
"roleName": "Signer 2"
18
}
19
]
20
}

Sample Output

1
{
2
"envelopeId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
3
"uri": "/envelopes/1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
4
"statusDateTime": "2023-04-15T14:30:00Z",
5
"status": "sent"
6
}

Delete envelope custom fields
Copy

Deletes the envelope custom fields for draft and in-process envelopes.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f8c3c1a-7b5e-4a4f-8b1c-9a2c3d4e5f6g",
5
"list_custom_field_ids": [
6
"list_field_1",
7
"list_field_2"
8
],
9
"text_custom_field_ids": [
10
"text_field_1",
11
"text_field_2"
12
]
13
}

Sample Output

1
{
2
"textCustomFields": [
3
{
4
"fieldId": "text_field_1",
5
"name": "Project Name",
6
"show": "true",
7
"required": "false",
8
"value": "",
9
"configurationType": "text",
10
"errorDetails": {
11
"errorCode": "CUSTOM_FIELD_DELETED",
12
"message": "The custom field has been successfully deleted."
13
}
14
},
15
{
16
"fieldId": "text_field_2",
17
"name": "Department",
18
"show": "true",
19
"required": "false",
20
"value": "",
21
"configurationType": "text",
22
"errorDetails": {
23
"errorCode": "CUSTOM_FIELD_DELETED",
24
"message": "The custom field has been successfully deleted."
25
}
26
}
27
],
28
"listCustomFields": [
29
{
30
"fieldId": "list_field_1",
31
"name": "Priority",
32
"show": "true",
33
"required": "true",
34
"value": "",
35
"configurationType": "list",
36
"listItems": [],
37
"errorDetails": {
38
"errorCode": "CUSTOM_FIELD_DELETED",
39
"message": "The custom field has been successfully deleted."
40
}
41
},
42
{
43
"fieldId": "list_field_2",
44
"name": "Status",
45
"show": "true",
46
"required": "false",
47
"value": "",
48
"configurationType": "list",
49
"listItems": [],
50
"errorDetails": {
51
"errorCode": "CUSTOM_FIELD_DELETED",
52
"message": "The custom field has been successfully deleted."
53
}
54
}
55
]
56
}

Delete envelope template
Copy

Deletes the specified template from a document in an existing envelope.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9.eyJUb2tlblR5cGUiOjUsIklzc3VlSW5zdGFudCI6MTU5NjA1NDczOCwiZXhwIjoxNTk2MDg0NzM4LCJVc2VySWQiOiIxMjM0NTY3OC05YWJjLWRlZjAtMTIzNC01Njc4OWFiY2RlZjAiLCJzaXRlaWQiOjEsInNjcCI6WyJzaWduYXR1cmUiLCJjbGljay5tYW5hZ2UiLCJvcmdhbml6YXRpb25fcmVhZCIsInJvb21fZm9ybXMiLCJncm91cF9yZWFkIiwicGVybWlzc2lvbl9yZWFkIiwidXNlcl9yZWFkIiwidXNlcl93cml0ZSIsImFjY291bnRfcmVhZCIsImRvbWFpbl9yZWFkIiwiaWRlbnRpdHlfcHJvdmlkZXJfcmVhZCIsImR0ci5yb29tcy5yZWFkIiwiZHRyLnJvb21zLndyaXRlIiwiZHRyLmRvY3VtZW50cy5yZWFkIiwiZHRyLmRvY3VtZW50cy53cml0ZSIsImR0ci5wcm9maWxlLnJlYWQiLCJkdHIucHJvZmlsZS53cml0ZSIsImR0ci5jb21wYW55LnJlYWQiLCJkdHIuY29tcGFueS53cml0ZSJdLCJhdWQiOiJmMGYyN2YwZS04NTdkLTRhNzEtYTRkYS0zMmNlY2FlM2E5NzgiLCJhenAiOiJmMGYyN2YwZS04NTdkLTRhNzEtYTRkYS0zMmNlY2FlM2E5NzgiLCJpc3MiOiJodHRwczovL2FjY291bnQtZC5kb2N1c2lnbi5jb20vIiwic3ViIjoiMTIzNDU2NzgtOWFiYy1kZWYwLTEyMzQtNTY3ODlhYmNkZWYwIiwiYXV0aF90aW1lIjoxNTk2MDU0NzM3LCJwd2lkIjoiYjE2ZjBiNDUtMzg0Ni00NmNmLThjOGItMDNlYjQwZGIyNTdkIn0.aBcDeFgHiJkLmNoPqRsTuVwXyZ",
3
"account": "12345678-9abc-def0-1234-56789abcdef0",
4
"envelope_id": "98765432-1abc-def0-9876-54321abcdef0",
5
"document_id": "1",
6
"template_id": "87654321-abcd-efgh-ijkl-mnopqrstuvwx"
7
}

Sample Output

1
{
2
"success": true
3
}

Download envelope document
Copy

Download a document from DocuSign. You'll be given a URL which you can pass to other connectors for uploading.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f3a39d8-6b9e-4f62-a9c7-2d5a3cfb76b4",
5
"document_id": "1",
6
"file_name": "Contract_2023.pdf",
7
"quota_wait": true
8
}

Sample Output

1
{
2
"file": {
3
"name": "Contract_2023.pdf",
4
"url": "https://demo.docusign.net/restapi/v2.1/accounts/1234567/envelopes/3f3a39d8-6b9e-4f62-a9c7-2d5a3cfb76b4/documents/1",
5
"mime_type": "application/pdf",
6
"expires": 1623456789
7
}
8
}

Get account details
Copy

Lookup details about a DocuSign account.

Sample Input

1
{
2
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
3
"account": "1234567",
4
"quota_wait": true
5
}

Sample Output

1
{
2
"currentPlanId": "8001",
3
"planName": "eSignature Business Pro",
4
"planStartDate": "2023-01-01",
5
"planEndDate": "2023-12-31",
6
"billingPeriodStartDate": "2023-06-01",
7
"billingPeriodEndDate": "2023-06-30",
8
"billingPeriodEnvelopesSent": "150",
9
"billingPeriodEnvelopesAllowed": "1000",
10
"billingPeriodDaysRemaining": "15",
11
"canUpgrade": "true",
12
"canCancelRenewal": "false",
13
"envelopeSendingBlocked": "false",
14
"envelopeUnitPrice": "1.50",
15
"suspensionStatus": "active",
16
"accountName": "Acme Corporation",
17
"connectPermission": "true",
18
"docuSignLandingUrl": "https://account.docusign.com",
19
"distributorCode": "ABCD1234",
20
"accountIdGuid": "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8",
21
"currencyCode": "USD",
22
"forgottenPasswordQuestionsCount": "3",
23
"paymentMethod": "CreditCard",
24
"seatsAllowed": "10",
25
"seatsInUse": "8",
26
"createdDate": "2022-01-01T00:00:00Z",
27
"isDowngrade": "false",
28
"billingProfile": "Standard",
29
"status21CFRPart11": "Enabled",
30
"allowTransactionRooms": "true"
31
}

Get envelope by ID
Copy

Find an envelope by ID.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c",
5
"include": [
6
"custom_fields",
7
"documents",
8
"recipients"
9
],
10
"quota_wait": true
11
}

Sample Output

1
{
2
"status": "sent",
3
"documentsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/documents",
4
"recipientsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/recipients",
5
"attachmentsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/attachments",
6
"envelopeUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c",
7
"emailSubject": "Please sign this document",
8
"envelopeId": "3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c",
9
"signingLocation": "online",
10
"customFieldsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/custom_fields",
11
"notificationUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/notification",
12
"enableWetSign": "true",
13
"allowMarkup": "false",
14
"allowReassign": "true",
15
"createdDateTime": "2023-06-15T10:30:00.000Z",
16
"lastModifiedDateTime": "2023-06-15T10:35:00.000Z",
17
"initialSentDateTime": "2023-06-15T10:32:00.000Z",
18
"sentDateTime": "2023-06-15T10:32:00.000Z",
19
"statusChangedDateTime": "2023-06-15T10:32:00.000Z",
20
"documentsCombinedUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/documents/combined",
21
"certificateUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/documents/certificate",
22
"templatesUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/templates",
23
"expireEnabled": "true",
24
"expireDateTime": "2023-07-15T10:30:00.000Z",
25
"expireAfter": "30",
26
"sender": {
27
"userName": "John Doe",
28
"userId": "12345678-abcd-1234-abcd-1234567890ab",
29
"accountId": "1234567",
30
"email": "john.doe@example.com"
31
},
32
"purgeState": "unpurged",
33
"envelopeIdStamping": "true",
34
"is21CFRPart11": "false",
35
"signerCanSignOnMobile": "true",
36
"autoNavigation": "true",
37
"isSignatureProviderEnvelope": "false",
38
"hasFormDataChanged": "false",
39
"allowComments": "true",
40
"hasComments": "false",
41
"allowViewHistory": "true",
42
"disableResponsiveDocument": "false",
43
"envelopeMetadata": {
44
"allowAdvancedCorrect": "true",
45
"enableSignWithNotary": "false",
46
"allowCorrect": "true"
47
},
48
"anySigner": "false",
49
"envelopeLocation": "current_site",
50
"isDynamicEnvelope": "false",
51
"burnDefaultTabData": "false"
52
}

Get template
Copy

Get a template for the specified account

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"template_id": "8f7d9a9d-3b9c-4d58-b9c8-f24c123456",
5
"quota_wait": true
6
}

Sample Output

1
{
2
"envelopeTemplateDefinition": {
3
"templateId": "8f7d9a9d-3b9c-4d58-b9c8-f24c123456",
4
"name": "Sales Contract Template",
5
"shared": "false",
6
"password": "",
7
"description": "Standard sales contract template",
8
"created": "2023-05-15T10:30:00.000Z",
9
"lastModified": "2023-05-20T14:45:00.000Z",
10
"lastModifiedBy": {
11
"userName": "John Doe",
12
"userId": "12345678-abcd-efgh-ijkl-987654321012",
13
"email": "john.doe@example.com",
14
"uri": "/users/12345678-abcd-efgh-ijkl-987654321012"
15
},
16
"pageCount": 3,
17
"uri": "/templates/8f7d9a9d-3b9c-4d58-b9c8-f24c123456",
18
"folderName": "Sales Templates",
19
"folderId": "abcdef12-3456-7890-abcd-ef1234567890",
20
"folderUri": "/folders/abcdef12-3456-7890-abcd-ef1234567890",
21
"owner": {
22
"userName": "Jane Smith",
23
"userId": "98765432-dcba-hgfe-lkji-210987654321",
24
"email": "jane.smith@example.com"
25
}
26
},
27
"documents": [
28
{
29
"documentId": "1",
30
"uri": "/templates/8f7d9a9d-3b9c-4d58-b9c8-f24c123456/documents/1",
31
"name": "Sales Agreement",
32
"order": "1",
33
"pages": "3",
34
"display": "inline",
35
"includeInDownload": "true",
36
"signerMustAcknowledge": "no_interaction",
37
"templateLocked": "false",
38
"templateRequired": "false"
39
}
40
],
41
"emailSubject": "Please sign the sales contract",
42
"emailBlurb": "Kindly review and sign the attached sales contract.",
43
"signingLocation": "online",
44
"customFields": {
45
"textCustomFields": [
46
{
47
"fieldId": "CompanyName",
48
"name": "Company Name",
49
"show": "true",
50
"required": "true",
51
"value": "",
52
"configurationType": "salesforce",
53
"errorDetails": {
54
"errorCode": "",
55
"message": ""
56
}
57
}
58
],
59
"listCustomFields": [
60
{
61
"listItems": [
62
"Option 1",
63
"Option 2",
64
"Option 3"
65
],
66
"fieldId": "ContractType",
67
"name": "Contract Type",
68
"show": "true",
69
"required": "true",
70
"value": "",
71
"configurationType": "salesforce",
72
"errorDetails": {
73
"errorCode": "",
74
"message": ""
75
}
76
}
77
]
78
},
79
"autoNavigation": "true",
80
"envelopeIdStamping": "true",
81
"notification": {
82
"reminders": {
83
"reminderEnabled": "true",
84
"reminderDelay": "2",
85
"reminderFrequency": "2"
86
},
87
"expirations": {
88
"expireEnabled": "true",
89
"expireAfter": "30",
90
"expireWarn": "5"
91
}
92
},
93
"enforceSignerVisibility": "true",
94
"enableWetSign": "false",
95
"allowMarkup": "false",
96
"allowReassign": "true",
97
"disableResponsiveDocument": "false"
98
}

Get user info
Copy

Get details about the user you've connected to tray.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"quota_wait": true,
4
"auth_api_domain": "account.docusign.com"
5
}

Sample Output

1
{
2
"sub": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3
"name": "John Doe",
4
"given_name": "John",
5
"family_name": "Doe",
6
"created": "2023-05-15T10:30:00Z",
7
"email": "john.doe@example.com",
8
"accounts": [
9
{
10
"account_id": "1234567-8901-2345-6789-012345678901",
11
"is_default": true,
12
"account_name": "John Doe's Account",
13
"base_uri": "https://na2.docusign.net/restapi"
14
},
15
{
16
"account_id": "9876543-2109-8765-4321-098765432109",
17
"is_default": false,
18
"account_name": "Business Account",
19
"base_uri": "https://na3.docusign.net/restapi"
20
}
21
]
22
}

List accounts
Copy

Get a list of the accounts attached to a user's account.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
3
"quota_wait": true
4
}

Sample Output

1
{
2
"items": [
3
{
4
"account_id": "1234567",
5
"is_default": true,
6
"account_name": "My Main Account",
7
"base_uri": "https://demo.docusign.net/restapi/v2.1"
8
},
9
{
10
"account_id": "7654321",
11
"is_default": false,
12
"account_name": "Secondary Account",
13
"base_uri": "https://demo.docusign.net/restapi/v2.1"
14
}
15
]
16
}

List envelope custom fields
Copy

Retrieves the custom field information for the specified envelope.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f3a39d8-6b9e-4f62-a9c7-2d5a3cfb5b9b",
5
"quota_wait": true
6
}

Sample Output

1
{
2
"textCustomFields": [
3
{
4
"fieldId": "12345",
5
"name": "Project Name",
6
"show": "true",
7
"required": "false",
8
"value": "New Office Building",
9
"configurationType": "text",
10
"errorDetails": {
11
"errorCode": "",
12
"message": ""
13
}
14
},
15
{
16
"fieldId": "67890",
17
"name": "Contract Number",
18
"show": "true",
19
"required": "true",
20
"value": "CNT-2023-001",
21
"configurationType": "text",
22
"errorDetails": {
23
"errorCode": "",
24
"message": ""
25
}
26
}
27
],
28
"listCustomFields": [
29
{
30
"listItems": [
31
"Option 1",
32
"Option 2",
33
"Option 3"
34
],
35
"fieldId": "54321",
36
"name": "Department",
37
"show": "true",
38
"required": "true",
39
"value": "Option 2",
40
"configurationType": "list",
41
"errorDetails": {
42
"errorCode": "",
43
"message": ""
44
}
45
}
46
]
47
}

List envelope documents
Copy

Get a list of documents in an envelope.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2",
5
"from_date": "2023-01-01T00:00:00Z",
6
"to_date": "2023-06-30T23:59:59Z",
7
"from_to_status": "changed",
8
"status": [
9
"sent",
10
"delivered",
11
"completed"
12
],
13
"search_text": "Contract",
14
"user_id": "5678abcd-ef12-3456-7890-123456789012",
15
"user_filter": "sender"
16
}

Sample Output

1
{
2
"envelopeId": "3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2",
3
"envelopeDocuments": [
4
{
5
"documentId": "1",
6
"name": "Contract.pdf",
7
"type": "content",
8
"uri": "/envelopes/3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2/documents/1",
9
"order": "1",
10
"pages": "5",
11
"display": "inline",
12
"signerMustAcknowledge": "no",
13
"includeInDownload": "true",
14
"containsPdfFormFields": "false",
15
"attachmentTabId": null,
16
"sizeBytes": 524288,
17
"authoritativeCopy": "false",
18
"documentFields": [
19
{
20
"name": "ContractNumber",
21
"value": "CN-2023-001"
22
}
23
],
24
"availableDocumentTypes": [
25
{
26
"type": "pdf",
27
"isDefault": "true"
28
}
29
]
30
},
31
{
32
"documentId": "2",
33
"name": "Appendix.docx",
34
"type": "content",
35
"uri": "/envelopes/3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2/documents/2",
36
"order": "2",
37
"pages": "3",
38
"display": "inline",
39
"signerMustAcknowledge": "no",
40
"includeInDownload": "true",
41
"containsPdfFormFields": "false",
42
"attachmentTabId": null,
43
"sizeBytes": 262144,
44
"authoritativeCopy": "false",
45
"documentFields": [],
46
"availableDocumentTypes": [
47
{
48
"type": "pdf",
49
"isDefault": "true"
50
},
51
{
52
"type": "docx",
53
"isDefault": "false"
54
}
55
]
56
}
57
]
58
}

List envelope templates
Copy

Get a list of envelope templates

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9.eyJUb2tlblR5cGUiOjUsIklzc3VlSW5zdGFudCI6MTYyMzE2NTk1OCwiZXhwIjoxNjIzMTk0NzU4LCJVc2VySWQiOiIxMjM0NTY3OC05YWJjLWRlZjAtMTIzNC01Njc4OWFiY2RlZjAiLCJzaXRlaWQiOjEsInNjcCI6WyJzaWduYXR1cmUiLCJjbGljay5tYW5hZ2UiLCJvcmdhbml6YXRpb25fcmVhZCIsInJvb21fZm9ybXMiLCJncm91cF9yZWFkIiwicGVybWlzc2lvbl9yZWFkIiwidXNlcl9yZWFkIiwidXNlcl93cml0ZSIsImFjY291bnRfcmVhZCIsImRvbWFpbl9yZWFkIiwiaWRlbnRpdHlfcHJvdmlkZXJfcmVhZCIsImR0ci5yb29tcy5yZWFkIiwiZHRyLnJvb21zLndyaXRlIiwiZHRyLmRvY3VtZW50cy5yZWFkIiwiZHRyLmRvY3VtZW50cy53cml0ZSIsImR0ci5wcm9maWxlLnJlYWQiLCJkdHIucHJvZmlsZS53cml0ZSIsImR0ci5jb21wYW55LnJlYWQiLCJkdHIuY29tcGFueS53cml0ZSJdLCJhdWQiOiJmMGYyN2YwZS04NTdkLTRhNzEtYTRkYS0zMmNlY2FlM2E5NzgiLCJhenAiOiJmMGYyN2YwZS04NTdkLTRhNzEtYTRkYS0zMmNlY2FlM2E5NzgiLCJpc3MiOiJodHRwczovL2FjY291bnQtZC5kb2N1c2lnbi5jb20vIiwic3ViIjoiMTIzNDU2NzgtOWFiYy1kZWYwLTEyMzQtNTY3ODlhYmNkZWYwIiwiYXV0aF90aW1lIjoxNjIzMTY1OTU3LCJwd2lkIjoiYWJjZGVmMTItMzQ1Ni03ODkwLWFiY2QtZWYxMjM0NTY3ODkwIn0.NTk5MzM5NmUtNWEyMC00YWQ1LWE1NzAtNTM0YmQ5N2RlMTNj",
3
"account": "1234567",
4
"envelope_id": "8a1b2c3d-4e5f-6g7h-8i9j-0k1l2m3n4o5p"
5
}

Sample Output

1
{
2
"templates": [
3
{
4
"templateId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
5
"name": "Sales Contract Template",
6
"documentId": "1",
7
"documentName": "Sales_Contract.pdf",
8
"applied": "true",
9
"templateMatch": {
10
"matchPercentage": "95",
11
"documentStartPage": "1",
12
"documentEndPage": "5"
13
},
14
"uri": "/templates/1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
15
},
16
{
17
"templateId": "2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q",
18
"name": "NDA Template",
19
"documentId": "2",
20
"documentName": "Non_Disclosure_Agreement.pdf",
21
"applied": "false",
22
"templateMatch": {
23
"matchPercentage": "80",
24
"documentStartPage": "1",
25
"documentEndPage": "3"
26
},
27
"uri": "/templates/2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q"
28
}
29
]
30
}

List envelope templates by document
Copy

Get a list of envelope templates associated with a document in the specified envelope.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f14f5d0-5e9a-4f0f-9b1a-7c8f3b5c7d9e",
5
"document_id": "1",
6
"quota_wait": true
7
}

Sample Output

1
{
2
"templates": [
3
{
4
"templateId": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
5
"name": "Sales Contract Template",
6
"documentId": "1",
7
"documentName": "Sales_Contract.pdf",
8
"applied": "true",
9
"templateMatch": {
10
"matchPercentage": "95",
11
"documentStartPage": "1",
12
"documentEndPage": "5"
13
},
14
"uri": "/templates/a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
15
},
16
{
17
"templateId": "q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f",
18
"name": "NDA Template",
19
"documentId": "1",
20
"documentName": "NDA.pdf",
21
"applied": "false",
22
"templateMatch": {
23
"matchPercentage": "80",
24
"documentStartPage": "1",
25
"documentEndPage": "3"
26
},
27
"uri": "/templates/q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f"
28
}
29
]
30
}

List envelopes
Copy

Get a list of envelopes.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"from_date": "2023-01-01T00:00:00Z",
5
"to_date": "2023-06-30T23:59:59Z",
6
"from_to_status": "changed",
7
"status": [
8
"sent",
9
"delivered",
10
"completed"
11
],
12
"search_text": "Contract",
13
"user_filter": "sender"
14
}

Sample Output

1
{
2
"resultSetSize": "2",
3
"startPosition": "0",
4
"endPosition": "1",
5
"totalSetSize": "2",
6
"nextUri": "",
7
"previousUri": "",
8
"envelopes": [
9
{
10
"status": "completed",
11
"documentsUri": "/envelopes/abc123/documents",
12
"recipientsUri": "/envelopes/abc123/recipients",
13
"attachmentsUri": "/envelopes/abc123/attachments",
14
"envelopeUri": "/envelopes/abc123",
15
"emailSubject": "Please sign this contract",
16
"envelopeId": "abc123",
17
"customFieldsUri": "/envelopes/abc123/custom_fields",
18
"notificationUri": "/envelopes/abc123/notification",
19
"createdDateTime": "2023-05-15T10:00:00Z",
20
"sentDateTime": "2023-05-15T10:05:00Z",
21
"completedDateTime": "2023-05-16T14:30:00Z",
22
"statusChangedDateTime": "2023-05-16T14:30:00Z",
23
"documentsCombinedUri": "/envelopes/abc123/documents/combined",
24
"certificateUri": "/envelopes/abc123/documents/certificate",
25
"templatesUri": "/envelopes/abc123/templates",
26
"sender": {
27
"userName": "John Doe",
28
"userId": "user123",
29
"accountId": "1234567",
30
"email": "john.doe@example.com"
31
},
32
"purgeState": "unpurged",
33
"isSignatureProviderEnvelope": "false",
34
"anySigner": "false",
35
"envelopeLocation": "current"
36
},
37
{
38
"status": "sent",
39
"documentsUri": "/envelopes/def456/documents",
40
"recipientsUri": "/envelopes/def456/recipients",
41
"attachmentsUri": "/envelopes/def456/attachments",
42
"envelopeUri": "/envelopes/def456",
43
"emailSubject": "Contract renewal",
44
"envelopeId": "def456",
45
"customFieldsUri": "/envelopes/def456/custom_fields",
46
"notificationUri": "/envelopes/def456/notification",
47
"createdDateTime": "2023-06-01T09:00:00Z",
48
"sentDateTime": "2023-06-01T09:05:00Z",
49
"completedDateTime": null,
50
"statusChangedDateTime": "2023-06-01T09:05:00Z",
51
"documentsCombinedUri": "/envelopes/def456/documents/combined",
52
"certificateUri": "/envelopes/def456/documents/certificate",
53
"templatesUri": "/envelopes/def456/templates",
54
"sender": {
55
"userName": "Jane Smith",
56
"userId": "user456",
57
"accountId": "1234567",
58
"email": "jane.smith@example.com"
59
},
60
"purgeState": "unpurged",
61
"isSignatureProviderEnvelope": "false",
62
"anySigner": "false",
63
"envelopeLocation": "current"
64
}
65
]
66
}

List folders
Copy

Get a list of all the folders in your account.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"quota_wait": true
5
}

Sample Output

1
{
2
"folders": [
3
{
4
"ownerUserName": "John Doe",
5
"ownerEmail": "john.doe@example.com",
6
"ownerUserId": "12345678-1234-1234-1234-123456789012",
7
"type": "normal",
8
"name": "My Documents",
9
"uri": "/folders/0000000-0000-0000-0000-000000000000",
10
"folderId": "0000000-0000-0000-0000-000000000000",
11
"folders": [
12
{
13
"ownerUserName": "John Doe",
14
"ownerEmail": "john.doe@example.com",
15
"ownerUserId": "12345678-1234-1234-1234-123456789012",
16
"type": "normal",
17
"name": "Contracts",
18
"uri": "/folders/1111111-1111-1111-1111-111111111111",
19
"parentFolderId": "0000000-0000-0000-0000-000000000000",
20
"parentFolderUri": "/folders/0000000-0000-0000-0000-000000000000",
21
"folderId": "1111111-1111-1111-1111-111111111111"
22
},
23
{
24
"ownerUserName": "John Doe",
25
"ownerEmail": "john.doe@example.com",
26
"ownerUserId": "12345678-1234-1234-1234-123456789012",
27
"type": "normal",
28
"name": "Invoices",
29
"uri": "/folders/2222222-2222-2222-2222-222222222222",
30
"parentFolderId": "0000000-0000-0000-0000-000000000000",
31
"parentFolderUri": "/folders/0000000-0000-0000-0000-000000000000",
32
"folderId": "2222222-2222-2222-2222-222222222222"
33
}
34
],
35
"filter": {
36
"actionRequired": "false",
37
"expires": "false",
38
"isTemplate": "false",
39
"status": "active",
40
"fromDateTime": "2023-01-01T00:00:00Z",
41
"toDateTime": "2023-12-31T23:59:59Z",
42
"searchTarget": "folders",
43
"searchText": "",
44
"folderIds": "",
45
"orderBy": "name",
46
"order": "asc"
47
}
48
}
49
]
50
}

List templates
Copy

Get a list of templates for the specified account

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"quota_wait": true
5
}

Sample Output

1
{
2
"envelopeTemplates": [
3
{
4
"templateId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
5
"name": "Sales Contract",
6
"shared": "false",
7
"description": "Standard sales contract template",
8
"lastModified": "2023-06-15T14:30:00Z",
9
"created": "2023-01-01T09:00:00Z",
10
"pageCount": 3,
11
"uri": "/templates/1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
12
"folderName": "Sales Templates",
13
"folderId": "abcd1234-5678-efgh-ijkl-9012mnop3456",
14
"folderUri": "/folders/abcd1234-5678-efgh-ijkl-9012mnop3456",
15
"owner": {
16
"userName": "John Doe",
17
"userId": "user1234",
18
"email": "john.doe@example.com"
19
},
20
"emailSubject": "Please sign the sales contract",
21
"emailBlurb": "Attached is our standard sales contract for your review and signature.",
22
"signingLocation": "online",
23
"authoritativeCopy": "true",
24
"enforceSignerVisibility": "true",
25
"enableWetSign": "false",
26
"allowMarkup": "false",
27
"allowReassign": "false"
28
}
29
],
30
"resultSetSize": "1",
31
"startPosition": "0",
32
"endPosition": "1",
33
"totalSetSize": "1"
34
}

Raw HTTP request (advanced)
Copy

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.

Sample Input

1
{
2
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
3
"method": "POST",
4
"url": {
5
"full_url": "https://demo.docusign.net/restapi/v2.1/accounts/1234567/envelopes"
6
},
7
"headers": [
8
{
9
"key": "Content-Type",
10
"value": "application/json"
11
}
12
],
13
"body": {
14
"raw": {
15
"emailSubject": "Please sign this document",
16
"documents": [
17
{
18
"documentBase64": "base64encodeddocumentcontent...",
19
"name": "Contract.pdf",
20
"fileExtension": "pdf",
21
"documentId": "1"
22
}
23
],
24
"recipients": {
25
"signers": [
26
{
27
"email": "john.doe@example.com",
28
"name": "John Doe",
29
"recipientId": "1",
30
"tabs": {
31
"signHereTabs": [
32
{
33
"xPosition": "100",
34
"yPosition": "100",
35
"documentId": "1",
36
"pageNumber": "1"
37
}
38
]
39
}
40
}
41
]
42
},
43
"status": "sent"
44
}
45
},
46
"include_raw_body": true,
47
"parse_response": "true"
48
}

Sample Output

1
{
2
"response": {
3
"status_code": 201,
4
"headers": {
5
"Content-Type": "application/json",
6
"X-DocuSign-TraceToken": "1234abcd-5678-90ef-ghij-klmnopqrstuv"
7
},
8
"body": {
9
"envelopeId": "5678-abcd-1234-efgh-ijklmnopqrst",
10
"uri": "/envelopes/5678-abcd-1234-efgh-ijklmnopqrst",
11
"statusDateTime": "2023-06-15T10:30:45.1234Z",
12
"status": "sent"
13
}
14
}
15
}

Update envelope custom fields
Copy

Updates the envelope custom fields for draft and in-process envelopes.

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
3
"account": "1234567",
4
"envelope_id": "3f3a39d5-6d9f-4e1c-9a5b-8e0b1c1d2e3f",
5
"list_custom_fields": [
6
{
7
"name": "Department",
8
"value": "Sales",
9
"field_id": "CustomField1",
10
"show": true,
11
"required": false,
12
"list_items": [
13
"Sales",
14
"Marketing",
15
"Finance",
16
"HR"
17
]
18
}
19
],
20
"text_custom_fields": [
21
{
22
"name": "Employee ID",
23
"value": "EMP001",
24
"field_id": "CustomField2",
25
"show": true,
26
"required": true
27
}
28
]
29
}

Sample Output

1
{
2
"textCustomFields": [
3
{
4
"fieldId": "CustomField2",
5
"name": "Employee ID",
6
"show": "true",
7
"required": "true",
8
"value": "EMP001"
9
}
10
],
11
"listCustomFields": [
12
{
13
"listItems": [
14
"Sales",
15
"Marketing",
16
"Finance",
17
"HR"
18
],
19
"fieldId": "CustomField1",
20
"name": "Department",
21
"show": "true",
22
"required": "false",
23
"value": "Sales"
24
}
25
]
26
}

DDL operations
Copy

List accounts domains (DDL)
Copy

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

Sample Input

1
{
2
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9.eyJUb2tlblR5cGUiOjUsIklzc3VlSW5zdGFudCI6MTU5NTg3MDc3NCJFWHI6MTU5NTg5OTU3NCwiVXNlcklkIjoiMTIzNDU2Nzg5MCJ9.example_signature",
3
"quota_wait": true
4
}

Sample Output

1
{
2
"domains": [
3
{
4
"domain": "example1.com",
5
"accountId": "12345678-1234-1234-1234-123456789012"
6
},
7
{
8
"domain": "example2.com",
9
"accountId": "98765432-9876-9876-9876-987654321098"
10
}
11
]
12
}