openapi: 3.0.1
info:
title: DocuSign Admin AccountBrands TemplateDocuments API
description: An API for an organization administrator to manage organizations, accounts and users
termsOfService: https://www.docusign.com/company/terms-and-conditions/developers
contact:
name: DocuSign Developer Center
url: https://developers.docusign.com
email: devcenter@docusign.com
version: v2.1
servers:
- url: https://api.docusign.net/Management
tags:
- name: TemplateDocuments
description: "<!-- resources aren't rendered the same way\n as other pages. This is a little hack to\n make the headings work better -->\n<style>\nh1, h2, h3 {\n margin-top: 1em;\n}\n</style>\n\nThe TemplateDocuments resource provides methods\nthat manage documents in a template.\nYou can:\n* add one or more documents to the template\n* retrieve one or more documents from the template\n* delete documents from the template\n\nAll of the methods in this resource\noperate on on an existing template.\nBefore you can add documents\nto a template,\nyou must first create it\nwith the [Templates: create][templatescreate] method. \n\n[templatescreate]: https://developers.docusign.com/esign-rest-api/reference/Templates/Templates/create/\n"
paths:
/v2/accounts/{accountId}/templates/{templateId}/documents:
get:
tags:
- TemplateDocuments
summary: Docusign Gets a list of documents associated with a template.
description: Retrieves a list of documents associated with the specified template.
operationId: Documents_GetTemplateDocuments
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
- name: templateId
in: path
description: The ID of the template being accessed.
required: true
schema:
type: string
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/templateDocumentsResult'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: listDocuments
x-ds-method: list
x-ds-service: Templates
x-ds-in-sdk: true
put:
tags:
- TemplateDocuments
summary: Docusign Adds documents to a template document.
description: Adds one or more documents to an existing template document.
operationId: Documents_PutTemplateDocuments
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
- name: templateId
in: path
description: The ID of the template being accessed.
required: true
schema:
type: string
- name: apply_document_fields
in: query
description: 'When **true**, document fields
can be added or modified
while adding or modifying envelope documents.
'
schema:
type: string
- name: persist_tabs
in: query
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/envelopeDefinition'
application/xml:
schema:
$ref: '#/components/schemas/envelopeDefinition'
required: false
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/templateDocumentsResult'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: updateDocuments
x-ds-method: updateList
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: envelopeDefinition
delete:
tags:
- TemplateDocuments
summary: Docusign Deletes documents from a template.
description: Deletes one or more documents from an existing template.
operationId: Documents_DeleteTemplateDocuments
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
- name: templateId
in: path
description: The ID of the template being accessed.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/envelopeDefinition'
application/xml:
schema:
$ref: '#/components/schemas/envelopeDefinition'
required: false
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/templateDocumentsResult'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: deleteDocuments
x-ds-method: delete
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: envelopeDefinition
/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}:
get:
tags:
- TemplateDocuments
summary: Docusign Gets PDF documents from a template.
description: 'Retrieves one or more PDF documents from the specified template.
You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.'
operationId: Documents_GetTemplateDocument
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
- name: documentId
in: path
description: The ID of the document being accessed.
required: true
schema:
type: string
- name: templateId
in: path
description: The ID of the template being accessed.
required: true
schema:
type: string
- name: encrypt
in: query
schema:
type: string
- name: show_changes
in: query
schema:
type: string
responses:
'200':
description: Successful response.
content:
application/pdf:
schema:
type: string
format: binary
'400':
description: Error encountered.
content:
application/pdf:
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: getDocument
x-ds-method: get
x-ds-service: Templates
x-ds-in-sdk: true
put:
tags:
- TemplateDocuments
summary: Docusign Adds a document to a template document.
description: Adds the specified document to an existing template document.
operationId: Documents_PutTemplateDocument
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
- name: documentId
in: path
description: The ID of the document being accessed.
required: true
schema:
type: string
- name: templateId
in: path
description: The ID of the template being accessed.
required: true
schema:
type: string
- name: apply_document_fields
in: query
description: 'When **true**, document fields
can be added or modified
while adding or modifying envelope documents.
'
schema:
type: string
- name: is_envelope_definition
in: query
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/envelopeDefinition'
application/xml:
schema:
$ref: '#/components/schemas/envelopeDefinition'
required: false
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/envelopeDocument'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: updateDocument
x-ds-method: update
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: envelopeDefinition
components:
schemas:
samlAssertionAttribute:
type: object
properties:
errorDetails:
$ref: '#/components/schemas/errorDetails'
name:
type: string
description: ''
originalValue:
type: string
description: 'The initial value of the tab when it was sent to the recipient. '
value:
type: string
description: The value associated with the named SAML assertion attribute
description: ''
x-ds-definition-name: samlAssertionAttribute
x-ms-summary: ''
signatureType:
type: object
properties:
isDefault:
type: string
description: ''
type:
type: string
description: 'Type of the user. Valid values: type_owner, type_participant.'
description: ''
x-ds-definition-name: signatureType
x-ms-summary: ''
company:
type: object
properties:
anchorCaseSensitive:
type: string
description: 'Reserved for DocuSign.
<!--
When set to **true**, the anchor string does not consider case when matching strings in the document. The default value is **true**.
-->'
anchorHorizontalAlignment:
type: string
description: 'Reserved for DocuSign.
<!--
Specifies the alignment of anchor tabs with anchor strings. Possible values are **left** or **right**. The default value is **left**.
-->
'
anchorIgnoreIfNotPresent:
type: string
description: When set to **true**, this tab is ignored if anchorString is not found in the document.
anchorMatchWholeWord:
type: string
description: 'Reserved for DocuSign.
<!--
When set to **true**, the anchor string in this tab matches whole words only (strings embedded in other strings are ignored.) The default value is **true**.
-->
'
anchorString:
type: string
description: Specifies the anchor string.
anchorUnits:
type: string
description: 'Specifies units of the
`anchorXOffset` and
`anchorYOffset`.
Valid units are:
- `pixels`
- `inches`
- `mms`
- `cms`
'
anchorXOffset:
type: string
description: 'Specifies the X axis location of the tab in `anchorUnits` relative to the `anchorString`.
'
anchorYOffset:
type: string
description: 'Specifies the Y axis location of the tab in `anchorUnits` relative to the `anchorString`.
'
bold:
type: string
description: When set to **true**, the information in the tab is bold.
concealValueOnDocument:
type: string
description: 'When set to **true**, the field appears normally while the recipient is adding or modifying the information in the field, but the data is not visible (the characters are hidden by asterisks) to any other signer or the sender.
When an envelope is completed the information is available to the sender through the Form Data link in the DocuSign Console.
This setting applies only to text boxes and does not affect list boxes, radio buttons, or check boxes.'
conditionalParentLabel:
type: string
description: For conditional fields this is the TabLabel of the parent tab that controls this tab's visibility.
conditionalParentValue:
type: string
description: 'For conditional fields, this is the value of the parent tab that controls the tab''s visibility.
If the parent tab is a Checkbox, Radio button, Optional Signature, or Optional Initial use "on" as the value to show that the parent tab is active.
'
customTabId:
type: string
description: The DocuSign generated custom tab ID for the custom tab to be applied. This can only be used when adding new tabs for a recipient. When used, the new tab inherits all the custom tab properties.
disableAutoSize:
type: string
description: When set to **true**, disables the auto sizing of single line text boxes in the signing screen when the signer enters data. If disabled users will only be able enter as much data as the text box can hold. By default this is false. This property only affects single line text boxes.
documentId:
type: string
description: Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
errorDetails:
$ref: '#/components/schemas/errorDetails'
font:
type: string
description: 'The font to be used for the tab value. Supported Fonts include:
- Default
- Arial
- ArialNarrow
- Calibri
- CourierNew
- Garamond
- Georgia
- Helvetica
- LucidaConsole
- MSGothic
- MSMincho
- OCR-A
- Tahoma
- TimesNewRoman
- Trebuchet
- Verdana
'
fontColor:
type: string
description: "The font color used for the information in the tab. Possible values are: \n\n- Black\n- BrightBlue\n- BrightRed\n- DarkGreen\n- DarkRed\n- Gold\n- Green\n- NavyBlue\n- Purple\n- White\n"
fontSize:
type: string
description: 'The font size used for the information in the tab. Possible values are:
- Size7
- Size8
- Size9
- Size10
- Size11
- Size12
- Size14
- Size16
- Size18
- Size20
- Size22
- Size24
- Size26
- Size28
- Size36
- Size48
- Size72'
italic:
type: string
description: When set to **true**, the information in the tab is italic.
locked:
type: string
description: When set to **true**, the signer cannot change the data of the custom tab.
maxLength:
type: integer
description: An optional value that describes the maximum length of the property when the property is a string.
format: int32
mergeField:
$ref: '#/components/schemas/mergeField'
name:
type: string
description: Specifies the tool tip text for the tab.
originalValue:
type: string
description: 'The initial value of the tab when it was sent to the recipient. '
pageNumber:
type: string
description: 'Specifies the page number on which the tab is located.
Must be 1 for supplemental documents.
'
recipientId:
type: string
description: Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
required:
type: string
description: When set to **true**, the signer is required to fill out this tab
status:
type: string
description: 'Tab status
<!-- todo -->
'
tabGroupLabels:
type: array
description: ''
items:
type: string
tabId:
type: string
description: The unique identifier for the tab.
tabLabel:
type: string
description: 'The label string associated with the tab.
The string may be the empty string.
If no value is provided, the tab type is used as the value.
Maximum of 500 characters.
'
tabOrder:
type: string
description: 'A positive integer that sets the order the tab is navigated to during signing.
Tabs on a page are navigated to in ascending order, starting with the lowest number and moving to the highest. If two or more tabs have the same `tabOrder` value, the normal auto-navigation setting behavior for the envelope is used.'
templateLocked:
type: string
description: 'When set to **true**, the sender cannot change any attributes of the recipient. Used only when working with template recipients. '
templateRequired:
type: string
description: When set to **true**, the sender may not remove the recipient. Used only when working with template recipients.
tooltip:
type: string
description: ''
underline:
type: string
description: When set to **true**, the information in the tab is underlined.
value:
type: string
description: 'Specifies the value of the tab. '
width:
type: integer
description: Width of the tab in pixels.
format: int32
xPosition:
type: string
description: 'This property indicates the horizontal offset of the object on the page.
DocuSign uses 72 DPI when determining position.
Required. May be zero.
To improve the tab''s position on the document,
DocuSign recommends
adjusting `xPosition`
and `yPosition`
coordinates
by (-3, -2)
'
yPosition:
type: string
description: 'This property indicates the vertical offset of the object on the page.
DocuSign uses 72 DPI when determining position.
Required. May be zero.
To improve the tab''s position on the document,
DocuSign recommends
adjusting `xPosition`
and `yPosition`
coordinates
by (-3, -2)
'
description: 'A tab that displays the recipient''s company name.
'
x-ds-definition-name: company
x-ms-summary: 'A tab that displays the recipient''s company name.
'
serverTemplate:
type: object
properties:
sequence:
type: string
description: ''
templateId:
type: string
description: 'The unique identifier of the template. If this is not provided, DocuSign will generate a value. '
description: ''
x-ds-definition-name: serverTemplate
x-ms-summary: ''
recipientProofFile:
type: object
properties:
isInProofFile:
type: string
description: ''
description: ''
x-ds-definition-name: recipientProofFile
x-ms-summary: ''
radioGroup:
type: object
properties:
conditionalParentLabel:
type: string
description: For conditional fields this is the TabLabel of the parent tab that controls this tab's visibility.
conditionalParentValue:
type: string
description: 'For conditional fields, this is the value of the parent tab that controls the tab''s visibility.
If the parent tab is a Checkbox, Radio button, Optional Signature, or Optional Initial use "on" as the value to show that the parent tab is active.
'
documentId:
type: string
description: Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
groupName:
type: string
description: The name of the group. The search_text provided in the call automatically performs a wild card search on group_name.
radios:
type: array
description: Specifies the locations and status for radio buttons that are grouped together.
items:
$ref: '#/components/schemas/radio'
recipientId:
type: string
description: Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
requireAll:
type: string
description: 'When set to **true** and shared is true, information must be entered in this field to complete the envelope. '
requireInitialOnSharedChange:
type: string
description: Optional element for field markup. When set to **true**, the signer is required to initial when they modify a shared field.
shared:
type: string
description: When set to **true**, this custom tab is shared.
templateLocked:
type: string
description: 'When set to **true**, the sender cannot change any attributes of the recipient. Used only when working with template recipients. '
templateRequired:
type: string
description: When set to **true**, the sender may not remove the recipient. Used only when working with template recipients.
tooltip:
type: string
description: ''
description: 'This group tab is used to place radio buttons on a document.
The `radios` property
contains a list of
[`radio`](https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipientTabs/create/#/definitions/radio)
objects associated with the group. Only one radio button can
be selected in a group.
'
x-ds-definition-name: radioGroup
x-ms-summary: 'This group tab is used to place radio buttons on a document.
The `radios` property
contains a list of
[`radio`](https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipientTabs/create/#/definitions/radio)
objects associated with the group. Only one radio button can
be selected in a group.
'
compositeTemplate:
type: object
properties:
compositeTemplateId:
type: string
description: The identify of this composite template. It is used as a reference when adding document object information. If used, the document's `content-disposition` must include the composite template ID to which the document should be added. If a composite template ID is not specified in the content-disposition, the document is applied based on the value of the `documentId` property only. If no document object is specified, the composite template inherits the first document.
document:
$ref: '#/components/schemas/document'
inlineTemplates:
type: array
description: ' Zero or more inline templates and their position in the overlay. If supplied, they are overlaid into the envelope in the order of their Sequence value.'
items:
$ref: '#/components/schemas/inlineTemplate'
pdfMetaDataTemplateSequence:
type: string
description: ''
serverTemplates:
type: array
description: 0 or more server-side templates and their position in the overlay. If supplied, they are overlaid into the envelope in the order of their Sequence value
items:
$ref: '#/components/schemas/serverTemplate'
description: ''
x-ds-definition-name: compositeTemplate
x-ms-summary: ''
dobInformationInput:
type: object
properties:
dateOfBirth:
type: string
description: Specifies the recipient's date, month, and year of birth.
displayLevelCode:
type: string
description: "Specifies the display level for the recipient. \nValid values are: \n\n* ReadOnly\n* Editable\n* DoNotDisplay"
receiveInResponse:
type: string
description: When set to **true**, the information needs to be returned in the response.
description: 'Complex type containing:
* dateOfBirth
* displayLevelCode
* receiveInResponse'
x-ds-definition-name: dobInformationInput
x-ms-summary: 'Complex type containing:
* dateOfBirth
* displayLevelCode
* receiveInResponse'
dateSigned:
type: object
properties:
anchorCaseSensitive:
type: string
description: 'Reserved for DocuSign.
<!--
When set to **true**, the anchor string does not consider case when matching strings in the document. The default value is **true**.
-->'
anchorHorizontalAlignment:
type: string
description: 'Reserved for DocuSign.
<!--
Specifies the alignment of anchor tabs with anchor strings. Possible values are **left** or **right**. The default value is **left**.
-->
'
anchorIgnoreIfNotPresent:
type: string
description: When set to **true**, this tab is ignored if anchorString is not found in the document.
anchorMatchWholeWord:
type: string
description: 'Reserved for DocuSign.
<!--
When set to **true**, the anchor string in this tab matches whole words only (strings embedded in other strings are ignored.) The default value is **true**.
-->
'
anchorString:
type: string
description: Specifies the anchor string.
anchorUnits:
type: string
description: 'Specifies units of the
`anchorXOffset` and
`anchorYOffset`.
Valid units are:
- `pixels`
- `inches`
- `mms`
- `cms`
'
anchorXOffset:
type: string
description: 'Specifies the X axis location of the tab in `anchorUnits` relative to the `anchorString`.
'
anchorYOffset:
type: string
description: 'Specifies the Y axis location of the tab in `anchorUnits` relative to the `anchorString`.
'
bold:
type: string
description: When set to **true**, the information in the tab is bold.
conditionalParentLabel:
type: string
description: For conditional fields this is the TabLabel of the parent tab that controls this tab's visibility.
conditionalParentValue:
type: string
description: 'For conditional fields, this is the value of the parent tab that controls the tab''s visibility.
If the parent tab is a Checkbox, Radio button, Optional Signature, or Optional Initial use "on" as the value to show that the parent tab is active.
'
customTabId:
type: string
description: The DocuSign generated custom tab ID for the custom tab to be applied. This can only be used when adding new tabs for a recipient. When used, the new tab inherits all the custom tab properties.
documentId:
type: string
description: Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
errorDetails:
$ref: '#/components/schemas/errorDetails'
font:
type: string
description: 'The font to be used for the tab value. Supported Fonts include:
- Default
- Arial
- ArialNarrow
- Calibri
- CourierNew
- Garamond
- Georgia
- Helvetica
- LucidaConsole
- MSGothic
- MSMincho
- OCR-A
- Tahoma
- TimesNewRoman
- Trebuchet
- Verdana
'
fontColor:
type: string
description: "The font color used for the information in the tab. Possible values are: \n\n- Black\n- BrightBlue\n- BrightRed\n- DarkGreen\n- DarkRed\n- Gold\n- Green\n- NavyBlue\n- Purple\n- White\n"
fontSize:
type: string
description: 'The font size used for the information in the tab. Possible values are:
- Size7
- Size8
- Size9
- Size10
- Size11
- Size12
- Size14
- Size16
- Size18
- Size20
- Size22
- Size24
- Size26
- Size28
- Size36
- Size48
- Size72'
italic:
type: string
description: When set to **true**, the information in the tab is italic.
mergeField:
$ref: '#/components/schemas/mergeField'
name:
type: string
description: ''
pageNumber:
type: string
description: 'Specifies the page number on which the tab is located.
Must be 1 for supplemental documents.
'
recipientId:
type: string
description: Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
status:
type: string
description: 'Tab status
<!-- todo -->
'
tabGroupLabels:
type: array
description: ''
items:
type: string
tabId:
type: string
description: The unique identifier for the tab.
tabLabel:
type: string
description: 'The label string associated with the tab.
The string may be the empty string.
If no value is provided, the tab type is used as the value.
Maximum of 500 characters.
'
tabOrder:
type: string
description: 'A positive integer that sets the order the tab is navigated to during signing.
Tabs on a page are navigated to in ascending order, starting with the lowest number and moving to the highest. If two or more tabs have the same `tabOrder` value, the normal auto-navigation setting behavior for the envelope is used.'
templateLocked:
type: string
description: 'When set to **true**, the sender cannot change any attributes of the recipient. Used only when working with template recipients. '
templateRequired:
type: string
description: When set to **true**, the sender may not remove the recipient. Used only when working with template recipients.
tooltip:
type: string
description: ''
underline:
type: string
description: When set to **true**, the information in the tab is underlined.
value:
type: string
description: 'Specifies the value of the tab. '
xPosition:
type: string
description: 'This property indicates the horizontal offset of the object on the page.
DocuSign uses 72 DPI when determining position.
Required. May be zero.
To improve the tab''s position on the document,
DocuSign recommends
adjusting `xPosition`
and `yPosition`
coordinates
by (-3, -2)
'
yPosition:
type: string
description: 'This property indicates
# --- truncated at 32 KB (492 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/docusign/refs/heads/main/openapi/docusign-templatedocuments-api-openapi.yml