A reusable template for creating signable instruments. Templates are used to create Envelopes which contain Documents to sign.

interface ITemplate {
    counter: number;
    created_at: string;
    description?: string;
    fields?: ITemplateField[];
    id: string;
    is_personal: boolean;
    is_public: boolean;
    is_sendable: boolean;
    last_used_at: string;
    name: string;
    organization?: IOrganization;
    organization_id: string;
    pages?: IPage[];
    processed?: boolean;
    profile_id: string;
    reminder?: IReminder;
    reminder_id?: string;
    roles?: Templates.Types.IRole[];
    sender: "creator" | "organization_member" | "organization_member_as_creator" | "everyone" | "everyone_as_creator";
    star_counter: number;
    template_document?: ITemplateDocument;
    template_documents?: ITemplateDocument[];
    token?: string;
    updated_at: string;
}

Properties

counter: number

Number of times the template has been used.

created_at: string

Creation date/time.

description?: string

Optional description for the template.

fields?: ITemplateField[]

Fields connected to the template.

id: string

The unique ID of the template.

is_personal: boolean

If true, the template is only visible to the creator. If false, the template will also be visible to the user's organization, if any.

is_public: boolean

If true, the template is visible publicly. Note that this does not necessarily mean it is also visible to the user's organization. It may be desirable to create documents that are public but that do not appear in the organization's shared templates list. To achieve this, set both is_personal and is_public to TRUE.

is_sendable: boolean

If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.)

last_used_at: string

Last-used date/time (when the template was used to create a document).

name: string
organization?: IOrganization

If the template was created within an organization, details about that organization.

organization_id: string

Organization the template lives in.

pages?: IPage[]

Pages attached to the template. Note that this is all of the pages for all document attachments in sequential order. @deprecated. Use document page counts instead, and accessor functions that take page numbers rather than Page objects.

processed?: boolean

If set, the template has been post-processed (rendered server-side for display in Web and Mobile clients).

profile_id: string

The template's owner/creator.

reminder?: IReminder

If reminders are enabled, the reminder configuration.

reminder_id?: string

If set, the template has reminders enabled.

Roles (recipients) attached to the template. (Note that roles are uniquely identified by name rather than ID.)

sender: "creator" | "organization_member" | "organization_member_as_creator" | "everyone" | "everyone_as_creator"

Who may create new documents from the template.

star_counter: number

Number of times the template has been "starred".

template_document?: ITemplateDocument

@deprecated. New code should use template_documents.

template_documents?: ITemplateDocument[]

File attachments for this template.

token?: string

Secret token associated with the document. Note that this field is marked optional because it is only visible to the creator. This token is used in some operations such as creating shareable links to the template.

updated_at: string

Last-update date/time.