Operations (sample payloads)

Main operations

Apply envelope document templates

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

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "3f14f5d0-5e9a-4f0f-9b1a-7b2e8f3d1e4c",
    "document_id": "1",
    "document_templates": [
        \{
            "document_id": "1",
            "template_id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
            "document_start_page": "1",
            "document_end_page": "5"
        \},
        \{
            "document_id": "2",
            "template_id": "q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f",
            "document_start_page": "6",
            "document_end_page": "10"
        \}
    ],
    "quota_wait": true
}

Sample Output

{
    "documentTemplates": [
        \{
            "documentId": "1",
            "templateId": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
            "documentStartPage": "1",
            "documentEndPage": "5",
            "errorDetails": null
        \},
        \{
            "documentId": "2",
            "templateId": "q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f",
            "documentStartPage": "6",
            "documentEndPage": "10",
            "errorDetails": null
        \}
    ]
}

Apply envelope templates

Applies templates to the specified envelope. Sample Input

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "3f3a39d8-6b9e-4f62-a9c7-2d5a3cfb76b4",
    "document_templates": [
        \{
            "document_id": "1",
            "template_id": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
            "document_start_page": "1",
            "document_end_page": "5"
        \},
        \{
            "document_id": "2",
            "template_id": "q7r8s9t0-u1v2-w3x4-y5z6-a7b8c9d0e1f2",
            "document_start_page": "1",
            "document_end_page": "3"
        \}
    ]
}

Sample Output

{
    "documentTemplates": [
        \{
            "documentId": "1",
            "templateId": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6",
            "documentStartPage": "1",
            "documentEndPage": "5",
            "errorDetails": null
        \},
        \{
            "documentId": "2",
            "templateId": "q7r8s9t0-u1v2-w3x4-y5z6-a7b8c9d0e1f2",
            "documentStartPage": "1",
            "documentEndPage": "3",
            "errorDetails": null
        \}
    ]
}

Create Envelope

Create an envelope in your DocuSign account. Sample Input

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "email_subject": "Please sign this document",
    "email_blurb": "Hello, please review and sign the attached document at your earliest convenience.",
    "status": "sent",
    "documents": [
        \{
            "name": "Contract.pdf",
            "documentId": "1",
            "fileExtension": "pdf",
            "documentBase64": "JVBERi0xLjcKJeLjz9MKNiAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDM3Mj4+c3RyZWFtCnicfVLLbsIwELzzFTm2h8h2..."
        \}
    ],
    "signers": [
        \{
            "name": "John Doe",
            "email": "john.doe@example.com"
        \},
        \{
            "name": "Jane Smith",
            "email": "jane.smith@example.com"
        \}
    ],
    "enable_wet_sign": false
}

Sample Output

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

Create envelope custom fields

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

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "93be49ab-xxxx-xxxx-xxxx-f752070d71ec",
    "list_custom_fields": [
        \{
            "name": "Department",
            "value": "Sales",
            "field_id": "CustomField1",
            "show": true,
            "required": false,
            "list_items": [
                "Sales",
                "Marketing",
                "Finance",
                "HR"
            ]
        \}
    ],
    "text_custom_fields": [
        \{
            "name": "Employee ID",
            "value": "EMP001",
            "field_id": "CustomField2",
            "show": true,
            "required": true
        \}
    ]
}

Sample Output

Create envelope from template

Create an envelope from a template in your DocuSign account. Sample Input Sample Output

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

Delete envelope custom fields

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

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "3f8c3c1a-7b5e-4a4f-8b1c-9a2c3d4e5f6g",
    "list_custom_field_ids": [
        "list_field_1",
        "list_field_2"
    ],
    "text_custom_field_ids": [
        "text_field_1",
        "text_field_2"
    ]
\}

Sample Output

{
    "textCustomFields": [
        {
            "fieldId": "text_field_1",
            "name": "Project Name",
            "show": "true",
            "required": "false",
            "value": "",
            "configurationType": "text",
            "errorDetails": \{
                "errorCode": "CUSTOM_FIELD_DELETED",
                "message": "The custom field has been successfully deleted."
            \}
        },
        {
            "fieldId": "text_field_2",
            "name": "Department",
            "show": "true",
            "required": "false",
            "value": "",
            "configurationType": "text",
            "errorDetails": \{
                "errorCode": "CUSTOM_FIELD_DELETED",
                "message": "The custom field has been successfully deleted."
            \}
        }
    ],
    "listCustomFields": [
        {
            "fieldId": "list_field_1",
            "name": "Priority",
            "show": "true",
            "required": "true",
            "value": "",
            "configurationType": "list",
            "listItems": [],
            "errorDetails": \{
                "errorCode": "CUSTOM_FIELD_DELETED",
                "message": "The custom field has been successfully deleted."
            \}
        },
        {
            "fieldId": "list_field_2",
            "name": "Status",
            "show": "true",
            "required": "false",
            "value": "",
            "configurationType": "list",
            "listItems": [],
            "errorDetails": \{
                "errorCode": "CUSTOM_FIELD_DELETED",
                "message": "The custom field has been successfully deleted."
            \}
        }
    ]
}

Delete envelope template

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

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

Sample Output

{
    "success": true
}

Download envelope document

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

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

Sample Output

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

Get account details

Lookup details about a DocuSign account. Sample Input

\{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "account": "1234567",
    "quota_wait": true
\}

Sample Output

\{
    "currentPlanId": "8001",
    "planName": "eSignature Business Pro",
    "planStartDate": "2023-01-01",
    "planEndDate": "2023-12-31",
    "billingPeriodStartDate": "2023-06-01",
    "billingPeriodEndDate": "2023-06-30",
    "billingPeriodEnvelopesSent": "150",
    "billingPeriodEnvelopesAllowed": "1000",
    "billingPeriodDaysRemaining": "15",
    "canUpgrade": "true",
    "canCancelRenewal": "false",
    "envelopeSendingBlocked": "false",
    "envelopeUnitPrice": "1.50",
    "suspensionStatus": "active",
    "accountName": "Acme Corporation",
    "connectPermission": "true",
    "docuSignLandingUrl": "https://account.docusign.com",
    "distributorCode": "ABCD1234",
    "accountIdGuid": "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8",
    "currencyCode": "USD",
    "forgottenPasswordQuestionsCount": "3",
    "paymentMethod": "CreditCard",
    "seatsAllowed": "10",
    "seatsInUse": "8",
    "createdDate": "2022-01-01T00:00:00Z",
    "isDowngrade": "false",
    "billingProfile": "Standard",
    "status21CFRPart11": "Enabled",
    "allowTransactionRooms": "true"
\}

Get envelope by ID

Find an envelope by ID. Sample Input

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c",
    "include": [
        "custom_fields",
        "documents",
        "recipients"
    ],
    "quota_wait": true
\}

Sample Output

{
    "status": "sent",
    "documentsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/documents",
    "recipientsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/recipients",
    "attachmentsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/attachments",
    "envelopeUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c",
    "emailSubject": "Please sign this document",
    "envelopeId": "3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c",
    "signingLocation": "online",
    "customFieldsUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/custom_fields",
    "notificationUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/notification",
    "enableWetSign": "true",
    "allowMarkup": "false",
    "allowReassign": "true",
    "createdDateTime": "2023-06-15T10:30:00.000Z",
    "lastModifiedDateTime": "2023-06-15T10:35:00.000Z",
    "initialSentDateTime": "2023-06-15T10:32:00.000Z",
    "sentDateTime": "2023-06-15T10:32:00.000Z",
    "statusChangedDateTime": "2023-06-15T10:32:00.000Z",
    "documentsCombinedUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/documents/combined",
    "certificateUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/documents/certificate",
    "templatesUri": "/envelopes/3f14f5d0-5e9a-4b81-95b5-0a9e7f9f4a7c/templates",
    "expireEnabled": "true",
    "expireDateTime": "2023-07-15T10:30:00.000Z",
    "expireAfter": "30",
    "sender": \{
        "userName": "John Doe",
        "userId": "12345678-abcd-1234-abcd-1234567890ab",
        "accountId": "1234567",
        "email": "john.doe@example.com"
    \},
    "purgeState": "unpurged",
    "envelopeIdStamping": "true",
    "is21CFRPart11": "false",
    "signerCanSignOnMobile": "true",
    "autoNavigation": "true",
    "isSignatureProviderEnvelope": "false",
    "hasFormDataChanged": "false",
    "allowComments": "true",
    "hasComments": "false",
    "allowViewHistory": "true",
    "disableResponsiveDocument": "false",
    "envelopeMetadata": \{
        "allowAdvancedCorrect": "true",
        "enableSignWithNotary": "false",
        "allowCorrect": "true"
    \},
    "anySigner": "false",
    "envelopeLocation": "current_site",
    "isDynamicEnvelope": "false",
    "burnDefaultTabData": "false"
}

Get template

Get a template for the specified account Sample Input

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

Sample Output

{
    "envelopeTemplateDefinition": {
        "templateId": "8f7d9a9d-3b9c-4d58-b9c8-f24c123456",
        "name": "Sales Contract Template",
        "shared": "false",
        "password": "",
        "description": "Standard sales contract template",
        "created": "2023-05-15T10:30:00.000Z",
        "lastModified": "2023-05-20T14:45:00.000Z",
        "lastModifiedBy": \{
            "userName": "John Doe",
            "userId": "12345678-abcd-efgh-ijkl-987654321012",
            "email": "john.doe@example.com",
            "uri": "/users/12345678-abcd-efgh-ijkl-987654321012"
        \},
        "pageCount": 3,
        "uri": "/templates/8f7d9a9d-3b9c-4d58-b9c8-f24c123456",
        "folderName": "Sales Templates",
        "folderId": "abcdef12-3456-7890-abcd-ef1234567890",
        "folderUri": "/folders/abcdef12-3456-7890-abcd-ef1234567890",
        "owner": \{
            "userName": "Jane Smith",
            "userId": "98765432-dcba-hgfe-lkji-210987654321",
            "email": "jane.smith@example.com"
        \}
    },
    "documents": [
        \{
            "documentId": "1",
            "uri": "/templates/8f7d9a9d-3b9c-4d58-b9c8-f24c123456/documents/1",
            "name": "Sales Agreement",
            "order": "1",
            "pages": "3",
            "display": "inline",
            "includeInDownload": "true",
            "signerMustAcknowledge": "no_interaction",
            "templateLocked": "false",
            "templateRequired": "false"
        \}
    ],
    "emailSubject": "Please sign the sales contract",
    "emailBlurb": "Kindly review and sign the attached sales contract.",
    "signingLocation": "online",
    "customFields": {
        "textCustomFields": [
            {
                "fieldId": "CompanyName",
                "name": "Company Name",
                "show": "true",
                "required": "true",
                "value": "",
                "configurationType": "salesforce",
                "errorDetails": \{
                    "errorCode": "",
                    "message": ""
                \}
            }
        ],
        "listCustomFields": [
            {
                "listItems": [
                    "Option 1",
                    "Option 2",
                    "Option 3"
                ],
                "fieldId": "ContractType",
                "name": "Contract Type",
                "show": "true",
                "required": "true",
                "value": "",
                "configurationType": "salesforce",
                "errorDetails": \{
                    "errorCode": "",
                    "message": ""
                \}
            }
        ]
    },
    "autoNavigation": "true",
    "envelopeIdStamping": "true",
    "notification": {
        "reminders": \{
            "reminderEnabled": "true",
            "reminderDelay": "2",
            "reminderFrequency": "2"
        \},
        "expirations": \{
            "expireEnabled": "true",
            "expireAfter": "30",
            "expireWarn": "5"
        \}
    },
    "enforceSignerVisibility": "true",
    "enableWetSign": "false",
    "allowMarkup": "false",
    "allowReassign": "true",
    "disableResponsiveDocument": "false"
}

Get user info

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

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "quota_wait": true,
    "auth_api_domain": "account.docusign.com"
\}

Sample Output

{
    "sub": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "John Doe",
    "given_name": "John",
    "family_name": "Doe",
    "created": "2023-05-15T10:30:00Z",
    "email": "john.doe@example.com",
    "accounts": [
        \{
            "account_id": "1234567-8901-2345-6789-012345678901",
            "is_default": true,
            "account_name": "John Doe's Account",
            "base_uri": "https://na2.docusign.net/restapi"
        \},
        \{
            "account_id": "9876543-2109-8765-4321-098765432109",
            "is_default": false,
            "account_name": "Business Account",
            "base_uri": "https://na3.docusign.net/restapi"
        \}
    ]
}

List accounts

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

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
    "quota_wait": true
\}

Sample Output

{
    "items": [
        \{
            "account_id": "1234567",
            "is_default": true,
            "account_name": "My Main Account",
            "base_uri": "https://demo.docusign.net/restapi/v2.1"
        \},
        \{
            "account_id": "7654321",
            "is_default": false,
            "account_name": "Secondary Account",
            "base_uri": "https://demo.docusign.net/restapi/v2.1"
        \}
    ]
}

List envelope custom fields

Retrieves the custom field information for the specified envelope. Sample Input

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

Sample Output

{
    "textCustomFields": [
        {
            "fieldId": "12345",
            "name": "Project Name",
            "show": "true",
            "required": "false",
            "value": "New Office Building",
            "configurationType": "text",
            "errorDetails": \{
                "errorCode": "",
                "message": ""
            \}
        },
        {
            "fieldId": "67890",
            "name": "Contract Number",
            "show": "true",
            "required": "true",
            "value": "CNT-2023-001",
            "configurationType": "text",
            "errorDetails": \{
                "errorCode": "",
                "message": ""
            \}
        }
    ],
    "listCustomFields": [
        {
            "listItems": [
                "Option 1",
                "Option 2",
                "Option 3"
            ],
            "fieldId": "54321",
            "name": "Department",
            "show": "true",
            "required": "true",
            "value": "Option 2",
            "configurationType": "list",
            "errorDetails": \{
                "errorCode": "",
                "message": ""
            \}
        }
    ]
}

List envelope documents

Get a list of documents in an envelope. Sample Input

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2",
    "from_date": "2023-01-01T00:00:00Z",
    "to_date": "2023-06-30T23:59:59Z",
    "from_to_status": "changed",
    "status": [
        "sent",
        "delivered",
        "completed"
    ],
    "search_text": "Contract",
    "user_id": "5678abcd-ef12-3456-7890-123456789012",
    "user_filter": "sender"
\}

Sample Output

{
    "envelopeId": "3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2",
    "envelopeDocuments": [
        {
            "documentId": "1",
            "name": "Contract.pdf",
            "type": "content",
            "uri": "/envelopes/3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2/documents/1",
            "order": "1",
            "pages": "5",
            "display": "inline",
            "signerMustAcknowledge": "no",
            "includeInDownload": "true",
            "containsPdfFormFields": "false",
            "attachmentTabId": null,
            "sizeBytes": 524288,
            "authoritativeCopy": "false",
            "documentFields": [
                \{
                    "name": "ContractNumber",
                    "value": "CN-2023-001"
                \}
            ],
            "availableDocumentTypes": [
                \{
                    "type": "pdf",
                    "isDefault": "true"
                \}
            ]
        },
        {
            "documentId": "2",
            "name": "Appendix.docx",
            "type": "content",
            "uri": "/envelopes/3f14f5d0-5e2a-4b6c-9c1e-a9c8f1b6d4e2/documents/2",
            "order": "2",
            "pages": "3",
            "display": "inline",
            "signerMustAcknowledge": "no",
            "includeInDownload": "true",
            "containsPdfFormFields": "false",
            "attachmentTabId": null,
            "sizeBytes": 262144,
            "authoritativeCopy": "false",
            "documentFields": [],
            "availableDocumentTypes": [
                \{
                    "type": "pdf",
                    "isDefault": "true"
                \},
                \{
                    "type": "docx",
                    "isDefault": "false"
                \}
            ]
        }
    ]
}

List envelope templates

Get a list of envelope templates Sample Input

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

Sample Output

{
    "templates": [
        {
            "templateId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
            "name": "Sales Contract Template",
            "documentId": "1",
            "documentName": "Sales_Contract.pdf",
            "applied": "true",
            "templateMatch": \{
                "matchPercentage": "95",
                "documentStartPage": "1",
                "documentEndPage": "5"
            \},
            "uri": "/templates/1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
        },
        {
            "templateId": "2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q",
            "name": "NDA Template",
            "documentId": "2",
            "documentName": "Non_Disclosure_Agreement.pdf",
            "applied": "false",
            "templateMatch": \{
                "matchPercentage": "80",
                "documentStartPage": "1",
                "documentEndPage": "3"
            \},
            "uri": "/templates/2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q"
        }
    ]
}

List envelope templates by document

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

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

Sample Output

{
    "templates": [
        {
            "templateId": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
            "name": "Sales Contract Template",
            "documentId": "1",
            "documentName": "Sales_Contract.pdf",
            "applied": "true",
            "templateMatch": \{
                "matchPercentage": "95",
                "documentStartPage": "1",
                "documentEndPage": "5"
            \},
            "uri": "/templates/a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p"
        },
        {
            "templateId": "q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f",
            "name": "NDA Template",
            "documentId": "1",
            "documentName": "NDA.pdf",
            "applied": "false",
            "templateMatch": \{
                "matchPercentage": "80",
                "documentStartPage": "1",
                "documentEndPage": "3"
            \},
            "uri": "/templates/q7r8s9t0-1u2v-3w4x-5y6z-7a8b9c0d1e2f"
        }
    ]
}

List envelopes

Get a list of envelopes. Sample Input

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "from_date": "2023-01-01T00:00:00Z",
    "to_date": "2023-06-30T23:59:59Z",
    "from_to_status": "changed",
    "status": [
        "sent",
        "delivered",
        "completed"
    ],
    "search_text": "Contract",
    "user_filter": "sender"
\}

Sample Output

{
    "resultSetSize": "2",
    "startPosition": "0",
    "endPosition": "1",
    "totalSetSize": "2",
    "nextUri": "",
    "previousUri": "",
    "envelopes": [
        {
            "status": "completed",
            "documentsUri": "/envelopes/abc123/documents",
            "recipientsUri": "/envelopes/abc123/recipients",
            "attachmentsUri": "/envelopes/abc123/attachments",
            "envelopeUri": "/envelopes/abc123",
            "emailSubject": "Please sign this contract",
            "envelopeId": "abc123",
            "customFieldsUri": "/envelopes/abc123/custom_fields",
            "notificationUri": "/envelopes/abc123/notification",
            "createdDateTime": "2023-05-15T10:00:00Z",
            "sentDateTime": "2023-05-15T10:05:00Z",
            "completedDateTime": "2023-05-16T14:30:00Z",
            "statusChangedDateTime": "2023-05-16T14:30:00Z",
            "documentsCombinedUri": "/envelopes/abc123/documents/combined",
            "certificateUri": "/envelopes/abc123/documents/certificate",
            "templatesUri": "/envelopes/abc123/templates",
            "sender": \{
                "userName": "John Doe",
                "userId": "user123",
                "accountId": "1234567",
                "email": "john.doe@example.com"
            \},
            "purgeState": "unpurged",
            "isSignatureProviderEnvelope": "false",
            "anySigner": "false",
            "envelopeLocation": "current"
        },
        {
            "status": "sent",
            "documentsUri": "/envelopes/def456/documents",
            "recipientsUri": "/envelopes/def456/recipients",
            "attachmentsUri": "/envelopes/def456/attachments",
            "envelopeUri": "/envelopes/def456",
            "emailSubject": "Contract renewal",
            "envelopeId": "def456",
            "customFieldsUri": "/envelopes/def456/custom_fields",
            "notificationUri": "/envelopes/def456/notification",
            "createdDateTime": "2023-06-01T09:00:00Z",
            "sentDateTime": "2023-06-01T09:05:00Z",
            "completedDateTime": null,
            "statusChangedDateTime": "2023-06-01T09:05:00Z",
            "documentsCombinedUri": "/envelopes/def456/documents/combined",
            "certificateUri": "/envelopes/def456/documents/certificate",
            "templatesUri": "/envelopes/def456/templates",
            "sender": \{
                "userName": "Jane Smith",
                "userId": "user456",
                "accountId": "1234567",
                "email": "jane.smith@example.com"
            \},
            "purgeState": "unpurged",
            "isSignatureProviderEnvelope": "false",
            "anySigner": "false",
            "envelopeLocation": "current"
        }
    ]
}

List folders

Get a list of all the folders in your account. Sample Input

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "quota_wait": true
\}

Sample Output

{
    "folders": [
        {
            "ownerUserName": "John Doe",
            "ownerEmail": "john.doe@example.com",
            "ownerUserId": "12345678-1234-1234-1234-123456789012",
            "type": "normal",
            "name": "My Documents",
            "uri": "/folders/0000000-0000-0000-0000-000000000000",
            "folderId": "0000000-0000-0000-0000-000000000000",
            "folders": [
                \{
                    "ownerUserName": "John Doe",
                    "ownerEmail": "john.doe@example.com",
                    "ownerUserId": "12345678-1234-1234-1234-123456789012",
                    "type": "normal",
                    "name": "Contracts",
                    "uri": "/folders/1111111-1111-1111-1111-111111111111",
                    "parentFolderId": "0000000-0000-0000-0000-000000000000",
                    "parentFolderUri": "/folders/0000000-0000-0000-0000-000000000000",
                    "folderId": "1111111-1111-1111-1111-111111111111"
                \},
                \{
                    "ownerUserName": "John Doe",
                    "ownerEmail": "john.doe@example.com",
                    "ownerUserId": "12345678-1234-1234-1234-123456789012",
                    "type": "normal",
                    "name": "Invoices",
                    "uri": "/folders/2222222-2222-2222-2222-222222222222",
                    "parentFolderId": "0000000-0000-0000-0000-000000000000",
                    "parentFolderUri": "/folders/0000000-0000-0000-0000-000000000000",
                    "folderId": "2222222-2222-2222-2222-222222222222"
                \}
            ],
            "filter": \{
                "actionRequired": "false",
                "expires": "false",
                "isTemplate": "false",
                "status": "active",
                "fromDateTime": "2023-01-01T00:00:00Z",
                "toDateTime": "2023-12-31T23:59:59Z",
                "searchTarget": "folders",
                "searchText": "",
                "folderIds": "",
                "orderBy": "name",
                "order": "asc"
            \}
        }
    ]
}

List templates

Get a list of templates for the specified account Sample Input Sample Output

{
    "envelopeTemplates": [
        {
            "templateId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
            "name": "Sales Contract",
            "shared": "false",
            "description": "Standard sales contract template",
            "lastModified": "2023-06-15T14:30:00Z",
            "created": "2023-01-01T09:00:00Z",
            "pageCount": 3,
            "uri": "/templates/1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
            "folderName": "Sales Templates",
            "folderId": "abcd1234-5678-efgh-ijkl-9012mnop3456",
            "folderUri": "/folders/abcd1234-5678-efgh-ijkl-9012mnop3456",
            "owner": \{
                "userName": "John Doe",
                "userId": "user1234",
                "email": "john.doe@example.com"
            \},
            "emailSubject": "Please sign the sales contract",
            "emailBlurb": "Attached is our standard sales contract for your review and signature.",
            "signingLocation": "online",
            "authoritativeCopy": "true",
            "enforceSignerVisibility": "true",
            "enableWetSign": "false",
            "allowMarkup": "false",
            "allowReassign": "false"
        }
    ],
    "resultSetSize": "1",
    "startPosition": "0",
    "endPosition": "1",
    "totalSetSize": "1"
}

Raw HTTP request (advanced)

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

{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "method": "POST",
    "url": {
        "full_url": "https://demo.docusign.net/restapi/v2.1/accounts/1234567/envelopes"
    },
    "headers": [
        \{
            "key": "Content-Type",
            "value": "application/json"
        \}
    ],
    "body": {
        "raw": {
            "emailSubject": "Please sign this document",
            "documents": [
                \{
                    "documentBase64": "base64encodeddocumentcontent...",
                    "name": "Contract.pdf",
                    "fileExtension": "pdf",
                    "documentId": "1"
                \}
            ],
            "recipients": {
                "signers": [
                    {
                        "email": "john.doe@example.com",
                        "name": "John Doe",
                        "recipientId": "1",
                        "tabs": {
                            "signHereTabs": [
                                \{
                                    "xPosition": "100",
                                    "yPosition": "100",
                                    "documentId": "1",
                                    "pageNumber": "1"
                                \}
                            ]
                        }
                    }
                ]
            },
            "status": "sent"
        }
    },
    "include_raw_body": true,
    "parse_response": "true"
}

Sample Output

{
    "response": {
        "status_code": 201,
        "headers": \{
            "Content-Type": "application/json",
            "X-DocuSign-TraceToken": "1234abcd-5678-90ef-ghij-klmnopqrstuv"
        \},
        "body": \{
            "envelopeId": "5678-abcd-1234-efgh-ijklmnopqrst",
            "uri": "/envelopes/5678-abcd-1234-efgh-ijklmnopqrst",
            "statusDateTime": "2023-06-15T10:30:45.1234Z",
            "status": "sent"
        \}
    }
}

Update envelope custom fields

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

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9...",
    "account": "1234567",
    "envelope_id": "3f3a39d5-6d9f-4e1c-9a5b-8e0b1c1d2e3f",
    "list_custom_fields": [
        \{
            "name": "Department",
            "value": "Sales",
            "field_id": "CustomField1",
            "show": true,
            "required": false,
            "list_items": [
                "Sales",
                "Marketing",
                "Finance",
                "HR"
            ]
        \}
    ],
    "text_custom_fields": [
        \{
            "name": "Employee ID",
            "value": "EMP001",
            "field_id": "CustomField2",
            "show": true,
            "required": true
        \}
    ]
}

Sample Output

{
    "textCustomFields": [
        \{
            "fieldId": "CustomField2",
            "name": "Employee ID",
            "show": "true",
            "required": "true",
            "value": "EMP001"
        \}
    ],
    "listCustomFields": [
        \{
            "listItems": [
                "Sales",
                "Marketing",
                "Finance",
                "HR"
            ],
            "fieldId": "CustomField1",
            "name": "Department",
            "show": "true",
            "required": "false",
            "value": "Sales"
        \}
    ]
}

DDL operations

List accounts domains (DDL)

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

\{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjY4MTg1ZmYxLTRlNTEtNGNlOS1hZjFjLTY4OTgxMjIwMzMxNyJ9.eyJUb2tlblR5cGUiOjUsIklzc3VlSW5zdGFudCI6MTU5NTg3MDc3NCJFWHI6MTU5NTg5OTU3NCwiVXNlcklkIjoiMTIzNDU2Nzg5MCJ9.example_signature",
    "quota_wait": true
\}

Sample Output

{
    "domains": [
        \{
            "domain": "example1.com",
            "accountId": "12345678-1234-1234-1234-123456789012"
        \},
        \{
            "domain": "example2.com",
            "accountId": "98765432-9876-9876-9876-987654321098"
        \}
    ]
}

Was this page helpful?