<% end %>
diff --git a/config/locales/i18n.yml b/config/locales/i18n.yml
index 38fa4213..d1999566 100644
--- a/config/locales/i18n.yml
+++ b/config/locales/i18n.yml
@@ -22,6 +22,7 @@ en: &en
hi_there: Hi there
thanks: Thanks
private: Private
+ default_parties: Default parties
authenticate_embedded_form_preview_with_token: Authenticate embedded form preview with token
stripe_integration: Stripe Integration
require_all_recipients: Require all recipients
@@ -115,6 +116,11 @@ en: &en
role: Role
reason: Reason
provide_your_email_to_start: Provide your email to start
+ provide_your_email: Provide your email
+ provide_your_name_to_start: Provide your name to start
+ provide_your_name: Provide your name
+ provide_your_phone_in_international_format_to_start: Provide your phone in international format to start
+ provide_your_phone_in_international_format: Provide your phone in international format
start: Start
enforce_recipients_order: Enforce recipients order
starting: Starting
@@ -752,6 +758,11 @@ en: &en
enable_shared_link: Enable shared link
share_link_is_currently_disabled: Share link is currently disabled
select_data_residency: Select data residency
+ account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} has invited you to fill and sign documents online effortlessly with a secure, fast, and user-friendly digital document signing solution.'
+ review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Review or download completed documents. Fill and sign documents online effortlessly with a secure, fast, and user-friendly digital document signing solution.
+ link_form_fields: Link form fields
+ at_least_one_field_must_be_displayed_in_the_form: At least one field must be displayed in the form.
+ this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: This template has multiple parties, which prevents the use of a shared link as it's unclear which party is responsible for specific fields. To resolve this, define the default party details.
submission_sources:
api: API
bulk: Bulk Send
@@ -854,6 +865,7 @@ en: &en
range_without_total: "%{from}-%{to} items"
es: &es
+ default_parties: Partes predeterminadas
authenticate_embedded_form_preview_with_token: Autenticar vista previa del formulario incrustado con token
require_all_recipients: Requerir a todos los destinatarios
stripe_integration: Integración con Stripe
@@ -951,6 +963,11 @@ es: &es
role: Rol
reason: Razón
provide_your_email_to_start: Proporciona tu correo electrónico para comenzar
+ provide_your_email: Proporciona tu correo electrónico
+ provide_your_name_to_start: Proporciona tu nombre para comenzar
+ provide_your_name: Proporciona tu nombre
+ provide_your_phone_in_international_format_to_start: Proporciona tu teléfono en formato internacional para comenzar
+ provide_your_phone_in_international_format: Proporciona tu teléfono en formato internacional
start: Comenzar
starting: Comenzando
form_has_been_deleted_by_html: 'El formulario ha sido eliminado por %{name}.'
@@ -1587,6 +1604,11 @@ es: &es
enable_shared_link: Habilitar enlace compartido
share_link_is_currently_disabled: El enlace compartido está deshabilitado actualmente
select_data_residency: Seleccionar ubicación de datos
+ account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} te ha invitado a completar y firmar documentos en línea fácilmente con una solución de firma digital segura, rápida y fácil de usar.'
+ review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Revisa o descarga los documentos completados. Completa y firma documentos en línea fácilmente con una solución de firma digital segura, rápida y fácil de usar.
+ link_form_fields: Vincular campos del formulario
+ at_least_one_field_must_be_displayed_in_the_form: Al menos un campo debe mostrarse en el formulario.
+ this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Esta plantilla tiene varias partes, lo que impide el uso de un enlace compartido porque no está claro qué parte es responsable de campos específicos. Para resolverlo, define los detalles predeterminados de la parte.
submission_sources:
api: API
bulk: Envío masivo
@@ -1689,6 +1711,7 @@ es: &es
range_without_total: "%{from}-%{to} elementos"
it: &it
+ default_parties: Parti predefiniti
authenticate_embedded_form_preview_with_token: "Autentica l'anteprima del modulo incorporato con il token"
require_all_recipients: Richiedi tutti i destinatari
stripe_integration: Integrazione Stripe
@@ -1785,6 +1808,11 @@ it: &it
role: Ruolo
reason: Ragione
provide_your_email_to_start: Fornisci la tua email per iniziare
+ provide_your_email: Fornisci la tua email
+ provide_your_name_to_start: Fornisci il tuo nome per iniziare
+ provide_your_name: Fornisci il tuo nome
+ provide_your_phone_in_international_format_to_start: Fornisci il tuo telefono in formato internazionale per iniziare
+ provide_your_phone_in_international_format: Fornisci il tuo telefono in formato internazionale
start: Inizia
starting: Iniziando
form_has_been_deleted_by_html: 'Il modulo è stato eliminato da %{name}.'
@@ -2420,6 +2448,11 @@ it: &it
enable_shared_link: Abilita link condiviso
share_link_is_currently_disabled: Il link condiviso è attualmente disabilitato
select_data_residency: Seleziona la residenza dei dati
+ account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} ti ha invitato a compilare e firmare documenti online con facilità utilizzando una soluzione di firma digitale sicura, veloce e facile da usare.'
+ review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Rivedi o scarica i documenti completati. Compila e firma documenti online facilmente con una soluzione di firma digitale sicura, veloce e facile da usare.
+ link_form_fields: Collega i campi del modulo
+ at_least_one_field_must_be_displayed_in_the_form: Almeno un campo deve essere visualizzato nel modulo.
+ this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Questo modello ha più parti, il che impedisce l’uso di un link di condivisione perché non è chiaro quale parte sia responsabile di campi specifici. Per risolvere, definisci i dettagli predefiniti della parte.
submission_sources:
api: API
bulk: Invio massivo
@@ -2522,6 +2555,7 @@ it: &it
range_without_total: "%{from}-%{to} elementi"
fr: &fr
+ default_parties: Parties par défaut
authenticate_embedded_form_preview_with_token: Authentifier l’aperçu du formulaire intégré avec un jeton
require_all_recipients: Exiger tous les destinataires
stripe_integration: Intégration Stripe
@@ -2618,7 +2652,12 @@ fr: &fr
digitally_signed_by: Signé numériquement par
role: Rôle
reason: Raison
- provide_your_email_to_start: Entrez votre adresse email pour commencer
+ provide_your_email_to_start: Fournissez votre e-mail pour commencer
+ provide_your_email: Fournissez votre e-mail
+ provide_your_name_to_start: Fournissez votre nom pour commencer
+ provide_your_name: Fournissez votre nom
+ provide_your_phone_in_international_format_to_start: Fournissez votre téléphone au format international pour commencer
+ provide_your_phone_in_international_format: Fournissez votre téléphone au format international
start: Démarrer
starting: Démarrage
form_has_been_deleted_by_html: 'Le formulaire a été supprimé par %{name}.'
@@ -3256,6 +3295,11 @@ fr: &fr
enable_shared_link: Activer le lien de partage
share_link_is_currently_disabled: Le lien de partage est actuellement désactivé
select_data_residency: Sélectionner la résidence des données
+ account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} vous a invité à remplir et signer des documents en ligne facilement avec une solution de signature numérique sécurisée, rapide et conviviale.'
+ review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Consultez ou téléchargez les documents complétés. Remplissez et signez des documents en ligne facilement avec une solution de signature numérique sécurisée, rapide et conviviale.
+ link_form_fields: Lier les champs du formulaire
+ at_least_one_field_must_be_displayed_in_the_form: Au moins un champ doit être affiché dans le formulaire.
+ this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Ce modèle contient plusieurs parties, ce qui empêche l’utilisation d’un lien de partage car il n’est pas clair quelle partie est responsable de certains champs. Pour résoudre cela, définissez les détails de la partie par défaut.
submission_sources:
api: API
bulk: Envoi en masse
@@ -3358,6 +3402,7 @@ fr: &fr
range_without_total: "%{from} à %{to} éléments"
pt: &pt
+ default_parties: Partes padrão
authenticate_embedded_form_preview_with_token: Autenticar visualização incorporada do formulário com token
require_all_recipients: Exigir todos os destinatários
stripe_integration: Integração com Stripe
@@ -3454,7 +3499,12 @@ pt: &pt
digitally_signed_by: Assinado digitalmente por
role: Função
reason: Motivo
- provide_your_email_to_start: Forneça o seu email para começar
+ provide_your_email_to_start: Informe seu e-mail para começar
+ provide_your_email: Informe seu e-mail
+ provide_your_name_to_start: Informe seu nome para começar
+ provide_your_name: Informe seu nome
+ provide_your_phone_in_international_format_to_start: Informe seu telefone no formato internacional para começar
+ provide_your_phone_in_international_format: Informe seu telefone no formato internacional
start: Iniciar
starting: Iniciando
form_has_been_deleted_by_html: 'O formulário foi eliminado por %{name}.'
@@ -4091,6 +4141,11 @@ pt: &pt
enable_shared_link: Ativar link compartilhado
share_link_is_currently_disabled: O link compartilhado está desativado no momento
select_data_residency: Selecionar local dos dados
+ account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} convidou você para preencher e assinar documentos online com facilidade usando uma solução de assinatura digital segura, rápida e fácil de usar.'
+ review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Reveja ou baixe os documentos concluídos. Preencha e assine documentos online com facilidade usando uma solução de assinatura digital segura, rápida e fácil de usar.
+ link_form_fields: Vincular campos do formulário
+ at_least_one_field_must_be_displayed_in_the_form: Pelo menos um campo deve ser exibido no formulário.
+ this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Este modelo tem várias partes, o que impede o uso de um link de compartilhamento, pois não está claro qual parte é responsável por campos específicos. Para resolver isso, defina os detalhes padrão da parte.
submission_sources:
api: API
bulk: Envio em massa
@@ -4194,6 +4249,7 @@ pt: &pt
range_without_total: "%{from}-%{to} itens"
de: &de
+ default_parties: Standardparteien
authenticate_embedded_form_preview_with_token: Authentifizieren Sie die eingebettete Formularvorschau mit Token
require_all_recipients: Alle Empfänger erforderlich
stripe_integration: Stripe-Integration
@@ -4290,7 +4346,12 @@ de: &de
digitally_signed_by: Digital signiert von
role: Rolle
reason: Grund
- provide_your_email_to_start: Gib deine E-Mail-Adresse ein, um zu starten
+ provide_your_email_to_start: Geben Sie Ihre E-Mail-Adresse ein, um zu starten
+ provide_your_email: Geben Sie Ihre E-Mail-Adresse ein
+ provide_your_name_to_start: Geben Sie Ihren Namen ein, um zu starten
+ provide_your_name: Geben Sie Ihren Namen ein
+ provide_your_phone_in_international_format_to_start: Geben Sie Ihre Telefonnummer im internationalen Format ein, um zu starten
+ provide_your_phone_in_international_format: Geben Sie Ihre Telefonnummer im internationalen Format ein
start: Starten
starting: Starten
form_has_been_deleted_by_html: 'Das Formular wurde von %{name} gelöscht.'
@@ -4927,6 +4988,11 @@ de: &de
enable_shared_link: 'Freigabelink aktivieren'
share_link_is_currently_disabled: 'Freigabelink ist derzeit deaktiviert'
select_data_residency: Datenstandort auswählen
+ account_name_has_invited_you_to_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: '%{account_name} hat Sie eingeladen, Dokumente mühelos online mit einer sicheren, schnellen und benutzerfreundlichen digitalen Signaturlösung auszufüllen und zu unterschreiben.'
+ review_or_download_completed_documents_fill_and_sign_documents_online_effortlessly_with_a_secure_fast_and_user_friendly_digital_document_signing_solution: Überprüfen oder laden Sie abgeschlossene Dokumente herunter. Füllen und unterschreiben Sie Dokumente mühelos online mit einer sicheren, schnellen und benutzerfreundlichen digitalen Signaturlösung.
+ link_form_fields: Formularfelder verknüpfen
+ at_least_one_field_must_be_displayed_in_the_form: Mindestens ein Feld muss im Formular angezeigt werden.
+ this_template_has_multiple_parties_which_prevents_the_use_of_a_sharing_link: Diese Vorlage enthält mehrere Parteien, was die Verwendung eines Freigabelinks verhindert, da unklar ist, welche Partei für bestimmte Felder verantwortlich ist. Um dies zu beheben, definieren Sie die Standardparteidetails.
submission_sources:
api: API
bulk: Massenversand
@@ -5051,7 +5117,13 @@ pl:
digitally_signed_by: Podpis cyfrowy przez
form_expired_at_html: 'Formularz wygasł o %{time}'
role: Rola
- provide_your_email_to_start: Podaj swój adres email, aby rozpocząć
+ provide_your_email_to_start: Podaj swój e-mail, aby rozpocząć
+ provide_your_email: Podaj swój e-mail
+ provide_your_name_to_start: Podaj swoje imię, aby rozpocząć
+ provide_your_name: Podaj swoje imię
+ provide_your_phone_in_international_format_to_start: Podaj numer telefonu w formacie międzynarodowym, aby rozpocząć
+ provide_your_phone_in_international_format: Podaj numer telefonu w formacie międzynarodowym
+ use_international_format_1xxx_: 'Użyj formatu międzynarodowego: +1xxx...'
start: Rozpocznij
reason: Powód
starting: Rozpoczynanie
@@ -5124,7 +5196,13 @@ uk:
digitally_signed_by: Цифровий підпис від
verification_code_code: 'Код підтвердження: %{code}'
role: Роль
- provide_your_email_to_start: Введіть свій email, щоб почати
+ provide_your_email_to_start: Введіть свій емейл, щоб почати
+ provide_your_email: Введіть свій емейл
+ provide_your_name_to_start: Введіть своє ім’я, щоб почати
+ provide_your_name: Введіть своє ім’я
+ provide_your_phone_in_international_format_to_start: Введіть номер телефону у міжнародному форматі, щоб почати
+ provide_your_phone_in_international_format: Введіть номер телефону у міжнародному форматі
+ use_international_format_1xxx_: 'Використовуйте міжнародний формат: +1xxx...'
form_expired_at_html: 'Строк подачі завершився о %{time}'
start: Почати
reason: Причина
@@ -5198,7 +5276,13 @@ cs:
digitally_signed_by: Digitálně podepsáno uživatelem
verification_code_code: 'Ověřovací kód: %{code}'
role: Role
- provide_your_email_to_start: Zadejte svůj email pro zahájení
+ provide_your_email_to_start: Zadejte svůj e-mail pro zahájení
+ provide_your_email: Zadejte svůj e-mail
+ provide_your_name_to_start: Zadejte své jméno pro zahájení
+ provide_your_name: Zadejte své jméno
+ provide_your_phone_in_international_format_to_start: Zadejte své telefonní číslo v mezinárodním formátu pro zahájení
+ provide_your_phone_in_international_format: Zadejte své telefonní číslo v mezinárodním formátu
+ use_international_format_1xxx_: 'Použijte mezinárodní formát: +1xxx...'
reason: Důvod
form_expired_at_html: 'Formulář vypršel %{time}'
start: Zahájit
@@ -5273,7 +5357,13 @@ he:
role: תפקיד
reason: סיבה
verification_code_code: 'קוד אימות: %{code}'
- provide_your_email_to_start: ספק את כתובת הדוא"ל שלך כדי להתחיל
+ provide_your_email_to_start: הזן את האימייל שלך כדי להתחיל
+ provide_your_email: הזן את האימייל שלך
+ provide_your_name_to_start: הזן את שמך כדי להתחיל
+ provide_your_name: הזן את שמך
+ provide_your_phone_in_international_format_to_start: הזן את מספר הטלפון שלך בפורמט בינלאומי כדי להתחיל
+ provide_your_phone_in_international_format: הזן את מספר הטלפון שלך בפורמט בינלאומי
+ use_international_format_1xxx_: 'השתמש בפורמט בינלאומי: +1xxx...'
start: התחל
starting: מתחיל
form_expired_at_html: 'הטופס פג תוקף ב- %{time}'
@@ -5346,7 +5436,13 @@ nl:
digitally_signed_by: Digitaal ondertekend door
role: Rol
verification_code_code: 'Verificatiecode: %{code}'
- provide_your_email_to_start: Geef uw e-mailadres om te beginnen
+ provide_your_email_to_start: Voer je e-mailadres in om te beginnen
+ provide_your_email: Voer je e-mailadres in
+ provide_your_name_to_start: Voer je naam in om te beginnen
+ provide_your_name: Voer je naam in
+ provide_your_phone_in_international_format_to_start: Voer je telefoonnummer in internationaal formaat in om te beginnen
+ provide_your_phone_in_international_format: Voer je telefoonnummer in internationaal formaat in
+ use_international_format_1xxx_: 'Gebruik het internationale formaat: +1xxx...'
start: Start
reason: Reden
form_expired_at_html: 'Formulier is verlopen op %{time}'
@@ -5419,7 +5515,13 @@ ar:
email: البريد الإلكتروني
digitally_signed_by: تم التوقيع الرقمي بواسطة
role: الدور
- provide_your_email_to_start: قدم بريدك الإلكتروني للبدء
+ provide_your_email_to_start: أدخل بريدك الإلكتروني للبدء
+ provide_your_email: أدخل بريدك الإلكتروني
+ provide_your_name_to_start: أدخل اسمك للبدء
+ provide_your_name: أدخل اسمك
+ provide_your_phone_in_international_format_to_start: أدخل رقم هاتفك بصيغة دولية للبدء
+ provide_your_phone_in_international_format: أدخل رقم هاتفك بصيغة دولية
+ use_international_format_1xxx_: 'استخدم التنسيق الدولي: +1xxx...'
start: بدء
starting: بداية
verification_code_code: 'رمز التحقق: %{code}'
@@ -5493,7 +5595,13 @@ ko:
email: 이메일
digitally_signed_by: 디지털로 서명됨
role: 역할
- provide_your_email_to_start: 시작하려면 이메일을 제공하세요
+ provide_your_email_to_start: 시작하려면 이메일을 입력하세요
+ provide_your_email: 이메일을 입력하세요
+ provide_your_name_to_start: 시작하려면 이름을 입력하세요
+ provide_your_name: 이름을 입력하세요
+ provide_your_phone_in_international_format_to_start: 시작하려면 국제 형식의 전화번호를 입력하세요
+ provide_your_phone_in_international_format: 국제 형식의 전화번호를 입력하세요
+ use_international_format_1xxx_: '국제 형식을 사용하세요: +1xxx...'
start: 시작
reason: 이유
starting: 시작 중
@@ -5568,6 +5676,12 @@ ja:
digitally_signed_by: 電子署名者
role: 役割
provide_your_email_to_start: 開始するにはメールアドレスを入力してください
+ provide_your_email: メールアドレスを入力してください
+ provide_your_name_to_start: 開始するには名前を入力してください
+ provide_your_name: 名前を入力してください
+ provide_your_phone_in_international_format_to_start: 開始するには国際形式の電話番号を入力してください
+ provide_your_phone_in_international_format: 国際形式の電話番号を入力してください
+ use_international_format_1xxx_: '国際形式を使用してください:+1xxx...'
start: 開始
reason: 理由
starting: 開始中
diff --git a/docs/api/csharp.md b/docs/api/csharp.md
index b0b68b36..8df5aeb5 100644
--- a/docs/api/csharp.md
+++ b/docs/api/csharp.md
@@ -1573,6 +1573,11 @@ var response = client.Execute(request);
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1654,6 +1659,11 @@ var response = client.Execute(request);
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2217,6 +2227,11 @@ var response = client.Execute(request);
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2236,3 +2251,1191 @@ var response = client.Execute(request);
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```csharp
+var client = new RestClient("https://api.docuseal.com/submissions/pdf");
+var request = new RestRequest("", Method.Post);
+request.AddHeader("X-Auth-Token", "API_KEY");
+request.AddHeader("content-type", "application/json");
+request.AddParameter("application/json", "{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}", ParameterType.RequestBody);
+var response = client.Execute(request);
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```csharp
+var client = new RestClient("https://api.docuseal.com/submissions/html");
+var request = new RestRequest("", Method.Post);
+request.AddHeader("X-Auth-Token", "API_KEY");
+request.AddHeader("content-type", "application/json");
+request.AddParameter("application/json", "{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"Test Document\",\"html\":\"
Lorem Ipsum is simply dummy text of the\\n\\n\\nand typesetting industry
\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}", ParameterType.RequestBody);
+var response = client.Execute(request);
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```csharp
+var client = new RestClient("https://api.docuseal.com/templates/pdf");
+var request = new RestRequest("", Method.Post);
+request.AddHeader("X-Auth-Token", "API_KEY");
+request.AddHeader("content-type", "application/json");
+request.AddParameter("application/json", "{\"name\":\"Test PDF\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}]}", ParameterType.RequestBody);
+var response = client.Execute(request);
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/go.md b/docs/api/go.md
index 09d65608..83db964f 100644
--- a/docs/api/go.md
+++ b/docs/api/go.md
@@ -1923,6 +1923,11 @@ func main() {
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -2027,6 +2032,11 @@ func main() {
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2636,6 +2646,11 @@ func main() {
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2655,3 +2670,1260 @@ func main() {
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```go
+package main
+
+import (
+ "fmt"
+ "strings"
+ "net/http"
+ "io"
+)
+
+func main() {
+
+ url := "https://api.docuseal.com/submissions/pdf"
+
+ payload := strings.NewReader("{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
+
+ req, _ := http.NewRequest("POST", url, payload)
+
+ req.Header.Add("X-Auth-Token", "API_KEY")
+ req.Header.Add("content-type", "application/json")
+
+ res, _ := http.DefaultClient.Do(req)
+
+ defer res.Body.Close()
+ body, _ := io.ReadAll(res.Body)
+
+ fmt.Println(res)
+ fmt.Println(string(body))
+
+}
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```go
+package main
+
+import (
+ "fmt"
+ "strings"
+ "net/http"
+ "io"
+)
+
+func main() {
+
+ url := "https://api.docuseal.com/submissions/html"
+
+ payload := strings.NewReader("{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"Test Document\",\"html\":\"
Lorem Ipsum is simply dummy text of the\\n\\n\\nand typesetting industry
\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
+
+ req, _ := http.NewRequest("POST", url, payload)
+
+ req.Header.Add("X-Auth-Token", "API_KEY")
+ req.Header.Add("content-type", "application/json")
+
+ res, _ := http.DefaultClient.Do(req)
+
+ defer res.Body.Close()
+ body, _ := io.ReadAll(res.Body)
+
+ fmt.Println(res)
+ fmt.Println(string(body))
+
+}
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```go
+package main
+
+import (
+ "fmt"
+ "strings"
+ "net/http"
+ "io"
+)
+
+func main() {
+
+ url := "https://api.docuseal.com/templates/pdf"
+
+ payload := strings.NewReader("{\"name\":\"Test PDF\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}]}")
+
+ req, _ := http.NewRequest("POST", url, payload)
+
+ req.Header.Add("X-Auth-Token", "API_KEY")
+ req.Header.Add("content-type", "application/json")
+
+ res, _ := http.DefaultClient.Do(req)
+
+ defer res.Body.Close()
+ body, _ := io.ReadAll(res.Body)
+
+ fmt.Println(res)
+ fmt.Println(string(body))
+
+}
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/java.md b/docs/api/java.md
index 5a1adb66..ca3df371 100644
--- a/docs/api/java.md
+++ b/docs/api/java.md
@@ -1557,6 +1557,11 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1637,6 +1642,11 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2198,6 +2208,11 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2217,3 +2232,1188 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```java
+HttpResponse response = Unirest.post("https://api.docuseal.com/submissions/pdf")
+ .header("X-Auth-Token", "API_KEY")
+ .header("content-type", "application/json")
+ .body("{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
+ .asString();
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```java
+HttpResponse response = Unirest.post("https://api.docuseal.com/submissions/html")
+ .header("X-Auth-Token", "API_KEY")
+ .header("content-type", "application/json")
+ .body("{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"Test Document\",\"html\":\"
Lorem Ipsum is simply dummy text of the\\n\\n\\nand typesetting industry
\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
+ .asString();
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```java
+HttpResponse response = Unirest.post("https://api.docuseal.com/templates/pdf")
+ .header("X-Auth-Token", "API_KEY")
+ .header("content-type", "application/json")
+ .body("{\"name\":\"Test PDF\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}]}")
+ .asString();
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/javascript.md b/docs/api/javascript.md
index ab7b5518..0fea7231 100644
--- a/docs/api/javascript.md
+++ b/docs/api/javascript.md
@@ -1617,6 +1617,11 @@ and typesetting industry
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1705,6 +1710,11 @@ const template = await docuseal.createTemplateFromDocx({
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2294,6 +2304,11 @@ const template = await docuseal.mergeTemplates({
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2313,3 +2328,1260 @@ const template = await docuseal.mergeTemplates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```javascript
+const docuseal = require("@docuseal/api");
+
+docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
+
+const submission = await docuseal.createSubmissionFromPdf({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+});
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```javascript
+const docuseal = require("@docuseal/api");
+
+docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
+
+const submission = await docuseal.createSubmissionFromHtml({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "Test Document",
+ html: `
Lorem Ipsum is simply dummy text of the
+
+
+and typesetting industry
+`
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+});
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```javascript
+const docuseal = require("@docuseal/api");
+
+docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
+
+const template = await docuseal.createTemplateFromPdf({
+ name: "Test PDF",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ]
+});
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/nodejs.md b/docs/api/nodejs.md
index 5e052f72..3b099a3a 100644
--- a/docs/api/nodejs.md
+++ b/docs/api/nodejs.md
@@ -1704,6 +1704,11 @@ const template = await resp.json();
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1798,6 +1803,11 @@ const template = await resp.json();
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2399,6 +2409,11 @@ const template = await resp.json();
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2418,3 +2433,1278 @@ const template = await resp.json();
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```nodejs
+const fetch = require("node-fetch");
+
+const resp = await fetch("https://api.docuseal.com/submissions/pdf", {
+ method: "POST",
+ headers: {
+ "X-Auth-Token": "API_KEY"
+ },
+ body: JSON.stringify({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+ })
+});
+
+const submission = await resp.json();
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```nodejs
+const fetch = require("node-fetch");
+
+const resp = await fetch("https://api.docuseal.com/submissions/html", {
+ method: "POST",
+ headers: {
+ "X-Auth-Token": "API_KEY"
+ },
+ body: JSON.stringify({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "Test Document",
+ html: `
Lorem Ipsum is simply dummy text of the
+
+
+and typesetting industry
+`
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+ })
+});
+
+const submission = await resp.json();
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```nodejs
+const fetch = require("node-fetch");
+
+const resp = await fetch("https://api.docuseal.com/templates/pdf", {
+ method: "POST",
+ headers: {
+ "X-Auth-Token": "API_KEY"
+ },
+ body: JSON.stringify({
+ name: "Test PDF",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ })
+});
+
+const template = await resp.json();
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/php.md b/docs/api/php.md
index e6911f02..ff02eb85 100644
--- a/docs/api/php.md
+++ b/docs/api/php.md
@@ -1585,6 +1585,11 @@ and typesetting industry
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1671,6 +1676,11 @@ $docuseal->createTemplateFromDocx([
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2256,6 +2266,11 @@ $docuseal->mergeTemplates([
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2275,3 +2290,1254 @@ $docuseal->mergeTemplates([
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```php
+$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
+
+$docuseal->createSubmissionFromPdf([
+ 'name' => 'Test Submission Document',
+ 'documents' => [
+ [
+ 'name' => 'string',
+ 'file' => 'base64',
+ 'fields' => [
+ [
+ 'name' => 'string',
+ 'areas' => [
+ [
+ 'x' => 0,
+ 'y' => 0,
+ 'w' => 0,
+ 'h' => 0,
+ 'page' => 1
+ ]
+ ]
+ ]
+ ]
+ ]
+ ],
+ 'submitters' => [
+ [
+ 'role' => 'First Party',
+ 'email' => 'john.doe@example.com'
+ ]
+ ]
+]);
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```php
+$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
+
+$docuseal->createSubmissionFromHtml([
+ 'name' => 'Test Submission Document',
+ 'documents' => [
+ [
+ 'name' => 'Test Document',
+ 'html' => '
Lorem Ipsum is simply dummy text of the
+
+
+and typesetting industry
+'
+ ]
+ ],
+ 'submitters' => [
+ [
+ 'role' => 'First Party',
+ 'email' => 'john.doe@example.com'
+ ]
+ ]
+]);
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```php
+$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
+
+$docuseal->createTemplateFromPdf([
+ 'name' => 'Test PDF',
+ 'documents' => [
+ [
+ 'name' => 'string',
+ 'file' => 'base64',
+ 'fields' => [
+ [
+ 'name' => 'string',
+ 'areas' => [
+ [
+ 'x' => 0,
+ 'y' => 0,
+ 'w' => 0,
+ 'h' => 0,
+ 'page' => 1
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+]);
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/python.md b/docs/api/python.md
index f0060e3f..50edcd4e 100644
--- a/docs/api/python.md
+++ b/docs/api/python.md
@@ -1633,6 +1633,11 @@ and typesetting industry
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1722,6 +1727,11 @@ docuseal.create_template_from_docx({
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2313,6 +2323,11 @@ docuseal.merge_templates({
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2332,3 +2347,1263 @@ docuseal.merge_templates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```python
+from docuseal import docuseal
+
+docuseal.key = "API_KEY"
+docuseal.url = "https://api.docuseal.com"
+
+docuseal.create_submission_from_pdf({
+ "name": "Test Submission Document",
+ "documents": [
+ {
+ "name": "string",
+ "file": "base64",
+ "fields": [
+ {
+ "name": "string",
+ "areas": [
+ {
+ "x": 0,
+ "y": 0,
+ "w": 0,
+ "h": 0,
+ "page": 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "submitters": [
+ {
+ "role": "First Party",
+ "email": "john.doe@example.com"
+ }
+ ]
+})
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```python
+from docuseal import docuseal
+
+docuseal.key = "API_KEY"
+docuseal.url = "https://api.docuseal.com"
+
+docuseal.create_submission_from_html({
+ "name": "Test Submission Document",
+ "documents": [
+ {
+ "name": "Test Document",
+ "html": """
Lorem Ipsum is simply dummy text of the
+
+
+and typesetting industry
+"""
+ }
+ ],
+ "submitters": [
+ {
+ "role": "First Party",
+ "email": "john.doe@example.com"
+ }
+ ]
+})
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```python
+from docuseal import docuseal
+
+docuseal.key = "API_KEY"
+docuseal.url = "https://api.docuseal.com"
+
+docuseal.create_template_from_pdf({
+ "name": "Test PDF",
+ "documents": [
+ {
+ "name": "string",
+ "file": "base64",
+ "fields": [
+ {
+ "name": "string",
+ "areas": [
+ {
+ "x": 0,
+ "y": 0,
+ "w": 0,
+ "h": 0,
+ "page": 1
+ }
+ ]
+ }
+ ]
+ }
+ ]
+})
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/ruby.md b/docs/api/ruby.md
index e0f21818..cf2cd9fe 100644
--- a/docs/api/ruby.md
+++ b/docs/api/ruby.md
@@ -1633,6 +1633,11 @@ and typesetting industry
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1722,6 +1727,11 @@ Docuseal.create_template_from_docx({
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2313,6 +2323,11 @@ Docuseal.merge_templates({
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2332,3 +2347,1263 @@ Docuseal.merge_templates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```ruby
+require "docuseal"
+
+Docuseal.key = ENV["DOCUSEAL_API_KEY"]
+Docuseal.url = "https://api.docuseal.com"
+
+Docuseal.create_submission_from_pdf({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+})
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```ruby
+require "docuseal"
+
+Docuseal.key = ENV["DOCUSEAL_API_KEY"]
+Docuseal.url = "https://api.docuseal.com"
+
+Docuseal.create_submission_from_html({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "Test Document",
+ html: "
Lorem Ipsum is simply dummy text of the
+
+
+and typesetting industry
+"
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+})
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```ruby
+require "docuseal"
+
+Docuseal.key = ENV["DOCUSEAL_API_KEY"]
+Docuseal.url = "https://api.docuseal.com"
+
+Docuseal.create_template_from_pdf({
+ name: "Test PDF",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ]
+})
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/shell.md b/docs/api/shell.md
index ec286be1..02016519 100644
--- a/docs/api/shell.md
+++ b/docs/api/shell.md
@@ -1557,6 +1557,11 @@ curl --request POST \
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1637,6 +1642,11 @@ curl --request POST \
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2198,6 +2208,11 @@ curl --request POST \
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2217,3 +2232,1188 @@ curl --request POST \
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```shell
+curl --request POST \
+ --url https://api.docuseal.com/submissions/pdf \
+ --header 'X-Auth-Token: API_KEY' \
+ --header 'content-type: application/json' \
+ --data '{"name":"Test Submission Document","documents":[{"name":"string","file":"base64","fields":[{"name":"string","areas":[{"x":0,"y":0,"w":0,"h":0,"page":1}]}]}],"submitters":[{"role":"First Party","email":"john.doe@example.com"}]}'
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```shell
+curl --request POST \
+ --url https://api.docuseal.com/submissions/html \
+ --header 'X-Auth-Token: API_KEY' \
+ --header 'content-type: application/json' \
+ --data '{"name":"Test Submission Document","documents":[{"name":"Test Document","html":"
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"}],"submitters":[{"role":"First Party","email":"john.doe@example.com"}]}'
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```shell
+curl --request POST \
+ --url https://api.docuseal.com/templates/pdf \
+ --header 'X-Auth-Token: API_KEY' \
+ --header 'content-type: application/json' \
+ --data '{"name":"Test PDF","documents":[{"name":"string","file":"base64","fields":[{"name":"string","areas":[{"x":0,"y":0,"w":0,"h":0,"page":1}]}]}]}'
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/typescript.md b/docs/api/typescript.md
index 9ee334ce..d2bd2a7e 100644
--- a/docs/api/typescript.md
+++ b/docs/api/typescript.md
@@ -1617,6 +1617,11 @@ and typesetting industry
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -1705,6 +1710,11 @@ const template = await docuseal.createTemplateFromDocx({
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -2294,6 +2304,11 @@ const template = await docuseal.mergeTemplates({
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -2313,3 +2328,1260 @@ const template = await docuseal.mergeTemplates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```typescript
+import docuseal from "@docuseal/api";
+
+docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
+
+const submission = await docuseal.createSubmissionFromPdf({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+});
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a submission from HTML
+
+This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML
+
+```typescript
+import docuseal from "@docuseal/api";
+
+docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
+
+const submission = await docuseal.createSubmissionFromHtml({
+ name: "Test Submission Document",
+ documents: [
+ {
+ name: "Test Document",
+ html: `
Lorem Ipsum is simply dummy text of the
+
+
+and typesetting industry
+`
+ }
+ ],
+ submitters: [
+ {
+ role: "First Party",
+ email: "john.doe@example.com"
+ }
+ ]
+});
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### Create a template from PDF
+
+The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form
+
+
+```typescript
+import docuseal from "@docuseal/api";
+
+docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
+
+const template = await docuseal.createTemplateFromPdf({
+ name: "Test PDF",
+ documents: [
+ {
+ name: "string",
+ file: "base64",
+ fields: [
+ {
+ name: "string",
+ areas: [
+ {
+ x: 0,
+ y: 0,
+ w: 0,
+ h: 0,
+ page: 1
+ }
+ ]
+ }
+ ]
+ }
+ ]
+});
+```
+
+```json
+{
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Templates"
+ ],
+ "summary": "Create a template from PDF",
+ "operationId": "createTemplateFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the template",
+ "example": "Test PDF"
+ },
+ "folder_name": {
+ "type": "string",
+ "description": "The folder's name to which the template should be created."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
+ "example": "unique-key"
+ },
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/embedding/form-builder-angular.md b/docs/embedding/form-builder-angular.md
index 61346f60..89eb9c65 100644
--- a/docs/embedding/form-builder-angular.md
+++ b/docs/embedding/form-builder-angular.md
@@ -132,7 +132,27 @@ const token = jwt.sign({
"fieldTypes": {
"type": "array",
"required": false,
- "description": "Field type names to be used in the form builder. All field types are used by default."
+ "description": "Field type names to be used in the form builder. All field types are used by default.",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"drawFieldType": {
"type": "string",
diff --git a/docs/embedding/form-builder-javascript.md b/docs/embedding/form-builder-javascript.md
index ecd795b1..64cb8eaf 100644
--- a/docs/embedding/form-builder-javascript.md
+++ b/docs/embedding/form-builder-javascript.md
@@ -317,7 +317,27 @@
"type": "string",
"required": false,
"description": "Comma separated field type names to be used in the form builder. All field types are used by default.",
- "example": "text,date"
+ "example": "text,date",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"data-draw-field-type": {
"type": "string",
diff --git a/docs/embedding/form-builder-react.md b/docs/embedding/form-builder-react.md
index 21bf8efc..e38a146a 100644
--- a/docs/embedding/form-builder-react.md
+++ b/docs/embedding/form-builder-react.md
@@ -123,7 +123,27 @@ const token = jwt.sign({
"fieldTypes": {
"type": "array",
"required": false,
- "description": "Field type names to be used in the form builder. All field types are used by default."
+ "description": "Field type names to be used in the form builder. All field types are used by default.",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"drawFieldType": {
"type": "string",
diff --git a/docs/embedding/form-builder-vue.md b/docs/embedding/form-builder-vue.md
index a7194c4e..698360aa 100644
--- a/docs/embedding/form-builder-vue.md
+++ b/docs/embedding/form-builder-vue.md
@@ -144,7 +144,27 @@ const token = jwt.sign({
"field-types": {
"type": "array",
"required": false,
- "description": "Field type names to be used in the form builder. All field types are used by default."
+ "description": "Field type names to be used in the form builder. All field types are used by default.",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"draw-field-type": {
"type": "string",
diff --git a/docs/embedding/signing-form-angular.md b/docs/embedding/signing-form-angular.md
index 63a5a434..8bbad1a0 100644
--- a/docs/embedding/signing-form-angular.md
+++ b/docs/embedding/signing-form-angular.md
@@ -48,6 +48,41 @@ export class AppComponent {}
"description": "The role name or title of the signer.",
"example": "First Party"
},
+ "token": {
+ "type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
+ "required": false,
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
+ },
"expand": {
"type": "boolean",
"required": false,
@@ -66,11 +101,6 @@ export class AppComponent {}
"default": false,
"description": "Order form fields based on their position on the pages."
},
- "externalId": {
- "type": "string",
- "required": false,
- "description": "Your application-specific unique string key to identify signer within your app."
- },
"logo": {
"type": "string",
"required": false,
@@ -87,12 +117,6 @@ export class AppComponent {}
"default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See submission_form/i18n.js for available i18n keys."
},
- "preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"goToLast": {
"type": "boolean",
"required": false,
@@ -242,6 +266,11 @@ export class AppComponent {}
"description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
},
+ "externalId": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
"metadata": {
"type": "object",
"required": false,
diff --git a/docs/embedding/signing-form-javascript.md b/docs/embedding/signing-form-javascript.md
index 05d375aa..9674bb35 100644
--- a/docs/embedding/signing-form-javascript.md
+++ b/docs/embedding/signing-form-javascript.md
@@ -42,6 +42,41 @@
"description": "The role name or title of the signer.",
"example": "First Party"
},
+ "data-token": {
+ "type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
+ "required": false,
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "data-preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
+ },
"data-expand": {
"type": "boolean",
"required": false,
@@ -60,12 +95,6 @@
"default": false,
"description": "Order form fields based on their position on the pages."
},
- "data-preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"data-logo": {
"type": "string",
"required": false,
diff --git a/docs/embedding/signing-form-react.md b/docs/embedding/signing-form-react.md
index 8c0c1f9b..91039bbf 100644
--- a/docs/embedding/signing-form-react.md
+++ b/docs/embedding/signing-form-react.md
@@ -45,6 +45,41 @@ export function App() {
"description": "The role name or title of the signer.",
"example": "First Party"
},
+ "token": {
+ "type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
+ "required": false,
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `token` authentication."
+ },
"expand": {
"type": "boolean",
"required": false,
@@ -63,11 +98,6 @@ export function App() {
"default": false,
"description": "Order form fields based on their position on the pages."
},
- "externalId": {
- "type": "string",
- "required": false,
- "description": "Your application-specific unique string key to identify signer within your app."
- },
"logo": {
"type": "string",
"required": false,
@@ -84,12 +114,6 @@ export function App() {
"default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See submission_form/i18n.js for available i18n keys."
},
- "preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"goToLast": {
"type": "boolean",
"required": false,
@@ -239,6 +263,11 @@ export function App() {
"description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
},
+ "externalId": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
"metadata": {
"type": "object",
"required": false,
diff --git a/docs/embedding/signing-form-vue.md b/docs/embedding/signing-form-vue.md
index afe1c597..45e6a336 100644
--- a/docs/embedding/signing-form-vue.md
+++ b/docs/embedding/signing-form-vue.md
@@ -54,10 +54,40 @@ export default {
"description": "The role name or title of the signer.",
"example": "First Party"
},
- "external-id": {
+ "token": {
"type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
"required": false,
- "description": "Your application-specific unique string key to identify signer within your app."
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
},
"expand": {
"type": "boolean",
@@ -93,12 +123,6 @@ export default {
"default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See submission_form/i18n.js for available i18n keys."
},
- "preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"go-to-last": {
"type": "boolean",
"required": false,
@@ -249,6 +273,11 @@ export default {
"description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
},
+ "external-id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
"metadata": {
"type": "object",
"required": false,
diff --git a/docs/openapi.json b/docs/openapi.json
index 93f4dabf..bb9fa35d 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -406,6 +406,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -545,6 +549,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -864,6 +869,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -974,6 +983,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -1274,7 +1284,6 @@
"created_at",
"updated_at",
"submitters",
- "template",
"created_by_user"
],
"properties": {
@@ -1282,6 +1291,11 @@
"type": "integer",
"description": "Submission unique ID number."
},
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
"source": {
"type": "string",
"description": "The source of the submission.",
@@ -1557,6 +1571,7 @@
"data": [
{
"id": 1,
+ "name": null,
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
@@ -1758,6 +1773,11 @@
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
+ "require_phone_2fa": {
+ "type": "boolean",
+ "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
+ "default": false
+ },
"message": {
"type": "object",
"properties": {
@@ -2216,7 +2236,6 @@
"updated_at",
"archived_at",
"submitters",
- "template",
"created_by_user",
"submission_events",
"documents",
@@ -2229,6 +2248,11 @@
"type": "integer",
"description": "Submission unique ID number."
},
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
"slug": {
"type": "string",
"description": "Unique slug of the submission."
@@ -2611,6 +2635,7 @@
},
"example": {
"id": 1,
+ "name": null,
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
@@ -2971,164 +2996,1912 @@
{
"type": "boolean"
},
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Pre-filled value of the field."
+ }
+ }
+ }
+ },
+ "metadata": {
+ "type": "object"
+ },
+ "sent_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the signing request was sent to the submitter."
+ },
+ "opened_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter opened the signing form."
+ },
+ "completed_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter completed the signing form."
+ },
+ "declined_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter declined the signing form."
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was last updated."
+ },
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "description": "The name of the submitter."
+ },
+ "phone": {
+ "type": "string",
+ "nullable": true,
+ "description": "The phone number of the submitter."
+ },
+ "external_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "send_email": {
+ "type": "boolean",
+ "description": "Indicates whether the signature request email should be sent."
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Indicates whether the signature request should be sent via SMS."
+ }
+ }
+ },
+ "role": {
+ "type": "string",
+ "description": "The role of the submitter in the signing process."
+ },
+ "embed_src": {
+ "type": "string",
+ "description": "The `src` URL value to embed the signing form or sign via a link."
+ }
+ }
+ }
+ },
+ "example": [
+ {
+ "id": 1,
+ "submission_id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "john.doe@example.com",
+ "slug": "pAMimKcyrLjqVt",
+ "sent_at": "2023-12-13T23:04:04.252Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2023-12-14T15:50:21.799Z",
+ "updated_at": "2023-12-14T15:50:21.799Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "John Doe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false
+ },
+ "role": "First Party",
+ "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ },
+ {
+ "id": 2,
+ "submission_id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "alan.smith@example.com",
+ "slug": "SEwc65vHNDH3QS",
+ "sent_at": "2023-12-13T23:04:04.252Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2023-12-14T15:50:21.799Z",
+ "updated_at": "2023-12-14T15:50:21.799Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "Roe Moe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false
+ },
+ "role": "First Party",
+ "embed_src": "SEwc65vHNDH3QS"
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "/submissions/pdf": {
+ "post": {
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "description": "The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form\n",
+ "operationId": "createSubmissionFromPdf",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission.",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "file"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document."
+ },
+ "file": {
+ "example": "base64",
+ "type": "string",
+ "format": "base64",
+ "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
+ },
+ "fields": {
+ "type": "array",
+ "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the field."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "Role name of the signer."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "areas": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X-coordinate of the field area."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y-coordinate of the field area."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the field area."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the field area."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the field area. Starts from 1.",
+ "example": 1
+ },
+ "option": {
+ "type": "string",
+ "description": "Option string value for 'radio' and 'multiple' select field types."
+ }
+ }
+ }
+ },
+ "options": {
+ "type": "array",
+ "description": "An array of option values for 'select' field type.",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "Option A",
+ "Option B"
+ ]
+ }
+ }
+ }
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "require_phone_2fa": {
+ "type": "boolean",
+ "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
+ "default": false
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "id",
+ "submitters",
+ "source",
+ "submitters_order",
+ "status",
+ "documents",
+ "expire_at",
+ "created_at"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "name": {
+ "type": "string",
+ "description": "Submission name."
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters.",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "submission_id",
+ "uuid",
+ "email",
+ "slug",
+ "sent_at",
+ "opened_at",
+ "completed_at",
+ "declined_at",
+ "created_at",
+ "updated_at",
+ "name",
+ "phone",
+ "status",
+ "role",
+ "metadata",
+ "preferences"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "uuid": {
+ "type": "string",
+ "description": "Submitter UUID."
+ },
+ "email": {
+ "type": "string",
+ "nullable": true,
+ "description": "The email address of the submitter."
+ },
+ "slug": {
+ "type": "string",
+ "description": "Unique key to be used in the form signing link and embedded form."
+ },
+ "sent_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the signing request was sent to the submitter."
+ },
+ "opened_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter opened the signing form."
+ },
+ "completed_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter completed the signing form."
+ },
+ "declined_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter declined to complete the signing form."
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was last updated."
+ },
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter name."
+ },
+ "phone": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter phone number."
+ },
+ "external_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of signing request for the submitter.",
+ "enum": [
+ "completed",
+ "declined",
+ "opened",
+ "sent",
+ "awaiting"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "The role of the submitter."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information."
+ },
+ "preferences": {
+ "type": "object",
+ "description": "Object with submitter preferences."
+ },
+ "embed_src": {
+ "type": "string",
+ "description": "The `src` URL value to embed the signing form or sign via a link."
+ }
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "The source of the submission.",
+ "enum": [
+ "invite",
+ "bulk",
+ "api",
+ "embed",
+ "link"
+ ]
+ },
+ "submitters_order": {
+ "type": "string",
+ "description": "The order of submitters.",
+ "enum": [
+ "random",
+ "preserved"
+ ]
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of the submission.",
+ "enum": [
+ "completed",
+ "declined",
+ "expired",
+ "pending"
+ ]
+ },
+ "schema": {
+ "type": "array",
+ "description": "The one-off submission document files.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "attachment_uuid": {
+ "type": "string",
+ "description": "The attachment UUID."
+ },
+ "name": {
+ "type": "string",
+ "description": "The attachment name."
+ }
+ }
+ }
+ },
+ "fields": {
+ "type": "array",
+ "description": "List of fields to be filled in the one-off submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "uuid",
+ "submitter_uuid",
+ "name",
+ "type",
+ "required",
+ "areas"
+ ],
+ "properties": {
+ "uuid": {
+ "type": "string",
+ "description": "Unique identifier of the field."
+ },
+ "submitter_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the submitter that filled the field."
+ },
+ "name": {
+ "type": "string",
+ "description": "Field name."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels."
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value."
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value."
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value."
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value."
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value."
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types."
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields."
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields."
+ },
+ "mask": {
+ "type": "boolean",
+ "description": "Indicates if the field is masked on the document."
+ }
+ }
+ },
+ "areas": {
+ "type": "array",
+ "description": "List of areas where the field is located in the document.",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "attachment_uuid",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X coordinate of the area where the field is located in the document."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y coordinate of the area where the field is located in the document."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the area where the field is located in the document."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the area where the field is located in the document."
+ },
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the attached document where the field is located."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the attached document where the field is located."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "List of documents attached to the one-off submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "attachment_uuid",
+ "name"
+ ],
+ "properties": {
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique indentifier of attached document to the one-off submission."
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the attached document to the one-off submission."
+ }
+ }
+ }
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submission was created."
+ }
+ }
+ },
+ "example": {
+ "id": 5,
+ "name": "Test Submission",
+ "submitters": [
+ {
+ "id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "john.doe@example.com",
+ "slug": "pAMimKcyrLjqVt",
+ "sent_at": "2025-06-02T15:55:51.310Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2025-06-02T15:55:50.320Z",
+ "updated_at": "2025-06-02T15:55:50.320Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "John Doe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false,
+ "reply_to": "reply@example.com",
+ "completed_redirect_url": "https://example.com/"
+ },
+ "role": "First Party",
+ "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ }
+ ],
+ "source": "api",
+ "submitters_order": "preserved",
+ "status": "pending",
+ "schema": [
+ {
+ "name": "Demo PDF",
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf"
+ }
+ ],
+ "fields": [
+ {
+ "name": "Name",
+ "type": "text",
+ "required": true,
+ "uuid": "d0bf3c0c-1928-40c8-80f9-d9f3c6ad4eff",
+ "submitter_uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7",
+ "areas": [
+ {
+ "page": 1,
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
+ "x": 0.403158189124654,
+ "y": 0.04211750189825361,
+ "w": 0.100684625476058,
+ "h": 0.01423690205011389
+ }
+ ]
+ }
+ ],
+ "expire_at": null,
+ "created_at": "2025-06-02T15:55:50.270Z"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/submissions/html": {
+ "post": {
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from HTML",
+ "description": "This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form. Related Guides Create PDF document fillable form with HTML",
+ "operationId": "createSubmissionFromHtml",
+ "parameters": [],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "documents",
+ "submitters"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "order": {
+ "type": "string",
+ "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
+ "default": "preserved",
+ "enum": [
+ "preserved",
+ "random"
+ ]
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Specify URL to redirect to after the submission completion."
+ },
+ "bcc_completed": {
+ "type": "string",
+ "description": "Specify BCC address to send signed documents to after the completion."
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails."
+ },
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
+ },
+ "template_ids": {
+ "type": "array",
+ "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the template to use for the submission."
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
+ "items": {
+ "type": "object",
+ "required": [
+ "html"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document name. Random uuid will be assigned when not specified.",
+ "example": "Test Document"
+ },
+ "html": {
+ "type": "string",
+ "description": "HTML document content with field tags.",
+ "example": "
Lorem Ipsum is simply dummy text of the\n\n\nand typesetting industry
\n"
+ },
+ "html_header": {
+ "type": "string",
+ "description": "HTML document content of the header to be displayed on every page."
+ },
+ "html_footer": {
+ "type": "string",
+ "description": "HTML document content of the footer to be displayed on every page."
+ },
+ "size": {
+ "type": "string",
+ "default": "Letter",
+ "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
+ "enum": [
+ "Letter",
+ "Legal",
+ "Tabloid",
+ "Ledger",
+ "A0",
+ "A1",
+ "A2",
+ "A3",
+ "A4",
+ "A5",
+ "A6"
+ ],
+ "example": "A4"
+ },
+ "position": {
+ "type": "integer",
+ "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
+ }
+ }
+ }
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters for the submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "email"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the submitter."
+ },
+ "role": {
+ "type": "string",
+ "description": "The role name or title of the submitter.",
+ "example": "First Party"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the submitter.",
+ "format": "email",
+ "example": "john.doe@example.com"
+ },
+ "phone": {
+ "type": "string",
+ "description": "The phone number of the submitter, formatted according to the E.164 standard.",
+ "example": "+1234567890"
+ },
+ "values": {
+ "type": "object",
+ "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
+ },
+ "external_id": {
+ "type": "string",
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "completed": {
+ "type": "boolean",
+ "description": "Pass `true` to mark submitter as completed and auto-signed via API."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information.",
+ "example": "{ \"customField\": \"value\" }"
+ },
+ "send_email": {
+ "type": "boolean",
+ "description": "Set `false` to disable signature request emails sending only for this submitter.",
+ "default": true
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Set `true` to send signature request via phone number and SMS.",
+ "default": false
+ },
+ "reply_to": {
+ "type": "string",
+ "description": "Specify Reply-To address to use in the notification emails for this submitter."
+ },
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "require_phone_2fa": {
+ "type": "boolean",
+ "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
+ "default": false
+ },
+ "fields": {
+ "type": "array",
+ "description": "A list of configurations for document form fields.",
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Document field name.",
+ "example": "First Name"
+ },
+ "default_value": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
+ "example": "Acme"
+ },
+ "readonly": {
+ "type": "boolean",
+ "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
+ "default": false
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Set `true` to make the field required."
+ },
+ "title": {
+ "type": "string",
+ "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
+ },
+ "description": {
+ "type": "string",
+ "description": "Field description displayed on the signing form. Supports Markdown."
+ },
+ "validation_pattern": {
+ "type": "string",
+ "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
+ "example": "[A-Z]{4}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels.",
+ "example": 12
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value.",
+ "enum": [
+ "bold",
+ "italic",
+ "bold_italic"
+ ]
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value.",
+ "enum": [
+ "Times",
+ "Helvetica",
+ "Courier"
+ ]
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value.",
+ "enum": [
+ "black",
+ "white",
+ "blue"
+ ],
+ "default": "black"
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "default": "left"
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value.",
+ "enum": [
+ "top",
+ "center",
+ "bottom"
+ ],
+ "default": "center"
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types. - Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY). - Signature field: accepts drawn, typed, drawn_or_typed (default), or upload. - Number field: accepts currency formats such as usd, eur, gbp.",
+ "example": "DD/MM/YYYY"
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields.",
+ "example": 99.99
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields.",
+ "enum": [
+ "USD",
+ "EUR",
+ "GBP",
+ "CAD",
+ "AUD"
+ ],
+ "default": "USD"
+ },
+ "mask": {
+ "description": "Set `true` to make sensitive data masked on the document.",
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "roles": {
+ "type": "array",
+ "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "message": {
+ "type": "object",
+ "properties": {
+ "subject": {
+ "type": "string",
+ "description": "Custom signature request email subject."
+ },
+ "body": {
+ "type": "string",
+ "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
+ }
+ }
+ },
+ "merge_documents": {
+ "type": "boolean",
+ "description": "Set `true` to merge the documents into a single PDF file.",
+ "default": false
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "id",
+ "submitters",
+ "source",
+ "submitters_order",
+ "status",
+ "documents",
+ "expire_at",
+ "created_at"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "name": {
+ "type": "string",
+ "description": "Submission name."
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters.",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "submission_id",
+ "uuid",
+ "email",
+ "slug",
+ "sent_at",
+ "opened_at",
+ "completed_at",
+ "declined_at",
+ "created_at",
+ "updated_at",
+ "name",
+ "phone",
+ "status",
+ "role",
+ "metadata",
+ "preferences"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "uuid": {
+ "type": "string",
+ "description": "Submitter UUID."
+ },
+ "email": {
+ "type": "string",
+ "nullable": true,
+ "description": "The email address of the submitter."
+ },
+ "slug": {
+ "type": "string",
+ "description": "Unique key to be used in the form signing link and embedded form."
+ },
+ "sent_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the signing request was sent to the submitter."
+ },
+ "opened_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter opened the signing form."
+ },
+ "completed_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter completed the signing form."
+ },
+ "declined_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter declined to complete the signing form."
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was last updated."
+ },
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter name."
+ },
+ "phone": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter phone number."
+ },
+ "external_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of signing request for the submitter.",
+ "enum": [
+ "completed",
+ "declined",
+ "opened",
+ "sent",
+ "awaiting"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "The role of the submitter."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information."
+ },
+ "preferences": {
+ "type": "object",
+ "description": "Object with submitter preferences."
+ },
+ "embed_src": {
+ "type": "string",
+ "description": "The `src` URL value to embed the signing form or sign via a link."
+ }
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "The source of the submission.",
+ "enum": [
+ "invite",
+ "bulk",
+ "api",
+ "embed",
+ "link"
+ ]
+ },
+ "submitters_order": {
+ "type": "string",
+ "description": "The order of submitters.",
+ "enum": [
+ "random",
+ "preserved"
+ ]
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of the submission.",
+ "enum": [
+ "completed",
+ "declined",
+ "expired",
+ "pending"
+ ]
+ },
+ "schema": {
+ "type": "array",
+ "description": "The one-off submission document files.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "attachment_uuid": {
+ "type": "string",
+ "description": "The attachment UUID."
+ },
+ "name": {
+ "type": "string",
+ "description": "The attachment name."
+ }
+ }
+ }
+ },
+ "fields": {
+ "type": "array",
+ "description": "List of fields to be filled in the one-off submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "uuid",
+ "submitter_uuid",
+ "name",
+ "type",
+ "required",
+ "areas"
+ ],
+ "properties": {
+ "uuid": {
+ "type": "string",
+ "description": "Unique identifier of the field."
+ },
+ "submitter_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the submitter that filled the field."
+ },
+ "name": {
+ "type": "string",
+ "description": "Field name."
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of the field (e.g., text, signature, date, initials).",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels."
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value."
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value."
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value."
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value."
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value."
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types."
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields."
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields."
+ },
+ "mask": {
+ "type": "boolean",
+ "description": "Indicates if the field is masked on the document."
+ }
+ }
+ },
+ "areas": {
+ "type": "array",
+ "description": "List of areas where the field is located in the document.",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "attachment_uuid",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X coordinate of the area where the field is located in the document."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y coordinate of the area where the field is located in the document."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the area where the field is located in the document."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the area where the field is located in the document."
+ },
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the attached document where the field is located."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the attached document where the field is located."
}
- ],
- "description": "Pre-filled value of the field."
+ }
}
}
}
- },
- "metadata": {
- "type": "object"
- },
- "sent_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the signing request was sent to the submitter."
- },
- "opened_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the submitter opened the signing form."
- },
- "completed_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the submitter completed the signing form."
- },
- "declined_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the submitter declined the signing form."
- },
- "created_at": {
- "type": "string",
- "description": "The date and time when the submitter was created."
- },
- "updated_at": {
- "type": "string",
- "description": "The date and time when the submitter was last updated."
- },
- "name": {
- "type": "string",
- "nullable": true,
- "description": "The name of the submitter."
- },
- "phone": {
- "type": "string",
- "nullable": true,
- "description": "The phone number of the submitter."
- },
- "external_id": {
- "type": "string",
- "nullable": true,
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "preferences": {
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "List of documents attached to the one-off submission.",
+ "items": {
"type": "object",
+ "required": [
+ "attachment_uuid",
+ "name"
+ ],
"properties": {
- "send_email": {
- "type": "boolean",
- "description": "Indicates whether the signature request email should be sent."
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique indentifier of attached document to the one-off submission."
},
- "send_sms": {
- "type": "boolean",
- "description": "Indicates whether the signature request should be sent via SMS."
+ "name": {
+ "type": "string",
+ "description": "Name of the attached document to the one-off submission."
}
}
- },
- "role": {
- "type": "string",
- "description": "The role of the submitter in the signing process."
- },
- "embed_src": {
- "type": "string",
- "description": "The `src` URL value to embed the signing form or sign via a link."
}
- }
- }
- },
- "example": [
- {
- "id": 1,
- "submission_id": 1,
- "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
- "email": "john.doe@example.com",
- "slug": "pAMimKcyrLjqVt",
- "sent_at": "2023-12-13T23:04:04.252Z",
- "opened_at": null,
- "completed_at": null,
- "declined_at": null,
- "created_at": "2023-12-14T15:50:21.799Z",
- "updated_at": "2023-12-14T15:50:21.799Z",
- "name": "string",
- "phone": "+1234567890",
- "external_id": "2321",
- "metadata": {
- "customData": "custom value"
- },
- "status": "sent",
- "values": [
- {
- "field": "Full Name",
- "value": "John Doe"
- }
- ],
- "preferences": {
- "send_email": true,
- "send_sms": false
},
- "role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
- },
- {
- "id": 2,
- "submission_id": 1,
- "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
- "email": "alan.smith@example.com",
- "slug": "SEwc65vHNDH3QS",
- "sent_at": "2023-12-13T23:04:04.252Z",
- "opened_at": null,
- "completed_at": null,
- "declined_at": null,
- "created_at": "2023-12-14T15:50:21.799Z",
- "updated_at": "2023-12-14T15:50:21.799Z",
- "name": "string",
- "phone": "+1234567890",
- "external_id": "2321",
- "metadata": {
- "customData": "custom value"
- },
- "status": "sent",
- "values": [
- {
- "field": "Full Name",
- "value": "Roe Moe"
- }
- ],
- "preferences": {
- "send_email": true,
- "send_sms": false
+ "expire_at": {
+ "type": "string",
+ "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
+ "example": "2024-09-01 12:00:00 UTC"
},
- "role": "First Party",
- "embed_src": "SEwc65vHNDH3QS"
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submission was created."
+ }
}
- ]
+ },
+ "example": {
+ "id": 5,
+ "name": "Test Submission",
+ "submitters": [
+ {
+ "id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "john.doe@example.com",
+ "slug": "pAMimKcyrLjqVt",
+ "sent_at": "2025-06-02T15:55:51.310Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2025-06-02T15:55:50.320Z",
+ "updated_at": "2025-06-02T15:55:50.320Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "John Doe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false,
+ "reply_to": "reply@example.com",
+ "completed_redirect_url": "https://example.com/"
+ },
+ "role": "First Party",
+ "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ }
+ ],
+ "source": "api",
+ "submitters_order": "preserved",
+ "status": "pending",
+ "schema": [
+ {
+ "name": "Demo PDF",
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf"
+ }
+ ],
+ "fields": [
+ {
+ "name": "Name",
+ "type": "text",
+ "required": true,
+ "uuid": "d0bf3c0c-1928-40c8-80f9-d9f3c6ad4eff",
+ "submitter_uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7",
+ "areas": [
+ {
+ "page": 1,
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
+ "x": 0.403158189124654,
+ "y": 0.04211750189825361,
+ "w": 0.100684625476058,
+ "h": 0.01423690205011389
+ }
+ ]
+ }
+ ],
+ "expire_at": null,
+ "created_at": "2025-06-02T15:55:50.270Z"
+ }
}
}
}
@@ -3545,10 +5318,6 @@
"type": "string",
"description": "Specify Reply-To address to use in the notification emails."
},
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
"completed": {
"type": "boolean",
"description": "Pass `true` to mark submitter as completed and auto-signed via API."
@@ -3558,6 +5327,15 @@
"description": "Metadata object with additional submitter information.",
"example": "{ \"customField\": \"value\" }"
},
+ "completed_redirect_url": {
+ "type": "string",
+ "description": "Submitter specific URL to redirect to after the submission completion."
+ },
+ "require_phone_2fa": {
+ "type": "boolean",
+ "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
+ "default": false
+ },
"message": {
"type": "object",
"properties": {
@@ -4736,6 +6514,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -5179,6 +6961,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -5287,6 +7073,7 @@
"folder_id": 2,
"folder_name": "Default",
"external_id": null,
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -5378,6 +7165,11 @@
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
@@ -5670,6 +7462,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -5778,6 +7574,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "f0b4714f-e44b-4993-905b-68b4451eef8c",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -5836,6 +7633,11 @@
"type": "string",
"description": "The folder's name to which the template should be created."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -6315,6 +8117,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -6423,6 +8229,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -6453,8 +8260,8 @@
"tags": [
"Templates"
],
- "summary": "Create a template from existing PDF",
- "description": "The API endpoint provides the functionality to create a fillable document template for existing PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form\n",
+ "summary": "Create a template from PDF",
+ "description": "The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param. Related Guides Use embedded text field tags to create a fillable form\n",
"operationId": "createTemplateFromPdf",
"parameters": [],
"requestBody": {
@@ -6481,6 +8288,11 @@
"description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
"example": "unique-key"
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"documents": {
"type": "array",
"items": {
@@ -6694,19 +8506,19 @@
}
}
}
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the document.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
}
}
}
+ },
+ "flatten": {
+ "type": "boolean",
+ "description": "Remove PDF form fields from the documents.",
+ "default": false
+ },
+ "remove_tags": {
+ "type": "boolean",
+ "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
+ "default": true
}
}
}
@@ -6978,6 +8790,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -7086,6 +8902,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -7154,6 +8971,11 @@
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
+ "default": true
+ },
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
@@ -7435,6 +9257,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -7543,6 +9369,7 @@
"folder_id": 2,
"folder_name": "Default",
"external_id": null,
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
diff --git a/lib/abilities/template_conditions.rb b/lib/abilities/template_conditions.rb
index 32afd8a3..ac50f3aa 100644
--- a/lib/abilities/template_conditions.rb
+++ b/lib/abilities/template_conditions.rb
@@ -13,7 +13,7 @@ module Abilities
TemplateSharing.where({ ability:, account_id: [user.account_id, TemplateSharing::ALL_ID] }.compact)
.select(:template_id)
- Template.where(Template.arel_table[:id].in(Arel::Nodes::Union.new(templates.select(:id).arel, shared_ids.arel)))
+ Template.where(Template.arel_table[:id].in(templates.select(:id).arel.union(shared_ids.arel)))
end
def entity(template, user:, ability: nil)
diff --git a/lib/image_utils.rb b/lib/image_utils.rb
new file mode 100644
index 00000000..57f630a5
--- /dev/null
+++ b/lib/image_utils.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module ImageUtils
+ module_function
+
+ def blank?(image)
+ min = (0...image.bands).map { |i| image.stats.getpoint(0, i)[0] }
+ max = (0...image.bands).map { |i| image.stats.getpoint(1, i)[0] }
+
+ return true if min.all?(255) && max.all?(255)
+ return true if min.all?(0) && max.all?(0)
+
+ false
+ end
+end
diff --git a/lib/pdfium.rb b/lib/pdfium.rb
index 54f22fe4..317dddf0 100644
--- a/lib/pdfium.rb
+++ b/lib/pdfium.rb
@@ -24,6 +24,7 @@ class Pdfium
typedef :pointer, :FPDF_PAGE
typedef :pointer, :FPDF_BITMAP
typedef :pointer, :FPDF_FORMHANDLE
+ typedef :pointer, :FPDF_TEXTPAGE
MAX_SIZE = 32_767
@@ -72,6 +73,11 @@ class Pdfium
attach_function :FPDF_RenderPageBitmap, %i[FPDF_BITMAP FPDF_PAGE int int int int int int], :void
+ attach_function :FPDFText_LoadPage, [:FPDF_PAGE], :FPDF_TEXTPAGE
+ attach_function :FPDFText_ClosePage, [:FPDF_TEXTPAGE], :void
+ attach_function :FPDFText_CountChars, [:FPDF_TEXTPAGE], :int
+ attach_function :FPDFText_GetText, %i[FPDF_TEXTPAGE int int pointer], :int
+
typedef :int, :FPDF_BOOL
typedef :pointer, :IPDF_JSPLATFORM
@@ -346,6 +352,40 @@ class Pdfium
Pdfium.FPDFBitmap_Destroy(bitmap_ptr) if bitmap_ptr && !bitmap_ptr.null?
end
+ def text
+ return @text if @text
+
+ ensure_not_closed!
+
+ text_page = Pdfium.FPDFText_LoadPage(page_ptr)
+
+ if text_page.null?
+ Pdfium.check_last_error("Failed to load text page #{page_index}")
+
+ raise PdfiumError, "Failed to load text page #{page_index}, pointer is NULL."
+ end
+
+ char_count = Pdfium.FPDFText_CountChars(text_page)
+
+ return @text = '' if char_count.zero?
+
+ buffer_char_capacity = char_count + 1
+
+ buffer = FFI::MemoryPointer.new(:uint16, buffer_char_capacity)
+
+ chars_written = Pdfium.FPDFText_GetText(text_page, 0, buffer_char_capacity, buffer)
+
+ if chars_written <= 0
+ Pdfium.check_last_error("Failed to extract text from page #{page_index}")
+
+ return @text = ''
+ end
+
+ @text = buffer.read_bytes((chars_written * 2) - 2).force_encoding('UTF-16LE').encode('UTF-8')
+ ensure
+ Pdfium.FPDFText_ClosePage(text_page) if text_page && !text_page.null?
+ end
+
def close
return if closed?
diff --git a/lib/search_entries.rb b/lib/search_entries.rb
index 5281dbf3..cbd9061c 100644
--- a/lib/search_entries.rb
+++ b/lib/search_entries.rb
@@ -56,7 +56,7 @@ module SearchEntries
end
[sql, number, number.length > 1 ? number.delete_prefix('0') : number, keyword]
- elsif keyword.match?(/[^\p{L}\d&@._\-]/) || keyword.match?(/\A['"].*['"]\z/)
+ elsif keyword.match?(/[^\p{L}\d&@.\-]/) || keyword.match?(/\A['"].*['"]\z/)
['tsvector @@ plainto_tsquery(?)', TextUtils.transliterate(keyword.downcase)]
else
keyword = TextUtils.transliterate(keyword.downcase).squish
@@ -180,15 +180,21 @@ module SearchEntries
end
def index_template(template)
- sql = SearchEntry.sanitize_sql_array(
- ["SELECT to_tsvector(:text), to_tsvector('simple', :text)",
- { text: TextUtils.transliterate(template.name.to_s.downcase).delete("\0") }]
- )
+ text = TextUtils.transliterate(template.name.to_s.downcase.squish).delete("\0")
+
+ sql = SearchEntry.sanitize_sql_array(["SELECT to_tsvector(:text), to_tsvector('simple', :text)", { text: }])
entry = template.search_entry || template.build_search_entry
entry.account_id = template.account_id
entry.tsvector, ngram = SearchEntry.connection.select_rows(sql).first
+
+ hyphens = text.scan(/\b[^\s]*?\d-[^\s]+?\b/) + text.scan(/\b[^\s]+-\d[^\s]*?\b/)
+
+ hyphens.uniq.each_with_index do |item, index|
+ entry.tsvector += " '#{item.delete("'")}':#{index + 1}" unless entry.tsvector.include?(item)
+ end
+
entry.ngram = build_ngram(ngram)
return if entry.tsvector.blank?
@@ -205,15 +211,21 @@ module SearchEntries
def index_submission(submission)
return if submission.name.blank?
- sql = SearchEntry.sanitize_sql_array(
- ["SELECT to_tsvector(:text), to_tsvector('simple', :text)",
- { text: TextUtils.transliterate(submission.name.to_s.downcase).delete("\0") }]
- )
+ text = TextUtils.transliterate(submission.name.to_s.downcase.squish).delete("\0")
+
+ sql = SearchEntry.sanitize_sql_array(["SELECT to_tsvector(:text), to_tsvector('simple', :text)", { text: }])
entry = submission.search_entry || submission.build_search_entry
entry.account_id = submission.account_id
entry.tsvector, ngram = SearchEntry.connection.select_rows(sql).first
+
+ hyphens = text.scan(/\b[^\s]*?\d-[^\s]+?\b/) + text.scan(/\b[^\s]+-\d[^\s]*?\b/)
+
+ hyphens.uniq.each_with_index do |item, index|
+ entry.tsvector += " '#{item.delete("'")}':#{index + 1}" unless entry.tsvector.include?(item)
+ end
+
entry.ngram = build_ngram(ngram)
return if entry.tsvector.blank?
diff --git a/lib/submissions.rb b/lib/submissions.rb
index 0fb3b0e0..e8085169 100644
--- a/lib/submissions.rb
+++ b/lib/submissions.rb
@@ -50,7 +50,8 @@ module Submissions
arel,
Submission.where(
template_id: SearchEntry.where(record_type: 'Template')
- .where(account_id: current_user.account_id)
+ .where(account_id: [current_user.account_id,
+ current_user.account.linked_account_account&.account_id].compact)
.where(*SearchEntries.build_tsquery(keyword))
.select(:record_id)
).select(:id).arel
diff --git a/lib/submissions/generate_audit_trail.rb b/lib/submissions/generate_audit_trail.rb
index d15c242b..51d3e190 100644
--- a/lib/submissions/generate_audit_trail.rb
+++ b/lib/submissions/generate_audit_trail.rb
@@ -312,8 +312,9 @@ module Submissions
text_align: field_name.to_s.match?(RTL_REGEXP) ? :right : :left,
line_spacing: 1.3, padding: [0, 0, 2, 0]
),
- if field['type'].in?(%w[image signature initials stamp])
- attachment = submitter.attachments.find { |a| a.uuid == value }
+ if field['type'].in?(%w[image signature initials stamp]) &&
+ (attachment = submitter.attachments.find { |a| a.uuid == value }) &&
+ attachment.image?
image =
begin
@@ -340,7 +341,7 @@ module Submissions
composer.image(io, width:, height:, margin: [5, 0, 10, 0])
composer.formatted_text_box([{ text: '' }])
- elsif field['type'].in?(%w[file payment])
+ elsif field['type'].in?(%w[file payment image])
if field['type'] == 'payment'
unit = CURRENCY_SYMBOLS[field['preferences']['currency']] || field['preferences']['currency']
diff --git a/lib/submissions/generate_result_attachments.rb b/lib/submissions/generate_result_attachments.rb
index bdfff77b..cc7da99a 100644
--- a/lib/submissions/generate_result_attachments.rb
+++ b/lib/submissions/generate_result_attachments.rb
@@ -223,7 +223,7 @@ module Submissions
font_name = FONT_NAME unless font_name.in?(DEFAULT_FONTS)
if font_variant != :none && font_name == FONT_NAME
- font_name = FONT_VARIANS[font_variant]
+ font_name = FONT_VARIANS[font_variant] if FONT_VARIANS[font_variant]
font_variant = nil unless font_name.in?(DEFAULT_FONTS)
end
@@ -252,7 +252,11 @@ module Submissions
canvas = page.canvas(type: :overlay)
canvas.font(FONT_NAME, size: font_size)
- case field['type']
+ field_type = field['type']
+ field_type = 'file' if field_type == 'image' &&
+ !submitter.attachments.find { |a| a.uuid == value }.image?
+
+ case field_type
when ->(type) { type == 'signature' && (with_signature_id || field.dig('preferences', 'reason_field_uuid')) }
attachment = submitter.attachments.find { |a| a.uuid == value }
diff --git a/lib/submitters.rb b/lib/submitters.rb
index 65bc4215..d732120c 100644
--- a/lib/submitters.rb
+++ b/lib/submitters.rb
@@ -53,7 +53,7 @@ module Submitters
end
[sql, number, weight, number.length > 1 ? number.delete_prefix('0') : number, weight]
- elsif keyword.match?(/[^\p{L}\d&@._\-]/)
+ elsif keyword.match?(/[^\p{L}\d&@.\-]/)
terms = TextUtils.transliterate(keyword.downcase).split(/\b/).map(&:squish).compact_blank.uniq
if terms.size > 1
@@ -135,6 +135,7 @@ module Submitters
preferences['email_message_uuid'] = email_message.uuid if email_message
preferences['send_email'] = params['send_email'].in?(TRUE_VALUES) if params.key?('send_email')
preferences['send_sms'] = params['send_sms'].in?(TRUE_VALUES) if params.key?('send_sms')
+ preferences['require_phone_2fa'] = params['require_phone_2fa'].in?(TRUE_VALUES) if params.key?('require_phone_2fa')
preferences['bcc_completed'] = params['bcc_completed'] if params.key?('bcc_completed')
preferences['reply_to'] = params['reply_to'] if params.key?('reply_to')
preferences['go_to_last'] = params['go_to_last'] if params.key?('go_to_last')
diff --git a/lib/submitters/maybe_assign_default_browser_signature.rb b/lib/submitters/maybe_assign_default_browser_signature.rb
index 98b23131..88431f91 100644
--- a/lib/submitters/maybe_assign_default_browser_signature.rb
+++ b/lib/submitters/maybe_assign_default_browser_signature.rb
@@ -7,6 +7,8 @@ module Submitters
module_function
def call(submitter, params, cookies = nil, attachments = [])
+ attachments = attachments.select { |e| e.record_id == submitter.id && e.record_type == 'Submitter' }
+
if (value = params[:signature_src].presence || params[:signature].presence)
find_or_create_signature_from_value(submitter, value, attachments)
elsif params[:signed_signature_uuids].present?
diff --git a/lib/submitters/submit_values.rb b/lib/submitters/submit_values.rb
index 8775f26e..eb9e26a4 100644
--- a/lib/submitters/submit_values.rb
+++ b/lib/submitters/submit_values.rb
@@ -219,8 +219,7 @@ module Submitters
submitters_values = nil
has_other_submitters = submission.template_submitters.size > 1
- has_document_conditions =
- (submission.template_schema || submission.template.schema).any? { |e| e['conditions'].present? }
+ has_document_conditions = submission_has_document_conditions?(submission)
attachments_index =
if has_document_conditions
@@ -234,7 +233,7 @@ module Submitters
if has_document_conditions && !check_field_areas_attachments(field, attachments_index)
submitter.values.delete(field['uuid'])
- required_field_uuids_acc.delete(field['uuid'])
+ required_field_uuids_acc&.delete(field['uuid'])
end
if has_other_submitters && !submitters_values &&
@@ -244,13 +243,17 @@ module Submitters
unless check_field_conditions(submitters_values || submitter.values, field, submission.fields_uuid_index)
submitter.values.delete(field['uuid'])
- required_field_uuids_acc.delete(field['uuid'])
+ required_field_uuids_acc&.delete(field['uuid'])
end
end
submitter.values
end
+ def submission_has_document_conditions?(submission)
+ (submission.template_schema || submission.template.schema).any? { |e| e['conditions'].present? }
+ end
+
def required_editable_field?(field)
return false if NONEDITABLE_FIELD_TYPES.include?(field['type'])
diff --git a/lib/templates.rb b/lib/templates.rb
index 95033f02..e1dbdf33 100644
--- a/lib/templates.rb
+++ b/lib/templates.rb
@@ -56,7 +56,8 @@ module Templates
templates.where(
id: SearchEntry.where(record_type: 'Template')
- .where(account_id: current_user.account_id)
+ .where(account_id: [current_user.account_id,
+ current_user.account.linked_account_account&.account_id].compact)
.where(*SearchEntries.build_tsquery(keyword))
.select(:record_id)
)
diff --git a/lib/templates/process_document.rb b/lib/templates/process_document.rb
index 77aeaacd..9d6b78db 100644
--- a/lib/templates/process_document.rb
+++ b/lib/templates/process_document.rb
@@ -69,7 +69,7 @@ module Templates
bitdepth = 2**image.stats.to_a[1..3].pluck(2).uniq.size
io = StringIO.new(image.write_to_buffer(FORMAT, compression: 7, filter: 0, bitdepth:,
- palette: true, Q: bitdepth == 8 ? Q : 5, dither: 0))
+ palette: true, Q: Q, dither: 0))
ActiveStorage::Attachment.create!(
blob: ActiveStorage::Blob.create_and_upload!(
@@ -141,7 +141,7 @@ module Templates
bitdepth = 2**page.stats.to_a[1..3].pluck(2).uniq.size
page.write_to_buffer(format, compression: 7, filter: 0, bitdepth:,
- palette: true, Q: bitdepth == 8 ? Q : 5, dither: 0)
+ palette: true, Q: Q, dither: 0)
else
page.write_to_buffer(format, interlace: true, Q: JPEG_Q)
end
diff --git a/package.json b/package.json
index b0c4ece8..a65611f2 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"@babel/plugin-transform-runtime": "7.21.4",
"@babel/preset-env": "7.21.5",
"@babel/runtime": "7.21.5",
- "@eid-easy/eideasy-widget": "^2.132.1",
+ "@eid-easy/eideasy-widget": "^2.159.0",
"@github/catalyst": "^2.0.0-beta",
"@hotwired/turbo": "https://github.com/docusealco/turbo#main",
"@hotwired/turbo-rails": "^7.3.0",
diff --git a/spec/system/signing_form_spec.rb b/spec/system/signing_form_spec.rb
index 83c1b30b..929a25ca 100644
--- a/spec/system/signing_form_spec.rb
+++ b/spec/system/signing_form_spec.rb
@@ -9,18 +9,78 @@ RSpec.describe 'Signing Form' do
create(:template, shared_link: true, account:, author:, except_field_types: %w[phone payment stamp])
end
- before do
+ it 'displays only the email step when only email is required' do
visit start_form_path(slug: template.slug)
+
+ expect(page).to have_content('You have been invited to submit a form')
+ expect(page).to have_content("Invited by #{account.name}")
+ expect(page).to have_field('Email', type: 'email', placeholder: 'Provide your email to start')
+ expect(page).not_to have_field('Phone', type: 'tel')
+ expect(page).not_to have_field('Name', type: 'text')
+ expect(page).to have_button('Start')
end
- it 'shows the email step' do
+ it 'displays name, email, and phone fields together when all are required' do
+ template.update(preferences: { link_form_fields: %w[email name phone] })
+
+ visit start_form_path(slug: template.slug)
+
expect(page).to have_content('You have been invited to submit a form')
expect(page).to have_content("Invited by #{account.name}")
- expect(page).to have_field('Email', type: 'email')
+ expect(page).to have_field('Email', type: 'email', placeholder: 'Provide your email')
+ expect(page).to have_field('Name', type: 'text', placeholder: 'Provide your name')
+ expect(page).to have_field('Phone', type: 'tel', placeholder: 'Provide your phone in international format')
expect(page).to have_button('Start')
end
+ it 'displays only the name step when only name is required' do
+ template.update(preferences: { link_form_fields: %w[name] })
+
+ visit start_form_path(slug: template.slug)
+
+ expect(page).to have_content('You have been invited to submit a form')
+ expect(page).to have_content("Invited by #{account.name}")
+ expect(page).to have_field('Name', type: 'text', placeholder: 'Provide your name to start')
+ expect(page).not_to have_field('Phone', type: 'tel')
+ expect(page).not_to have_field('Email', type: 'email')
+ expect(page).to have_button('Start')
+ end
+
+ it 'displays only the phone step when only phone is required' do
+ template.update(preferences: { link_form_fields: %w[phone] })
+
+ visit start_form_path(slug: template.slug)
+
+ expect(page).to have_content('You have been invited to submit a form')
+ expect(page).to have_content("Invited by #{account.name}")
+ expect(page).to have_field('Phone', type: 'tel',
+ placeholder: 'Provide your phone in international format to start')
+ expect(page).not_to have_field('Name', type: 'text')
+ expect(page).not_to have_field('Email', type: 'email')
+ expect(page).to have_button('Start')
+ end
+
+ it 'prevents starting the form if phone is not in international format' do
+ template.update(preferences: { link_form_fields: %w[phone] })
+
+ visit start_form_path(slug: template.slug)
+
+ fill_in 'Phone', with: '12345'
+
+ expect { click_button 'Start' }.not_to(change { current_path })
+ end
+
+ it 'prevents starting the form if email is invali' do
+ visit start_form_path(slug: template.slug)
+
+ fill_in 'Email', with: 'invalid-email'
+
+ expect { click_button 'Start' }.not_to(change { current_path })
+ end
+
it 'completes the form' do
+ visit start_form_path(slug: template.slug)
+
# Submit's email step
fill_in 'Email', with: 'john.dou@example.com'
click_button 'Start'
@@ -100,6 +160,97 @@ RSpec.describe 'Signing Form' do
expect(field_value(submitter, 'Attachment')).to be_present
expect(field_value(submitter, 'Cell code')).to eq '123'
end
+
+ # rubocop:disable RSpec/ExampleLength
+ it 'completes the form when name, email, and phone are required' do
+ template.update(preferences: { link_form_fields: %w[email name phone] })
+
+ visit start_form_path(slug: template.slug)
+
+ # Submit's name, email, and phone step
+ fill_in 'Email', with: 'john.dou@example.com'
+ fill_in 'Name', with: 'John Doe'
+ fill_in 'Phone', with: '+17732298825'
+ click_button 'Start'
+
+ # Text step
+ fill_in 'First Name', with: 'John'
+ click_button 'next'
+
+ # Date step
+ fill_in 'Birthday', with: I18n.l(20.years.ago, format: '%Y-%m-%d')
+ click_button 'next'
+
+ # Checkbox step
+ check 'Do you agree?'
+ click_button 'next'
+
+ # Radio step
+ choose 'Boy'
+ click_button 'next'
+
+ # Signature step
+ draw_canvas
+ click_button 'next'
+
+ # Number step
+ fill_in 'House number', with: '123'
+ click_button 'next'
+
+ # Multiple choice step
+ %w[Red Blue].each { |color| check color }
+ click_button 'next'
+
+ # Select step
+ select 'Male', from: 'Gender'
+ click_button 'next'
+
+ # Initials step
+ draw_canvas
+ click_button 'next'
+
+ # Image step
+ find('#dropzone').click
+ find('input[type="file"]', visible: false).attach_file(Rails.root.join('spec/fixtures/sample-image.png'))
+ click_button 'next'
+
+ # File step
+ find('#dropzone').click
+ find('input[type="file"]', visible: false).attach_file(Rails.root.join('spec/fixtures/sample-document.pdf'))
+ click_button 'next'
+
+ # Cell step
+ fill_in 'Cell code', with: '123'
+ click_on 'Complete'
+
+ expect(page).to have_button('Download')
+ expect(page).to have_content('Document has been signed!')
+
+ submitter = template.submissions.last.submitters.last
+
+ expect(submitter.email).to eq('john.dou@example.com')
+ expect(submitter.name).to eq('John Doe')
+ expect(submitter.phone).to eq('+17732298825')
+ expect(submitter.ip).to eq('127.0.0.1')
+ expect(submitter.ua).to be_present
+ expect(submitter.opened_at).to be_present
+ expect(submitter.completed_at).to be_present
+ expect(submitter.declined_at).to be_nil
+
+ expect(field_value(submitter, 'First Name')).to eq 'John'
+ expect(field_value(submitter, 'Birthday')).to eq 20.years.ago.strftime('%Y-%m-%d')
+ expect(field_value(submitter, 'Do you agree?')).to be_truthy
+ expect(field_value(submitter, 'First child')).to eq 'Boy'
+ expect(field_value(submitter, 'Signature')).to be_present
+ expect(field_value(submitter, 'House number')).to eq 123
+ expect(field_value(submitter, 'Colors')).to contain_exactly('Red', 'Blue')
+ expect(field_value(submitter, 'Gender')).to eq 'Male'
+ expect(field_value(submitter, 'Initials')).to be_present
+ expect(field_value(submitter, 'Avatar')).to be_present
+ expect(field_value(submitter, 'Attachment')).to be_present
+ expect(field_value(submitter, 'Cell code')).to eq '123'
+ end
+ # rubocop:enable RSpec/ExampleLength
end
context 'when the submitter form link is opened' do
@@ -848,6 +999,33 @@ RSpec.describe 'Signing Form' do
end
end
+ context 'when the template shared link is disabled' do
+ let(:template) do
+ create(:template, shared_link: false, account:, author:, only_field_types: %w[text])
+ end
+
+ context 'when user is logged in' do
+ before do
+ login_as author
+ visit start_form_path(slug: template.slug)
+ end
+
+ it 'shows a warning that the shared link is disabled and provides an option to enable it' do
+ expect(page).to have_content('Share link is currently disabled')
+ expect(page).to have_content(template.name)
+ expect(page).to have_button('Enable shared link')
+ end
+
+ it 'enables the shared link' do
+ expect do
+ click_button 'Enable shared link'
+ end.to change { template.reload.shared_link }.from(false).to(true)
+
+ expect(page).to have_content('You have been invited to submit a form')
+ end
+ end
+ end
+
it 'sends completed email' do
template = create(:template, account:, author:, only_field_types: %w[text signature])
submission = create(:submission, template:)
diff --git a/yarn.lock b/yarn.lock
index 8051ab58..75a1d1b2 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1035,22 +1035,22 @@
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
-"@eid-easy/eideasy-browser-client@2.104.1":
- version "2.104.1"
- resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-browser-client/-/eideasy-browser-client-2.104.1.tgz#e492e0fc8ef1ff470c66522d530d5636264f30b3"
- integrity sha512-d4fgqF5U+pWuPpfgbb/+BxI2CYThkbviAfl9NbLoKMOMO4bh7HZFxLdW5uU2O8yIeldGFunJWxEbMTLv/2PlTA==
+"@eid-easy/eideasy-browser-client@2.124.0":
+ version "2.124.0"
+ resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-browser-client/-/eideasy-browser-client-2.124.0.tgz#940ccb9d4d853f0bd32e49cc455f2c7b13f3bbd1"
+ integrity sha512-hZuUeg0CcyvgJSseRBQixRStAIr58bulmNcikcASBo6z8wv+/R8nAnUoE7qdNW1l4ZyYxLmVOwDs6+W+FHy6hQ==
dependencies:
- axios "1.7.8"
+ axios "1.8.2"
jsencrypt "3.2.1"
lodash "^4.17.21"
serialize-error "^9.1.1"
-"@eid-easy/eideasy-widget@^2.132.1":
- version "2.132.1"
- resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-widget/-/eideasy-widget-2.132.1.tgz#634c077c55d7e582846dbeae47f6f37796b76bd6"
- integrity sha512-bZNdKsxja4iIUm6B4x6pOyiBdoMNNUB3615oJgNUWallrfeiIbBQxLwG+m5nmivmHMgdaIQylmtfrhc6e7kgYA==
+"@eid-easy/eideasy-widget@^2.159.0":
+ version "2.159.0"
+ resolved "https://registry.yarnpkg.com/@eid-easy/eideasy-widget/-/eideasy-widget-2.159.0.tgz#f2291dad292bd5f7941496f0db0aa0a180226b6b"
+ integrity sha512-527uCNrN5MVY/PaOUoZ3J2XZ0C+xt6057sJ4xSO0/FPYj2cxOn+qyCJODQjOhjBL7GcnpShWPpYAfv1OIStYwQ==
dependencies:
- "@eid-easy/eideasy-browser-client" "2.104.1"
+ "@eid-easy/eideasy-browser-client" "2.124.0"
core-js "^3.8.3"
i18n-iso-countries "^6.7.0"
lodash.defaultsdeep "^4.6.1"
@@ -1914,10 +1914,10 @@ available-typed-arrays@^1.0.5:
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
-axios@1.7.8:
- version "1.7.8"
- resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e"
- integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==
+axios@1.8.2:
+ version "1.8.2"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.2.tgz#fabe06e241dfe83071d4edfbcaa7b1c3a40f7979"
+ integrity sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"