Skip to content

DocuSign: Gets a list of documents in an envelope

DocuSign esignature.esignatureDocumentsGetDocuments: arguments, response, policy and SDK examples.

← Esignature operations · Get started

Operation docusign.esignature_documents_getdocuments

Provider route: GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/docusign with npm, or alter-sdk-docusign with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { DocuSignIntegration } from "@alter-ai/docusign";
async function execute(input: Parameters<DocuSignIntegration["esignature"]["esignatureDocumentsGetDocuments"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new DocuSignIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.esignature.esignatureDocumentsGetDocuments(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_docusign import DocuSignIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = DocuSignIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.esignature.esignature_documents_get_documents(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.accountIdstringRequired within parent
path.envelopeIdstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.documents_by_useridstringOptional
query.include_agreement_typestringOptional
query.include_docgen_formfieldsstringOptional
query.include_is_editedstringOptional
query.include_metadatastringOptional
query.include_tabsstringOptional
query.recipient_idstringOptional
query.shared_user_idstringOptional

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Deletes documents from a draft envelope — response body

Referenced models: Deletes documents from a draft envelope — response body

9 more schemas are linked from the tables above, on the schema pages.

Deletes documents from a draft envelope — response body
FieldTypePresenceDescription and constraints
$objectRoot
envelopeDocumentsarrayOptionalAn array containing information about the documents that are included in the envelope.
envelopeDocuments[]ModelEach itemExpand Updates a template document — response body
envelopeIdstringOptionalThe envelope ID.

Referenced models: Updates a template document — response body

Updates a template document — response body
FieldTypePresenceDescription and constraints
$objectRootThis object contains details about the envelope document.
addedRecipientIdsarrayOptionalIf recipients were added by converting form fields into tabs, their IDs appear here. This property is read-only.
addedRecipientIds[]stringEach item
agreementTypestringOptional
agreementTypeSourcestringOptional
attachmentTabIdstringOptionalIf this document is an attachment to another document in the envelope, this is the ID of the attachment tab it is associated with on the other document.
authoritativeCopystringOptionalWhen **true,** marks all of the documents in the envelope as authoritative copies.

**Note:** You can override this value for a specific document. For example, you can set the `authoritativeCopy` property to **true** at the envelope level, but turn it off for a single document by setting the `authoritativeCopy` property for the document to **false.**
authoritativeCopyMetadataModelOptionalExpand Updates a template document — response body — name Metadata
Metadata that indicates if the sender can edit the `authoritativeCopy` property. Not applicable for template documents.
availableDocumentTypesarrayOptional
availableDocumentTypes[]ModelEach itemExpand Updates a template document — response body — available Document Types item
containsPdfFormFieldsstringOptionalWhen **true,** the document has editable form fields that are made available through a PDF format.
displaystringOptionalThis string sets the display and behavior properties of
the document during signing. Valid values:

* `modal`<br>
The document is shown as a supplement action strip
and can be viewed, downloaded, or printed in a modal window.
This is the recommended value for supplemental documents.

* `inline`<br>
The document is shown in the normal signing window.
This value is not used with supplemental documents,
but is the default value for all other documents.
displayMetadataModelOptionalExpand Updates a template document — response body — name Metadata
Metadata that indicates if the sender can edit the `display` property. Not applicable for template documents.
docGenDocumentStatusstringOptional
docGenErrorsarrayOptional
docGenErrors[]ModelEach itemExpand Updates a template document — response body — doc Gen Errors item
docGenFormFieldsarrayOptional
docGenFormFields[]ModelEach itemExpand Updates a template document — response body — doc Gen Form Fields item
documentBase64stringOptionalThe document's bytes. This field can be used to include a base64 version of the document bytes within an envelope definition instead of sending the document using a multi-part HTTP request. The maximum document size is smaller if this field is used due to the overhead of the base64 encoding.
documentFieldsarrayOptionalAn object containing information about the custom fields on the document.
documentFields[]ModelEach itemExpand Updates an existing brand — response body — colors item
documentIdstringOptionalThe ID of the document that the tab is placed on. This value must refer to the ID of an existing document.
documentIdGuidstringOptionalThe GUID of the document.
documentTemplateIdstringOptional
errorDetailsModelOptionalExpand Locks a template — response body — error Details
This object describes errors that occur. It is only valid for responses and ignored in requests.
hasDigitalSignaturestringOptional
includeInDownloadstringOptionalWhen **true,**
the document is included in the combined document download (`documentsCombinedUri`). This is only applied to [supplemental documents](/docs/esign-rest-api/esign101/concepts/documents/supplemental/).
The default value is **true.**
includeInDownloadMetadataModelOptionalExpand Updates a template document — response body — name Metadata
Metadata that indicates if the sender can edit the `includeInDownload` property. Not applicable for template documents.
isAceGenDocumentstringOptional
isDocGenDocumentstringOptional
isEditedstringOptional
isExternallyAvailablestringOptional
isFlattenedstringOptional
namestringOptionalThe document's file name.

Example: `Q1-Report.docx`
nameMetadataModelOptionalExpand Updates a template document — response body — name Metadata
Metadata that indicates if the sender can edit the `name` property. Not applicable for template documents.
orderstringOptionalThe order in which to sort the results.

Valid values are:


* `asc`: Ascending order.
* `desc`: Descending order.
pagesarrayOptionalAn array of page objects that contain information about the pages in the document.
pages[]ModelEach itemExpand Creates a workspace file — response body — thumbnail
signerMustAcknowledgestringOptionalSets how the signer interacts with the supplemental document.
Valid values:

* `no_interaction`<br>
No recipient action is required.

* `view`<br>
The recipient is required to view the document.

* `accept`<br>
The recipient is required to accept the document by selecting accept during signing, but is not required to view the document.

* `view_accept`<br>
The recipient is required to view and accept the document.

signerMustAcknowledgeMetadataModelOptionalExpand Updates a template document — response body — name Metadata
Metadata that indicates if the sender can edit the `signerMustAcknowledge` property. Not applicable for template documents.
sizeBytesstringOptional
templateLockedstringOptionalWhen **true,** the sender cannot change any attributes of the recipient. Used only when working with template recipients.
templateRequiredstringOptionalWhen **true,** the sender may not remove the recipient. Used only when working with template recipients.
typestringOptionalThe type of this tab. Values are:

- `Approve`
- `CheckBox`
- `Company`
- `Date`
- `DateSigned`
- `Decline`
- `Email`
- `EmailAddress`
- `EnvelopeId`
- `FirstName`
- `Formula`
- `FullName`
- `InitialHere`
- `InitialHereOptional`
- `LastName`
- `List`
- `Note`
- `Number`
- `Radio`
- `SignerAttachment`
- `SignHere`
- `SignHereOptional`
- `Ssn`
- `Text`
- `Title`
- `Zip5`
- `Zip5Dash4`
uristringOptionalThe URI for retrieving the document.

Referenced models: Updates a template document — response body — doc Gen Form Fields item, Updates a template document — response body — doc Gen Errors item, Locks a template — response body — error Details, Updates an existing brand — response body — colors item, Creates a workspace file — response body — thumbnail, Updates a template document — response body — name Metadata, Updates a template document — response body — available Document Types item

Updates a template document — response body — doc Gen Errors item
FieldTypePresenceDescription and constraints
$objectRootDescribes document generation errors.
errorCodestringOptionalA code associated with the error condition.
messagestringOptionalThe error message.
tagIdentifierstringOptionalThe tag that caused the syntax error.
See [Document Generation Syntax](https://support.docusign.com/s/document-item?bundleId=als1679428547895&topicId=ftc1679700030026.html)
to learn more about document generation syntax rules.
Locks a template — response body — error Details
FieldTypePresenceDescription and constraints
$objectRootThis object describes errors that occur. It is only valid for responses and ignored in requests.
errorCodestringOptionalThe code associated with the error condition.
messagestringOptionalA brief message describing the error condition.
Updates an existing brand — response body — colors item
FieldTypePresenceDescription and constraints
$objectRootA name-value pair that describes an item and provides a value for the item.
errorDetailsModelOptionalExpand Locks a template — response body — error Details
This object describes errors that occur. It is only valid for responses and ignored in requests.
namestringOptionalThe name of the item.
originalValuestringOptionalThe initial value of the item.
valuestringOptionalThe current value of the item.

Referenced models: Locks a template — response body — error Details

SDK function policy ID: docusign.esignature_documents_getdocuments. Catalog operation: esignature:Documents_GetDocuments. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.