openapi: 3.0.1
info:
title: DocuSign Admin AccountBrands Templates 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: Templates
description: Create and manage reusable templates that define documents, recipients, tabs, and routing for common agreement workflows.
externalDocs:
url: https://developers.docusign.com/docs/esign-rest-api/reference/templates/
paths:
/accounts/{accountId}/templates:
get:
operationId: Templates_ListTemplates
summary: Docusign List Templates
description: Retrieves a list of templates associated with the specified account. Templates define reusable envelopes with predefined documents, recipients, tabs, and routing.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
- name: count
in: query
description: Maximum number of templates to return. Default is 100.
schema:
type: integer
default: 100
- name: start_position
in: query
description: Starting index for the result set.
schema:
type: integer
- name: search_text
in: query
description: Search text to filter templates by name.
schema:
type: string
- name: folder
in: query
description: Folder from which to retrieve templates. Valid values include all, drafts, inbox, sent_items, recyclebin.
schema:
type: string
- name: folder_ids
in: query
description: Comma-separated list of folder IDs to search within.
schema:
type: string
- name: shared_by_me
in: query
description: When true, returns templates shared by the current user.
schema:
type: string
- name: order
in: query
description: Sort order for results. Valid values are asc and desc.
schema:
type: string
enum:
- asc
- desc
- name: order_by
in: query
description: Template property to sort by. Valid values include name, modified, used.
schema:
type: string
- name: used_from_date
in: query
description: Filter templates used on or after this date.
schema:
type: string
format: date-time
- name: used_to_date
in: query
description: Filter templates used before this date.
schema:
type: string
format: date-time
- name: include
in: query
description: Comma-separated list of additional information to include. Valid values include custom_fields, documents, folders, notifications, recipients.
schema:
type: string
responses:
'200':
description: Successfully retrieved templates.
content:
application/json:
schema:
$ref: '#/components/schemas/EnvelopeTemplateResults'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
operationId: Templates_CreateTemplate
summary: Docusign Create a Template
description: Creates a new template from scratch or from an existing template. Templates define the document content, recipients, tabs, and routing for reusable envelope workflows.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EnvelopeTemplate'
responses:
'201':
description: Template created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/TemplateSummary'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/accounts/{accountId}/templates/{templateId}:
get:
operationId: Templates_GetTemplate
summary: Docusign Get a Template
description: Retrieves the definition and properties of the specified template, including its documents, recipients, tabs, and routing information.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/templateId'
- name: include
in: query
description: Comma-separated list of additional properties to include.
schema:
type: string
responses:
'200':
description: Successfully retrieved the template.
content:
application/json:
schema:
$ref: '#/components/schemas/EnvelopeTemplate'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
operationId: Templates_UpdateTemplate
summary: Docusign Update a Template
description: Updates the template specified by templateId. You can modify the template name, description, documents, recipients, and tabs.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/templateId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EnvelopeTemplate'
responses:
'200':
description: Template updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/TemplateSummary'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
operationId: Templates_DeleteTemplate
summary: Docusign Delete a Template
description: Deletes the specified template. Deleted templates are moved to the recycle bin and can be recovered within a retention period.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/templateId'
responses:
'200':
description: Template deleted successfully.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/accounts/{accountId}/templates/{templateId}/recipients:
get:
operationId: TemplateRecipients_ListRecipients
summary: Docusign List Template Recipients
description: Retrieves the recipients defined in the specified template, including their roles, routing order, and tab assignments.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/templateId'
- name: include_tabs
in: query
description: When true, includes the tabs associated with each recipient.
schema:
type: string
responses:
'200':
description: Successfully retrieved template recipients.
content:
application/json:
schema:
$ref: '#/components/schemas/Recipients'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
operationId: TemplateRecipients_UpdateRecipients
summary: Docusign Update Template Recipients
description: Updates one or more recipients in the specified template.
tags:
- Templates
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/templateId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Recipients'
responses:
'200':
description: Template recipients updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/RecipientsUpdateSummary'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/v2/accounts/{accountId}/templates:
get:
tags:
- Templates
summary: Docusign Gets the definition of a template.
description: Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
operationId: Templates_GetTemplates
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
- name: count
in: query
description: The number of records to return.
schema:
type: string
- name: folder
in: query
description: The query value can be a folder name or folder ID. The response will only return templates in the specified folder.
schema:
type: string
- name: folder_ids
in: query
description: A comma-separated list of folder ID GUIDs.
schema:
type: string
- name: from_date
in: query
description: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
schema:
type: string
- name: include
in: query
description: "A comma-separated list of additional information to include in the response. Valid values are: \n\n- `recipients`: Includes information about template recipients.\n- `folders`: Includes information about the folder that holds the template. \n- `documents` : Includes information about template documents.\n- `custom_fields`: Includes information about template custom fields.\n- `notifications`: Includes information about the notification settings for templates.\n- `advanced_templates`: Includes advanced templates in the response. For example, these include templates that use advanced recipient routing. We recommend that you use this option to ensure that the response includes all relevant templates. "
schema:
type: string
- name: modified_from_date
in: query
schema:
type: string
- name: modified_to_date
in: query
schema:
type: string
- name: order
in: query
description: "Sets the direction order used to sort the list. Valid values are: \n\n- `asc` = ascending sort order (a to z) \n- `desc` = descending sort order (z to a)"
schema:
type: string
- name: order_by
in: query
description: "Sets the file attribute used to sort the list. Valid values are: \n\n- `name`: template name \n- `modified`: The date and time the template was last modified. \n- `used`: The date and time the template was last used."
schema:
type: string
- name: search_text
in: query
description: The search text used to search the names of templates.
schema:
type: string
- name: shared_by_me
in: query
description: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
schema:
type: string
- name: start_position
in: query
description: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
schema:
type: string
- name: to_date
in: query
description: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
schema:
type: string
- name: used_from_date
in: query
description: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
schema:
type: string
- name: used_to_date
in: query
description: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
schema:
type: string
- name: user_filter
in: query
description: 'Sets if the templates shown in the response Valid values are: -owned_by_me: only shows templates the user owns. -shared_with_me: only shows templates that are shared with the user. -all: shows all templates owned or shared with the user.'
schema:
type: string
- name: user_id
in: query
description: The id of the user.
schema:
type: string
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/envelopeTemplateResults'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: ListTemplates
x-ds-method: list
x-ds-service: Templates
x-ds-in-sdk: true
post:
tags:
- Templates
summary: Docusign Creates a template.
description: 'Creates a template definition using a multipart request.
### Template Email Subject Merge Fields
Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.
The merge fields, based on the recipient''s role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.
Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient.
###### If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.
To add a recipient''s name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:
`[[<roleName>_UserName]]`
Example:
`"emailSubject":"[[Signer 1_UserName]], Please sign this NDA",`
To add a recipient''s email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:
`[[<roleName>_Email]]`
Example:
`"emailSubject":"[[Signer 1_Email]], Please sign this NDA",`
In both cases the <roleName> is the recipient''s contents of the `roleName` property in the template.
For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then `[[<roleName>_UserName]]` or `[[<roleName>_Email]]` is shown in the email subject.'
operationId: Templates_PostTemplates
parameters:
- name: accountId
in: path
description: The external account number (int) or account id GUID.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/envelopeTemplate'
application/xml:
schema:
$ref: '#/components/schemas/envelopeTemplate'
required: false
responses:
'201':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/templateSummary'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: createTemplate
x-ds-method: create
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: envelopeTemplate
/v2/accounts/{accountId}/templates/{templateId}:
get:
tags:
- Templates
summary: Docusign Gets a list of templates for a specified account.
description: Retrieves the definition of the specified template.
operationId: Templates_GetTemplate
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: include
in: query
description: "A comma-separated list of additional information to include in the response. Valid values are: \n\n- `recipients`: Includes information about template recipients.\n- `folders`: Includes information about the folder that holds the template. \n- `documents` : Includes information about template documents.\n- `custom_fields`: Includes information about template custom fields.\n- `notifications`: Includes information about the notification settings for templates.\n- `advanced_templates`: Includes advanced templates in the response. For example, these include templates that use advanced recipient routing. We recommend that you use this option to ensure that the response includes all relevant templates. "
schema:
type: string
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/envelopeTemplate'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: get
x-ds-method: get
x-ds-service: Templates
x-ds-in-sdk: true
put:
tags:
- Templates
summary: Docusign Updates an existing template.
description: Updates an existing template.
operationId: Templates_PutTemplate
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/envelopeTemplate'
application/xml:
schema:
$ref: '#/components/schemas/envelopeTemplate'
required: false
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/templateUpdateSummary'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: update
x-ds-method: update
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: envelopeTemplate
/v2/accounts/{accountId}/templates/{templateId}/{templatePart}:
put:
tags:
- Templates
summary: Docusign Shares a template with a group
description: Shares a template with the specified members group.
operationId: Templates_PutTemplatePart
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: templatePart
in: path
description: Currently, the only defined part is **groups**.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/groupInformation'
application/xml:
schema:
$ref: '#/components/schemas/groupInformation'
required: false
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/groupInformation'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: updateGroupShare
x-ds-method: updateGroupShare
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: groupInformation
delete:
tags:
- Templates
summary: Docusign Removes a member group's sharing permissions for a template.
description: Removes a member group's sharing permissions for a specified template.
operationId: Templates_DeleteTemplatePart
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: templatePart
in: path
description: Currently, the only defined part is **groups**.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/groupInformation'
application/xml:
schema:
$ref: '#/components/schemas/groupInformation'
required: false
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/groupInformation'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: deleteGroupShare
x-ds-method: deleteGroupShare
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: groupInformation
/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages:
get:
tags:
- Templates
summary: Docusign Returns document page image(s) based on input.
operationId: Pages_GetTemplatePageImages
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: count
in: query
description: The maximum number of results to be returned by this request.
schema:
type: string
- name: dpi
in: query
description: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310.
schema:
type: string
- name: max_height
in: query
description: Sets the maximum height (in pixels) of the returned image.
schema:
type: string
- name: max_width
in: query
description: Sets the maximum width (in pixels) of the returned image.
schema:
type: string
- name: nocache
in: query
schema:
type: string
- name: show_changes
in: query
schema:
type: string
- name: start_position
in: query
description: The position within the total result set from which to start returning values. The value **thumbnail** may be used to return the page image.
schema:
type: string
responses:
'200':
description: Successful response.
content:
'*/*':
schema:
$ref: '#/components/schemas/pageImages'
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: getDocumentPageImages
x-ds-method: getPageImages
x-ds-service: Templates
x-ds-in-sdk: true
/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}:
delete:
tags:
- Templates
summary: Docusign Deletes a page from a document in an template.
description: Deletes a page from a document in a template based on the page number.
operationId: Pages_DeleteTemplatePage
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: pageNumber
in: path
description: The page number being accessed.
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/pageRequest'
application/xml:
schema:
$ref: '#/components/schemas/pageRequest'
required: false
responses:
'200':
description: Successful response.
content: {}
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: deleteDocumentPage
x-ds-method: deleteDocumentPage
x-ds-service: Templates
x-ds-in-sdk: true
x-codegen-request-body-name: pageRequest
/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image:
get:
tags:
- Templates
summary: Docusign Gets a page image from a template for display.
description: Retrieves a page image for display from the specified template.
operationId: Pages_GetTemplatePageImage
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: pageNumber
in: path
description: The page number 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: dpi
in: query
description: Number of dots per inch for the resulting image. The default if not used is 94. The range is 1-310.
schema:
type: string
- name: max_height
in: query
description: Sets the maximum height (in pixels) of the returned image.
schema:
type: string
- name: max_width
in: query
description: Sets the maximum width (in pixels) of the returned image.
schema:
type: string
- name: show_changes
in: query
schema:
type: string
responses:
'200':
description: Successful response.
content:
image/png:
schema:
type: string
format: binary
'400':
description: Error encountered.
content:
image/png:
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodname: getDocumentPageImage
x-ds-method: getDocumentPageImage
x-ds-service: Templates
x-ds-in-sdk: true
put:
tags:
- Templates
summary: Docusign Rotates page image from a template for display.
description: Rotates page image from a template for display. The page image can be rotated to the left or right.
operationId: Pages_PutTemplatePageImage
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: pageNumber
in: path
description: The page number being accessed.
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/pageRequest'
application/xml:
schema:
$ref: '#/components/schemas/pageRequest'
required: false
responses:
'200':
description: Successful response.
content: {}
'400':
description: Error encountered.
content:
'*/*':
schema:
$ref: '#/components/schemas/errorDetails'
deprecated: false
x-ds-methodna
# --- truncated at 32 KB (556 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/docusign/refs/heads/main/openapi/docusign-templates-api-openapi.yml