GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docspring-ruby/docs/CreateTemplateRequest.md at main · DocSpring/docspring-ruby

Expand file tree

/

CreateTemplateRequest.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
130 lines (124 loc) · 17.1 KB
/

CreateTemplateRequest.md

Copy path

File metadata and controls

130 lines (124 loc) · 17.1 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

DocSpring::CreateTemplateRequest

Properties

Name Type Description Notes
name String The template's name. [optional]
description String Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests. [optional]
template_type TemplateType pdf: fields placed on an uploaded PDF. html: a PDF rendered from HTML and SCSS. docx: a Word document with tags where the data goes, which makes Word documents or PDFs. page_designer: a page design, a PDF laid out in the Page Designer from its layout. It can't be changed after the template is created.
output_format OutputFormat What each submission makes unless its request sets output_formats: docx (a Word document), odt (an OpenDocument file, converted from the Word document) or pdf. A Word template's is chosen when it's created; other templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. [optional]
parent_folder_id String The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions. [optional]
locked Boolean A locked template can't be changed or deleted until it's unlocked (locked can always be changed). [optional]
add_signature_request_submission_id_footers Boolean Print the submission ID in the footer of each page of PDFs signed through signature requests. [optional]
ai_field_naming_language AiFieldNamingLanguage The language AI field setup names fields in: auto uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; english always uses English; form_language uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates. [optional]
allow_additional_properties Boolean Accept submission data with properties that aren't fields of the template. [optional]
allow_skipping_optional_fields Boolean Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The allowSkippingOptionalFields embed option overrides it. [optional]
default_form_mode TemplateFormMode The hosted form that /templates/{template_id}/form shows when its URL has no mode parameter: web (the web form), visual (the visual form, where fields are filled in on the PDF) or dual (both, in tabs). Only PDF templates have a visual form, so other templates accept only web. [optional]
editable_submissions Boolean Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's editable overrides it. [optional]
embed_domains Array<String> The sites that can embed the template's live signature requests and its embedded template editor: a host such as app.example.com, with an optional leading wildcard (*.example.com), port (localhost:3000) or scheme (https://app.example.com; without one, http and https both work), without a path. Each one is stored in lowercase, without a trailing slash. Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and Web Forms JS) aren't restricted. [optional]
embed_edit_allow_settings Boolean Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on). [optional]
embed_edit_allow_versioning Boolean Allow the embedded template editor to publish, restore, compare and delete published versions. [optional]
embed_edit_allow_document_replacement Boolean Allow the embedded template editor to replace the template's PDF. [optional]
encrypt_pdfs Boolean Encrypt generated PDFs with encrypt_pdfs_password. A Word template can only encrypt its PDFs when its output_format is pdf, because Word documents and OpenDocument files can't be password-protected. [optional]
encrypt_pdfs_password String The password that opens encrypted PDFs. It's never returned; has_encrypt_pdfs_password says if it's set. [optional]
expire_submissions Boolean Delete each submission's data and PDF after expire_after expiration_interval. [optional]
expire_after Integer How many expiration_intervals a submission's data and PDF are kept for, when expire_submissions is on. At most 5256000 (10 years in minutes). [optional]
expiration_interval ExpirationInterval The unit of expire_after. [optional]
merge_audit_trail_pdf Boolean Add the audit trail to the end of PDFs signed through signature requests. [optional]
parse_dates_using_template_date_format Boolean Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML or Word template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way. [optional]
public_submissions Boolean Allow anyone with a submission's ID to download its PDF. [optional]
public_web_form Boolean Allow anyone to fill in the template's web form. [optional]
redirect_url String Where the web form sends people after they submit it, instead of showing its success screen. After its ? or #, it can have variables such as {{ data.first_name }}, which the form fills in with what they submitted. [optional]
signature_request_email_attachments SignatureRequestEmailAttachments How DocSpring's completed emails send the signed PDF to your signers and CCs: attachment (attached, or a download link when it's too big to attach) or link (a download link). Null uses your account's rule: a link if your account has signed a BAA, otherwise attached. PDF templates only. A signature request uses the value it had when the request was created. [optional]
signature_request_from_address String The address DocSpring's emails to your signers come from: an address at one of your verified email domains, on the Growth plan or higher. Null sends them from DocSpring's shared address, with "via DocSpring" after the sender name. PDF templates only. [optional]
signature_request_include_signing_token Boolean Puts a signing token in signature_request_signing_url, as {{ token_id }} and {{ token_secret }}, so your page can open the signing form without creating a token itself. The email then carries a credential: anyone who has it can open the form and sign. PDF templates only. [optional]
signature_request_from_name String The sender name on the emails DocSpring sends your signers, as in "Acme via DocSpring". It can't contain an email address, a website or quotes. Null uses your account's name. PDF templates only. [optional]
signature_request_notification_emails Array<String> Who DocSpring tells when a signature request's document is completed or declined, or an email bounces or can't be sent: members of your DocSpring team or addresses at your verified email domains. Empty means your account's owner. A submission's notification_emails replaces them. PDF templates only. [optional]
signature_request_reply_to String Where your signers' replies to DocSpring's emails go: a member of your DocSpring team or an address at one of your verified email domains. Null means your account's owner. A submission's reply_to replaces it. PDF templates only. [optional]
signature_request_signing_url String A page on your own site that the button in DocSpring's email to a signer opens, instead of DocSpring's signing page: an https URL on one of your verified email domains or a subdomain of one, on the Growth plan or higher. It must include {{ signature_request_id }}. Your page authenticates the signer, creates a token for the signature request, and opens the signing form with it. Null links to DocSpring's signing page. PDF templates only. [optional]
success_title String The title of the web form's success screen. When it's null or empty, the screen says "Thanks for filling out" and the template's name. It can have variables such as {{ data.first_name }}. [optional]
success_message String A message under the title of the web form's success screen, as plain text. Line breaks show, and web addresses become links. It can have variables such as {{ data.first_name }}. [optional]
show_fill_again_button Boolean Whether the web form's success screen has a "Fill out again" button, which clears the form so someone can fill it in again. [optional]
slack_webhook_url String A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; has_slack_webhook_url says if it's set. [optional]
defaults TemplateDefaultsInput The default style of the template's fields. Setting it replaces the whole object. [optional]
field_dependencies Array<TemplateFieldDependencyInput> The template's conditional logic rules. Setting them replaces all of the rules. [optional]
predefined_fields Array<PredefinedFieldInput> The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off. [optional]
predefined_fields_sample_data Hash<String, Object> Sample submission data that sets predefined_fields: each value becomes a predefined field, with a type that fits it (string, number, boolean, date, email or url) and required_in_template true. Nested objects and arrays become names with /, such as customer/email. Without predefined_fields in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for. [optional]
html String The HTML of an HTML template, as a Liquid template. Null for other templates. [optional]
scss String The SCSS of an HTML template. [optional]
header_html String The HTML printed at the top of each page of an HTML template. [optional]
footer_html String The HTML printed at the bottom of each page of an HTML template. [optional]
html_engine_options HtmlEngineOptionsInput Null resets the options to their defaults. [optional]
html_escape_data Boolean Whether an HTML template HTML-escapes the values it prints. When true, {{ value }} prints a value as text, so a &lt; or &amp; in it is printed as that character, and `{{ value raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for other templates.
layout Hash<String, Object> A page design's layout: its page setup, its sections and the elements placed in them, in the Page Designer layout format (https://docspring.com/docs/page-designer/layout-format/). Its JSON Schema is at https://docspring.com/schemas/page-designer/layout.v1.json. Null for other templates. Setting it replaces the whole layout, and DocSpring adds a field for each value it reads. Left out when a page design is created, it starts with an empty page. [optional]
cache_id String The template's document, a PDF or a Word document (.docx or .odt): the fields.key of a file you uploaded with the presigned upload (GET /uploads/presign). PDF and Word templates need one of cache_id, document_url and document_base64. To upload the file with the request, use POST /templates/upload. [optional]
document_url String An https:// link to the template's document, instead of cache_id: a PDF template's PDF (up to 100 MB) or a Word template's Word document (.docx or .odt, up to 50 MB). DocSpring downloads it after responding, following redirects to other https:// links: the template's document.state is downloading until then, and converting while an .odt is converted (sync.api hosts wait for both). If it can't be downloaded, the state is download_failed and document.error_message says why. [optional]
document_base64 String The template's document (a PDF, or a Word template's Word document), encoded as base64 (a data: URI works too), instead of cache_id. Line breaks and spaces in it are ignored. Up to 7 MB before it's encoded: send a larger file with cache_id or document_url. [optional]
filename String The file's name, for a cache_id (presigned uploads don't send one) or document_base64. A document_url's is the last part of its path unless you set it. [optional]
detect_fields Boolean Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. field_source, field_naming and field_logic choose how. Default false. document.page_processing_statuses and document.field_logic_status show how it's going, and document.state becomes processed once every page's fields are set up. [optional]
field_source FieldSetupSource With detect_fields, where the fields come from. auto (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; pdf_detection detects the fields from the page layout, even on a fillable PDF; pdf_form_fields only imports the PDF's form fields. [optional]
field_naming FieldSetupNaming With detect_fields, how the fields are named. ai (the default) names them and sets their types and settings with AI; preserve keeps the names of the PDF's form fields, and AI only names the fields it detected. preserve needs field_source auto or pdf_form_fields. [optional]
field_logic FieldSetupLogic With detect_fields, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (ai) or not (none). Default: your account's template settings. [optional]
include_office_use_fields Boolean With detect_fields, whether AI field setup keeps the fields that only the office receiving the form fills in, such as a "For office use only" box (true), or leaves them out (false). Default: your account's template settings. [optional]

Example

require 'docspring'

instance = DocSpring::CreateTemplateRequest.new(
  name: null,
  description: null,
  template_type: null,
  output_format: null,
  parent_folder_id: null,
  locked: null,
  add_signature_request_submission_id_footers: null,
  ai_field_naming_language: null,
  allow_additional_properties: null,
  allow_skipping_optional_fields: null,
  default_form_mode: null,
  editable_submissions: null,
  embed_domains: null,
  embed_edit_allow_settings: null,
  embed_edit_allow_versioning: null,
  embed_edit_allow_document_replacement: null,
  encrypt_pdfs: null,
  encrypt_pdfs_password: null,
  expire_submissions: null,
  expire_after: null,
  expiration_interval: null,
  merge_audit_trail_pdf: null,
  parse_dates_using_template_date_format: null,
  public_submissions: null,
  public_web_form: null,
  redirect_url: null,
  signature_request_email_attachments: null,
  signature_request_from_address: null,
  signature_request_include_signing_token: null,
  signature_request_from_name: null,
  signature_request_notification_emails: null,
  signature_request_reply_to: null,
  signature_request_signing_url: null,
  success_title: null,
  success_message: null,
  show_fill_again_button: null,
  slack_webhook_url: null,
  defaults: null,
  field_dependencies: null,
  predefined_fields: null,
  predefined_fields_sample_data: null,
  html: null,
  scss: null,
  header_html: null,
  footer_html: null,
  html_engine_options: null,
  html_escape_data: null,
  layout: null,
  cache_id: null,
  document_url: null,
  document_base64: null,
  filename: null,
  detect_fields: null,
  field_source: null,
  field_naming: null,
  field_logic: null,
  include_office_use_fields: null
)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.