Describe Template
POST/openapi/v1/templates/describe
Returns the template's role list (with TemplateRecipientId), document list, and tab list (with TemplateTabId). This is the required prerequisite for creating an envelope from a template: the create API matches signers by TemplateRecipientId and prefills tabs by TemplateTabId.
Visibility
- Only templates in the current space can be queried; cross-space/non-existent templates return the same error (no information leakage)
- draft / disabled templates can be described (for early integration) but cannot be used to create envelopes
CanPrefill
Only tabs with Tabs[].CanPrefill=true can be prefilled by the create API; attachment, auto-generated, and signing tabs such as signature/seal cannot be prefilled (CanPrefill=false).
Required Scope: envelope:read
Request Parameters
Header Parameters
AuthorizationRequiredstring
Bearer <access_token>
X-Operator-User-IdOptionalstring
Operator user ID. Not required in Authorization Code mode (the authorized user is used automatically). Optional in Client Credentials mode — omit to use the system user ID.
Request Body
application/jsonTemplateIdRequiredstring
Template ID
Request Example
{
"TemplateId": "TMa1b2c3d4e5f6g7h8i9j0k1l2"
}Response Parameters
Response.Data
TemplateIdOptionalstring
Template ID
BasicInfoOptionalobject
Template basic info
Sub-properties
EnvelopeTitleOptionalstring
Preset envelope title
SigningOrderTypeOptionalstring
Signing order type (required). parallel = all signers receive invitations at once; sequential = invitations are sent one by one according to Signers[].SigningOrder.
parallelsequential
ExpirationOptionalobject
Expiration settings
ExpireAfterDaysOptionalinteger
Preset expiration in days
WarnBeforeDaysOptionalinteger
Template preset reminder days before expiry: envelopes created from this template send a reminder email X days before expiry to signers who have not completed signing.
- Unset: defaults to 3 days
- 0: envelopes created from this template remind immediately
- N (1 ≤ N): reminds N days before expiry
- Can be overridden per request via WarnBeforeDays (priority: request value > template preset > default 3 days)
EmailNotificationOptionalobject
Preset email notification of the template
EmailSubjectOptionalstring
Email subject preset
EmailMessageOptionalstring
Email body preset
StatusOptionalstring
Template status. enabled = active and can be used to create envelopes; disabled = deactivated and cannot be used; draft = still being edited and cannot be used
enableddisableddraft
SignersOptionalarray<object>
Template signer role list
Sub-properties
TemplateRecipientIdOptionalstring
Template signer role ID (used to map signers when creating an envelope)
RoleNameOptionalstring
Role name
RecipientTypeOptionalstring
Recipient type
SigningOrderOptionalinteger
Signing order (0=parallel, >=1=sequential)
AuthenticationOptionalobject
Role preset authentication settings
Sub-properties
AuthMethodsOptionalarray<string>
Auth methods, e.g. email / access_code / ekyc
AccessCodeOptionalstring
Access code (present when access_code auth is preset)
EkycCertTypeOptionalstring
eKYC certificate type (present when ekyc auth is preset)
NotificationPreferenceOptionalstring
Role preset notification preference (email = email only; email_sms = email + SMS)
emailemail_sms
NotificationLanguageOptionalstring
Role preset notification language (empty = follow the sender language). zh-CN = Simplified Chinese; zh-TW = Traditional Chinese; en = English; th = Thai; vi = Vietnamese; ms = Malay; id = Indonesian
zh-CNzh-TWenthvimsid
DocumentsOptionalarray<object>
Template document list
Sub-properties
TemplateDocumentIdOptionalstring
Template document ID
NameOptionalstring
Document name
PageCountOptionalinteger
Page count
TabsOptionalarray<object>
Template tab list (only CanPrefill=true tabs can be prefilled by the create API)
Sub-properties
TemplateTabIdOptionalstring
Template tab ID (returned by describe; only tabs with CanPrefill=true can be prefilled)
TabTypeOptionalstring
Tab type. New API creation requests accept only the 12 values supported by `Tab`. This response may also contain fullName, number, email, and radioGroup from existing console-created controls; these four values are response-only compatibility and are not accepted for API creation. signHere=handwritten signature; stamp=stamp; initialHere=initial; dateSigned=sign date (auto-filled); fullName=full name (auto-filled); text=text field; multiLineText=multiline text; checkbox=checkbox; date=date (filled by signer); list=dropdown list; attachment=attachment (signer uploads images, used together with Properties); pagingStamp=cross-page seal; pagingSignature=cross-page signature (cross-page controls are applied across all pages of the document, on the right edge of each page); number=number; email=email; radioGroup=radio button group.
signHerestampinitialHeredateSignedfullNametextmultiLineTextcheckboxdatelistattachmentpagingStamppagingSignaturenumberemailradioGroup
TabLabelOptionalstring
Tab label configured in the template
CanPrefillOptionalboolean
Whether the tab can be prefilled by the create API (false for attachment, auto-generated, and signing tabs such as signature/seal)
NameOptionalstring
Tab name
TemplateRecipientIdOptionalstring
Template role ID the tab belongs to
TemplateDocumentIdOptionalstring
Template document ID
PageNumberOptionalinteger
Page number
RequiredOptionalboolean
Whether required
ValueOptionalstring
Template default value
PropertiesOptionalstring
Type-specific extended properties (optional), a JSON string. The structure varies by TabType, as follows
Sub-properties
attachment
"{\"AttachmentType\":\"image\",\"MaxCount\":3}"| Field | Type | Required | Description |
|---|---|---|---|
AttachmentType | string | No | Attachment type. Only image (signer uploads images) is supported; defaults to image |
MaxCount | integer | No | Maximum number of images uploadable per attachment tab. Range 1-6; omitted or 0 is treated as 1; values above 6 return a parameter error |
text
"{\"FormatType\":\"email\",\"MaxLength\":100}"| Field | Type | Required | Description |
|---|---|---|---|
FormatType | string | No | Input format. text=single-line text (default); email=email; number=number |
MaxLength | integer | No | Maximum length, defaults to 4000 |
multiLineText
"{\"VerticalAlign\":\"top\"}"| Field | Type | Required | Description |
|---|---|---|---|
VerticalAlign | string | No | Vertical alignment of the filled text: top (default) / middle / bottom |
list
"{\"Options\":[\"Option A\",\"Option B\"],\"MultiSelect\":false}"| Field | Type | Required | Description |
|---|---|---|---|
Options | array | Yes | Dropdown options; the option text is the stored value |
MultiSelect | boolean | No | true allows multiple selection; defaults to false (single selection). With multi-select, the value is stored as a JSON array |
Response Example
{
"Response": {
"RequestId": "req-abc123",
"Error": null,
"Data": {
"TemplateId": "TMa1b2c3d4e5f6g7h8i9j0k1l2",
"BasicInfo": {
"EnvelopeTitle": "Service Agreement",
"SigningOrderType": "sequential",
"Expiration": {
"ExpireAfterDays": 30
}
},
"EmailNotification": {
"EmailSubject": "Please sign: {{EnvelopeTitle}}",
"EmailMessage": "Hello, please review and sign the agreement."
},
"Status": "enabled",
"Signers": [
{
"TemplateRecipientId": "TRa1b2c3d4e5",
"RoleName": "Signer 1",
"RecipientType": "signer",
"SigningOrder": 1,
"Authentication": {
"AuthMethods": [
"email"
]
},
"NotificationLanguage": "en-US"
}
],
"Documents": [
{
"TemplateDocumentId": "TDa1b2c3d4e5",
"Name": "agreement.pdf",
"PageCount": 9
}
],
"Tabs": [
{
"TemplateTabId": "TFa1b2c3d4e5",
"TabType": "text",
"TabLabel": "",
"CanPrefill": true,
"Name": "Company Name",
"TemplateRecipientId": "TRa1b2c3d4e5",
"TemplateDocumentId": "TDa1b2c3d4e5",
"PageNumber": 1,
"Required": true,
"Value": ""
}
]
}
}
}Error Codes
| Error Code | Description |
|---|---|
TEMPLATE.NOT_FOUND | Template not found or not in the current space |
INVALID_REQUEST | Invalid request (missing required fields / Description over 1000 characters) |
INTERNAL_ERROR | Internal server error |