Compare commits

...

47 Commits

Author SHA1 Message Date
Alex Turchyn e5b1d94579 Merge from docusealco/wip 2025-09-22 13:11:28 +03:00
Pete Matsyburka 0b4754ca24 update email events index 2025-09-22 08:40:12 +03:00
Pete Matsyburka b3dc8d55be fix submission name 2025-09-19 21:36:05 +03:00
Pete Matsyburka e5ab7667b9 adjust verification step 2025-09-18 14:15:16 +03:00
Pete Matsyburka 2a4e6435f1 adjust api settings 2025-09-18 10:24:38 +03:00
Pete Matsyburka 804431c44a adjust account preferences 2025-09-18 10:05:04 +03:00
Alex Turchyn f3b26bf7a0 add tooltips to account preferences 2025-09-18 09:26:21 +03:00
Pete Matsyburka aa27d90017 update gem 2025-09-18 08:48:48 +03:00
Pete Matsyburka 0fa8cf2dd0 fix result generatrion 2025-09-18 08:33:34 +03:00
Pete Matsyburka 634b5c37ba fix form fields import 2025-09-17 13:26:58 +03:00
Pete Matsyburka 6e16f81fc6 add folder filter 2025-09-16 16:19:36 +03:00
Pete Matsyburka ffc4024f70 rubocop 2025-09-16 13:03:02 +03:00
Alex Turchyn a6981185b2 Merge from docusealco/wip 2025-09-15 13:13:58 +03:00
Pete Matsyburka 0361fabb66 fix combined download 2025-09-15 11:39:43 +03:00
Pete Matsyburka 04e7f101be add lock events 2025-09-15 10:10:39 +03:00
Pete Matsyburka 86d680cfdf fix variables schema 2025-09-15 08:57:54 +03:00
Pete Matsyburka 7bc2152057 expire disk storage urls 2025-09-13 18:10:47 +03:00
Pete Matsyburka 74ed9a5040 update docs 2025-09-13 11:23:34 +03:00
Alex Turchyn 30115fc0dc adjust login OTP form 2025-09-13 09:34:50 +03:00
Pete Matsyburka 8e8e5e0e29 add template variables 2025-09-12 18:22:45 +03:00
Alex Turchyn b58ce1b571 add translations 2025-09-10 08:25:36 +03:00
Pete Matsyburka df5c4e4210 fix email 2fa resubmit 2025-09-09 19:29:09 +03:00
Pete Matsyburka ba2e0999f1 add with file links option 2025-09-09 09:53:21 +03:00
Pete Matsyburka a1f5dd08c7 fix typo 2025-09-08 14:42:25 +03:00
Alex Turchyn c1123fef63 Merge from docusealco/wip 2025-09-08 13:05:04 +03:00
Pete Matsyburka 4dc6149530 add reset password link 2025-09-06 14:46:51 +03:00
Pete Matsyburka 1245ff2cce disable edit password 2025-09-06 10:41:51 +03:00
Pete Matsyburka 284204fd78 refactor, use invalid class 2025-09-06 10:18:01 +03:00
Alex Turchyn f7be74eb73 improve user password reset 2025-09-06 09:21:59 +03:00
Pete Matsyburka aeea619059 skip annotation 2025-09-05 15:30:58 +03:00
Pete Matsyburka ea2b7f20e7 count segments 2025-09-05 14:59:20 +03:00
Alex Turchyn f40f1d25de reveal API key with user password 2025-09-05 09:58:16 +03:00
Pete Matsyburka c04bb2d7cf allow to disable user 2fa 2025-09-04 21:19:43 +03:00
Pete Matsyburka 4c1ccd65bf fix condition field value 2025-09-04 18:16:00 +03:00
Pete Matsyburka 54e064b0fc fix fields sort 2025-09-04 16:13:29 +03:00
Pete Matsyburka 9a8b72883c fix relation 2025-09-03 12:50:16 +03:00
Pete Matsyburka 5d75ee2e47 filter export 2025-09-02 21:17:25 +03:00
Pete Matsyburka 7357fa4871 adjust settings nav links 2025-09-01 18:34:23 +03:00
Pete Matsyburka f6850b5427 add completed submitters verification method 2025-09-01 14:35:56 +03:00
Pete Matsyburka 1e9a181e60 fix typo 2025-09-01 14:01:40 +03:00
Pete Matsyburka 7224a1ccec adjust expire link 2025-09-01 13:45:28 +03:00
Alex Turchyn 9b935a8180 Merge from docusealco/wip 2025-09-01 12:47:09 +03:00
Pete Matsyburka c4a693846e expire download links 2025-09-01 11:59:02 +03:00
Pete Matsyburka 02c7cdcd97 fix rotate 2025-08-28 17:43:39 +03:00
Pete Matsyburka 36bee92e8e fix condition remove 2025-08-28 10:31:19 +03:00
Pete Matsyburka 6542804f44 fix markdown 2025-08-27 22:01:49 +03:00
Pete Matsyburka d805fd614c private template placeholder 2025-08-26 12:38:41 +03:00
102 changed files with 9512 additions and 682 deletions
+3
View File
@@ -68,6 +68,9 @@ RSpec/ExampleLength:
RSpec/MultipleMemoizedHelpers:
Max: 15
RSpec/AnyInstance:
Enabled: false
Metrics/BlockNesting:
Max: 5
+1 -1
View File
@@ -461,7 +461,7 @@ GEM
actionpack (>= 5.2)
railties (>= 5.2)
retriable (3.1.2)
rexml (3.4.0)
rexml (3.4.4)
rotp (6.3.0)
rouge (4.5.2)
rqrcode (2.2.0)
@@ -15,6 +15,7 @@ class AccountConfigsController < ApplicationController
AccountConfig::ESIGNING_PREFERENCE_KEY,
AccountConfig::FORM_WITH_CONFETTI_KEY,
AccountConfig::DOWNLOAD_LINKS_AUTH_KEY,
AccountConfig::DOWNLOAD_LINKS_EXPIRE_KEY,
AccountConfig::FORCE_SSO_AUTH_KEY,
AccountConfig::FLATTEN_RESULT_PDF_KEY,
AccountConfig::ENFORCE_SIGNING_ORDER_KEY,
@@ -13,7 +13,7 @@ module Api
def show
blob_uuid, purp, exp = ApplicationRecord.signed_id_verifier.verified(params[:signed_uuid])
if blob_uuid.blank? || (purp.present? && purp != 'blob') || (exp && exp < Time.current.to_i)
if blob_uuid.blank? || purp != 'blob'
Rollbar.error('Blob not found') if defined?(Rollbar)
return head :not_found
@@ -24,8 +24,9 @@ module Api
attachment = blob.attachments.take
@record = attachment.record
@record = @record.record if @record.is_a?(ActiveStorage::Attachment)
authorization_check!(attachment) if exp.blank?
authorization_check!(attachment, @record, exp)
if request.headers['Range'].present?
send_blob_byte_range_data blob, request.headers['Range']
@@ -41,16 +42,22 @@ module Api
private
def authorization_check!(attachment)
is_authorized = attachment.name.in?(%w[logo preview_images]) ||
(current_user && attachment.record.account.id == current_user.account_id) ||
(current_user && !Docuseal.multitenant? && current_user.role == 'superadmin') ||
!attachment.record.account.account_configs
.find_or_initialize_by(key: AccountConfig::DOWNLOAD_LINKS_AUTH_KEY).value
def authorization_check!(attachment, record, exp)
return if attachment.name == 'logo'
return if exp.to_i >= Time.current.to_i
return if current_user && current_ability.can?(:read, record)
return if is_authorized
if exp.blank?
configs = record.account.account_configs.where(key: [AccountConfig::DOWNLOAD_LINKS_AUTH_KEY,
AccountConfig::DOWNLOAD_LINKS_EXPIRE_KEY])
Rollbar.error('Blob aunauthorized') if defined?(Rollbar)
require_auth = configs.any? { |c| c.key == AccountConfig::DOWNLOAD_LINKS_AUTH_KEY && c.value }
require_ttl = configs.none? { |c| c.key == AccountConfig::DOWNLOAD_LINKS_EXPIRE_KEY && c.value == false }
return if !require_ttl && !require_auth
end
Rollbar.error('Blob unauthorized') if defined?(Rollbar)
raise CanCan::AccessDenied
end
@@ -18,12 +18,14 @@ module Api
field: :completed_at
)
expires_at = Accounts.link_expires_at(current_account)
render json: {
data: submitters.map do |s|
{
event_type: 'form.completed',
timestamp: s.completed_at,
data: Submitters::SerializeForWebhook.call(s)
data: Submitters::SerializeForWebhook.call(s, expires_at:)
}
end,
pagination: {
@@ -34,10 +34,12 @@ module Api
associations: [:blob]
).call
expires_at = Accounts.link_expires_at(current_account)
render json: {
id: @submission.id,
documents: documents.map do |attachment|
{ name: attachment.filename.base, url: ActiveStorage::Blob.proxy_url(attachment.blob) }
{ name: attachment.filename.base, url: ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:) }
end
}
end
@@ -14,16 +14,19 @@ module Api
:created_by_user, :submission_events,
template: :folder,
submitters: { documents_attachments: :blob, attachments_attachments: :blob },
audit_trail_attachment: :blob
audit_trail_attachment: :blob,
combined_document_attachment: :blob
),
field: :completed_at)
expires_at = Accounts.link_expires_at(current_account)
render json: {
data: submissions.map do |s|
{
event_type: 'submission.completed',
timestamp: s.completed_at,
data: Submissions::SerializeForApi.call(s, s.submitters)
data: Submissions::SerializeForApi.call(s, s.submitters, expires_at:)
}
end,
pagination: {
@@ -18,10 +18,12 @@ module Api
combined_document_attachment: :blob,
audit_trail_attachment: :blob))
expires_at = Accounts.link_expires_at(current_account)
render json: {
data: submissions.map do |s|
Submissions::SerializeForApi.call(s, s.submitters, params,
with_events: false, with_documents: false, with_values: false)
with_events: false, with_documents: false, with_values: false, expires_at:)
end,
pagination: {
count: submissions.size,
@@ -41,7 +43,7 @@ module Api
end
if @submission.audit_trail_attachment.blank? && submitters.all?(&:completed_at?)
@submission.audit_trail_attachment = Submissions::GenerateAuditTrail.call(@submission)
@submission.audit_trail_attachment = Submissions::EnsureAuditGenerated.call(@submission)
end
render json: Submissions::SerializeForApi.call(@submission, submitters, params)
@@ -182,6 +184,7 @@ module Api
:send_email, :send_sms, :bcc_completed, :completed_redirect_url, :reply_to, :go_to_last,
:require_phone_2fa, :expire_at, :name,
{
variables: {},
message: %i[subject body],
submitters: [[:send_email, :send_sms, :completed_redirect_url, :uuid, :name, :email, :role,
:completed, :phone, :application_key, :external_id, :reply_to, :go_to_last,
+3 -1
View File
@@ -14,9 +14,11 @@ module Api
documents_attachments: :blob, attachments_attachments: :blob)
)
expires_at = Accounts.link_expires_at(current_account)
render json: {
data: submitters.map do |s|
Submitters::SerializeForApi.call(s, with_template: true, with_events: true, params:)
Submitters::SerializeForApi.call(s, with_template: true, with_events: true, params:, expires_at:)
end,
pagination: {
count: submitters.size,
@@ -26,13 +26,15 @@ module Api
original_template: @template,
documents: params[:documents])
Templates.maybe_assign_access(cloned_template)
cloned_template.save!
WebhookUrls.enqueue_events(cloned_template, 'template.created')
SearchEntries.enqueue_reindex(cloned_template)
render json: Templates::SerializeForApi.call(cloned_template, schema_documents)
render json: Templates::SerializeForApi.call(cloned_template, schema_documents:)
end
end
end
+6 -5
View File
@@ -24,13 +24,14 @@ module Api
name: :preview_images)
.preload(:blob)
expires_at = Accounts.link_expires_at(current_account)
render json: {
data: templates.map do |t|
Templates::SerializeForApi.call(
t,
schema_documents.select { |e| e.record_id == t.id },
preview_image_attachments
)
Templates::SerializeForApi.call(t,
schema_documents: schema_documents.select { |e| e.record_id == t.id },
preview_image_attachments:,
expires_at:)
end,
pagination: {
count: templates.size,
+10
View File
@@ -1,6 +1,10 @@
# frozen_string_literal: true
class PasswordsController < Devise::PasswordsController
# rubocop:disable Rails/LexicallyScopedActionFilter
skip_before_action :require_no_authentication, only: %i[edit update]
# rubocop:enable Rails/LexicallyScopedActionFilter
class Current < ActiveSupport::CurrentAttributes
attribute :user
end
@@ -16,4 +20,10 @@ class PasswordsController < Devise::PasswordsController
Current.user = resource
end
end
private
def after_resetting_password_path_for(_)
new_session_path(resource_name)
end
end
+2 -2
View File
@@ -16,7 +16,7 @@ class ProfileController < ApplicationController
end
def update_password
if current_user.update(password_params)
if current_user.update_with_password(password_params)
bypass_sign_in(current_user)
redirect_to settings_profile_index_path, notice: I18n.t('password_has_been_changed')
else
@@ -31,6 +31,6 @@ class ProfileController < ApplicationController
end
def password_params
params.require(:user).permit(:password, :password_confirmation)
params.require(:user).permit(:password, :password_confirmation, :current_password)
end
end
@@ -0,0 +1,21 @@
# frozen_string_literal: true
class RevealAccessTokenController < ApplicationController
def show
authorize!(:manage, current_user.access_token)
end
def create
authorize!(:manage, current_user.access_token)
if current_user.valid_password?(params[:password])
render turbo_stream: turbo_stream.replace(:access_token_container,
partial: 'reveal_access_token/access_token',
locals: { token: current_user.access_token.token })
else
render turbo_stream: turbo_stream.replace(:modal, template: 'reveal_access_token/show',
locals: { error_message: I18n.t('wrong_password') }),
status: :unprocessable_content
end
end
end
@@ -70,7 +70,7 @@ class SubmissionsDownloadController < ApplicationController
return if submitter.submission.submitters.order(:completed_at).last != submitter
attachment = submitter.submission.combined_document_attachment
attachment ||= Submissions::GenerateCombinedAttachment.call(submitter)
attachment ||= Submissions::EnsureCombinedGenerated.call(submitter)
filename_format = AccountConfig.find_or_initialize_by(account_id: submitter.account_id,
key: AccountConfig::DOCUMENT_FILENAME_FORMAT_KEY)&.value
@@ -10,11 +10,16 @@ class SubmissionsExportController < ApplicationController
attachments_attachments: :blob })
.order(id: :asc)
submissions = Submissions.search(current_user, submissions, params[:q], search_values: true)
submissions = Submissions::Filter.call(submissions, current_user, params)
expires_at = Accounts.link_expires_at(current_account)
if params[:format] == 'csv'
send_data Submissions::GenerateExportFiles.call(submissions, format: params[:format]),
send_data Submissions::GenerateExportFiles.call(submissions, format: params[:format], expires_at:),
filename: "#{@template.name}.csv"
elsif params[:format] == 'xlsx'
send_data Submissions::GenerateExportFiles.call(submissions, format: params[:format]),
send_data Submissions::GenerateExportFiles.call(submissions, format: params[:format], expires_at:),
filename: "#{@template.name}.xlsx"
end
end
@@ -3,6 +3,7 @@
class SubmissionsFiltersController < ApplicationController
ALLOWED_NAMES = %w[
author
folder
completed_at
status
created_at
@@ -17,6 +17,8 @@ class TemplatesCloneAndReplaceController < ApplicationController
documents = Templates::ReplaceAttachments.call(cloned_template, params, extract_fields: true)
Templates.maybe_assign_access(cloned_template)
cloned_template.save!
Templates::CloneAttachments.call(template: cloned_template, original_template: @template,
+2
View File
@@ -69,6 +69,8 @@ class TemplatesController < ApplicationController
@template.account = current_account
end
Templates.maybe_assign_access(@template)
if @template.save
Templates::CloneAttachments.call(template: @template, original_template: @base_template) if @base_template
@@ -46,6 +46,8 @@ class TemplatesUploadsController < ApplicationController
template.folder = TemplateFolders.find_or_create_by_name(current_user, params[:folder_name])
template.name = File.basename((url_params || params)[:files].first.original_filename, '.*')
Templates.maybe_assign_access(template)
template.save!
template
+3 -2
View File
@@ -30,6 +30,7 @@ class UsersController < ApplicationController
return render turbo_stream: turbo_stream.replace(:modal, template: 'users/new'), status: :unprocessable_content
end
@user.password = SecureRandom.hex if @user.password.blank?
@user.role = User::ADMIN_ROLE unless role_valid?(@user.role)
if @user.save
@@ -54,7 +55,7 @@ class UsersController < ApplicationController
@user.account = account
end
if @user.update(attrs.except(current_user == @user ? :role : nil))
if @user.update(attrs.except(*(current_user == @user ? %i[password otp_required_for_login role] : %i[password])))
redirect_back fallback_location: settings_users_path, notice: I18n.t('user_has_been_updated')
else
render turbo_stream: turbo_stream.replace(:modal, template: 'users/edit'), status: :unprocessable_content
@@ -83,7 +84,7 @@ class UsersController < ApplicationController
def user_params
if params.key?(:user)
permitted_params = %i[email first_name last_name password archived_at]
permitted_params = %i[email first_name last_name password archived_at otp_required_for_login]
permitted_params << :role if role_valid?(params.dig(:user, :role))
@@ -0,0 +1,20 @@
# frozen_string_literal: true
class UsersSendResetPasswordController < ApplicationController
load_and_authorize_resource :user
LIMIT_DURATION = 10.minutes
def update
authorize!(:manage, @user)
if @user.reset_password_sent_at && @user.reset_password_sent_at > LIMIT_DURATION.ago
redirect_back fallback_location: settings_users_path, notice: I18n.t('email_has_been_sent_already')
else
@user.send_reset_password_instructions
redirect_back fallback_location: settings_users_path,
notice: I18n.t('an_email_with_password_reset_instructions_has_been_sent')
end
end
end
+4
View File
@@ -4,6 +4,10 @@ export default class extends HTMLElement {
this.interval = setInterval(() => {
this.querySelector('form').requestSubmit()
}, parseInt(this.dataset.interval))
} else if (this.dataset.on) {
this.lastElementChild.addEventListener(this.dataset.on, () => {
this.lastElementChild.form.requestSubmit()
})
} else {
this.querySelector('form').requestSubmit()
}
+5 -1
View File
@@ -1015,7 +1015,11 @@ export default {
const aArea = (fieldAreasIndex[aField.uuid] ||= [...(aField.areas || [])].sort(sortArea)[0])
const bArea = (fieldAreasIndex[bField.uuid] ||= [...(bField.areas || [])].sort(sortArea)[0])
return sortArea(aArea, bArea)
if (aArea && bArea) {
return sortArea(aArea, bArea)
} else {
return 0
}
})
}
@@ -60,7 +60,15 @@ export default {
return ['UL', 'I', 'EM', 'B', 'STRONG', 'P']
},
dom () {
const text = this.string.replace(/(?<!\(\s*)(https?:\/\/[^\s)]+)(?!\s*\))/g, (url) => `[${url}](${url})`)
const linkParts = this.string.split(/(https?:\/\/[^\s)]+)/g)
const text = linkParts.map((part, index) => {
if (part.match(/^https?:\/\//) && !linkParts[index - 1]?.match(/\(\s*$/) && !linkParts[index + 1]?.match(/^\s*\)/)) {
return `[${part}](${part})`
} else {
return part
}
}).join('')
return new DOMParser().parseFromString(snarkdown(text.replace(/\n/g, '<br>')), 'text/html')
}
@@ -156,6 +156,10 @@ export default {
}).then(async (resp) => {
this.eidEasyData = await resp.json()
if (this.eidEasyData.check_completed) {
this.$emit('submit')
}
if (this.eidEasyData.available_methods[0] === 'itsme-qes-signature' &&
this.eidEasyData.available_methods.length === 1) {
const redirectUrl = new URL('https://id.eideasy.com/sign_contract_external')
@@ -179,15 +183,23 @@ export default {
})
},
async submit () {
return fetch(this.baseUrl + '/api/identity_verification', {
const resp = await fetch(this.baseUrl + '/api/identity_verification', {
method: 'POST',
body: JSON.stringify({
submitter_slug: this.submitterSlug
}),
headers: { 'Content-Type': 'application/json' }
}).then(async (resp) => {
return resp
})
if (resp.status === 404) {
throw new Error('Verification not completed yet')
}
if (resp.ok) {
return resp
} else {
throw new Error('Verification failed')
}
}
}
}
+25 -11
View File
@@ -1265,24 +1265,31 @@ export default {
if (!field.areas.length) {
this.template.fields.splice(this.template.fields.indexOf(field), 1)
this.template.fields.forEach((f) => {
(f.conditions || []).forEach((c) => {
this.removeFieldConditions(field)
}
this.save()
},
removeFieldConditions (field) {
this.template.fields.forEach((f) => {
if (f.conditions) {
f.conditions.forEach((c) => {
if (c.field_uuid === field.uuid) {
f.conditions.splice(f.conditions.indexOf(c), 1)
}
})
})
}
})
this.template.schema.forEach((item) => {
(item.conditions || []).forEach((c) => {
this.template.schema.forEach((item) => {
if (item.conditions) {
item.conditions.forEach((c) => {
if (c.field_uuid === field.uuid) {
item.conditions.splice(item.conditions.indexOf(c), 1)
}
})
})
}
this.save()
}
})
},
pasteField () {
const field = this.template.fields.find((f) => f.areas?.includes(this.copiedArea))
@@ -1715,8 +1722,15 @@ export default {
})
})
this.template.fields =
this.template.fields.filter((f) => !removedFieldUuids.includes(f.uuid) || f.areas?.length)
this.template.fields = this.template.fields.reduce((acc, f) => {
if (removedFieldUuids.includes(f.uuid) && !f.areas?.length) {
this.removeFieldConditions(f)
} else {
acc.push(f)
}
return acc
}, [])
this.save()
}
+10 -3
View File
@@ -14,10 +14,10 @@ class ProcessSubmitterCompletionJob
if is_all_completed && submitter.completed_at == submitter.submission.submitters.maximum(:completed_at)
if submitter.submission.account.account_configs.exists?(key: AccountConfig::COMBINE_PDF_RESULT_KEY, value: true)
Submissions::GenerateCombinedAttachment.call(submitter)
Submissions::EnsureCombinedGenerated.call(submitter)
end
Submissions::GenerateAuditTrail.call(submitter.submission)
Submissions::EnsureAuditGenerated.call(submitter.submission)
enqueue_completed_emails(submitter)
end
@@ -38,12 +38,19 @@ class ProcessSubmitterCompletionJob
submission = submitter.submission
complete_verification_events, sms_events =
submitter.submission_events.where(event_type: %i[send_sms send_2fa_sms complete_verification])
.partition { |e| e.event_type == 'complete_verification' }
complete_verification_event = complete_verification_events.first
completed_submitter.assign_attributes(
submission_id: submitter.submission_id,
account_id: submission.account_id,
template_id: submission.template_id,
source: submission.source,
sms_count: submitter.submission_events.where(event_type: %w[send_sms send_2fa_sms]).count,
sms_count: sms_events.sum { |e| e.data['segments'] || 1 },
verification_method: complete_verification_event&.data&.dig('method'),
completed_at: submitter.completed_at
)
+2
View File
@@ -38,9 +38,11 @@ class AccountConfig < ApplicationRecord
FORM_PREFILL_SIGNATURE_KEY = 'form_prefill_signature'
ESIGNING_PREFERENCE_KEY = 'esigning_preference'
DOWNLOAD_LINKS_AUTH_KEY = 'download_links_auth'
DOWNLOAD_LINKS_EXPIRE_KEY = 'download_links_expire'
FORCE_SSO_AUTH_KEY = 'force_sso_auth'
FLATTEN_RESULT_PDF_KEY = 'flatten_result_pdf'
WITH_SIGNATURE_ID = 'with_signature_id'
WITH_FILE_LINKS_KEY = 'with_file_links'
WITH_SIGNATURE_ID_REASON_KEY = 'with_signature_id_reason'
WITH_AUDIT_VALUES_KEY = 'with_audit_values'
WITH_SUBMITTER_TIMEZONE_KEY = 'with_submitter_timezone'
+12 -11
View File
@@ -4,16 +4,17 @@
#
# Table name: completed_submitters
#
# id :bigint not null, primary key
# completed_at :datetime not null
# sms_count :integer not null
# source :string not null
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
# submission_id :bigint not null
# submitter_id :bigint not null
# template_id :bigint
# id :bigint not null, primary key
# completed_at :datetime not null
# sms_count :integer not null
# source :string not null
# verification_method :string
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
# submission_id :bigint not null
# submitter_id :bigint not null
# template_id :bigint
#
# Indexes
#
@@ -29,5 +30,5 @@ class CompletedSubmitter < ApplicationRecord
has_many :completed_documents, dependent: :destroy,
primary_key: :submitter_id,
foreign_key: :submitter_id,
inverse_of: :submitter
inverse_of: :completed_submitter
end
+1 -1
View File
@@ -20,7 +20,7 @@
#
# index_email_events_on_account_id_and_event_datetime (account_id,event_datetime)
# index_email_events_on_email (email)
# index_email_events_on_email_event_types (email) WHERE ((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]))
# index_email_events_on_email_event_types (email) WHERE ((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'permanent_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]))
# index_email_events_on_emailable (emailable_type,emailable_id)
# index_email_events_on_message_id (message_id)
#
+25
View File
@@ -0,0 +1,25 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: lock_events
#
# id :bigint not null, primary key
# event_name :string not null
# key :string not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_lock_events_on_event_name_and_key (event_name,key) UNIQUE WHERE ((event_name)::text = ANY ((ARRAY['start'::character varying, 'complete'::character varying])::text[]))
# index_lock_events_on_key (key)
#
class LockEvent < ApplicationRecord
enum :event_name, {
complete: 'complete',
fail: 'fail',
start: 'start',
retry: 'retry'
}, scope: false
end
+8 -4
View File
@@ -15,6 +15,8 @@
# template_fields :text
# template_schema :text
# template_submitters :text
# variables :text
# variables_schema :text
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
@@ -50,6 +52,8 @@ class Submission < ApplicationRecord
serialize :template_fields, coder: JSON
serialize :template_schema, coder: JSON
serialize :template_submitters, coder: JSON
serialize :variables_schema, coder: JSON
serialize :variables, coder: JSON
serialize :preferences, coder: JSON
attribute :source, :string, default: 'link'
@@ -114,16 +118,16 @@ class Submission < ApplicationRecord
@fields_uuid_index ||= (template_fields || template.fields).index_by { |f| f['uuid'] }
end
def audit_trail_url
def audit_trail_url(expires_at: nil)
return if audit_trail.blank?
ActiveStorage::Blob.proxy_url(audit_trail.blob)
ActiveStorage::Blob.proxy_url(audit_trail.blob, expires_at:)
end
alias audit_log_url audit_trail_url
def combined_document_url
def combined_document_url(expires_at: nil)
return if combined_document.blank?
ActiveStorage::Blob.proxy_url(combined_document.blob)
ActiveStorage::Blob.proxy_url(combined_document.blob, expires_at:)
end
end
+18 -16
View File
@@ -4,22 +4,23 @@
#
# Table name: templates
#
# id :bigint not null, primary key
# archived_at :datetime
# fields :text not null
# name :string not null
# preferences :text not null
# schema :text not null
# shared_link :boolean default(FALSE), not null
# slug :string not null
# source :text not null
# submitters :text not null
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
# author_id :bigint not null
# external_id :string
# folder_id :bigint not null
# id :bigint not null, primary key
# archived_at :datetime
# fields :text not null
# name :string not null
# preferences :text not null
# schema :text not null
# shared_link :boolean default(FALSE), not null
# slug :string not null
# source :text not null
# submitters :text not null
# variables_schema :text
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
# author_id :bigint not null
# external_id :string
# folder_id :bigint not null
#
# Indexes
#
@@ -57,6 +58,7 @@ class Template < ApplicationRecord
serialize :preferences, coder: JSON
serialize :fields, coder: JSON
serialize :variables_schema, coder: JSON
serialize :schema, coder: JSON
serialize :submitters, coder: JSON
+120 -53
View File
@@ -50,11 +50,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('force_2fa_with_authenticator_app') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('force_2fa_with_authenticator_app') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -62,11 +67,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('add_signature_id_to_the_documents') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value, onchange: 'this.form.requestSubmit()', disabled: can?(:manage, :cfr) %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('add_signature_id_to_the_documents') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value, disabled: can?(:manage, :cfr) %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -74,11 +84,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('require_signing_reason') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value, onchange: 'this.form.requestSubmit()', disabled: can?(:manage, :cfr) %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('require_signing_reason') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value, disabled: can?(:manage, :cfr) %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -86,11 +101,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('allow_typed_text_signatures') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('allow_typed_text_signatures') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -98,11 +118,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('allow_to_resubmit_completed_forms') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('allow_to_resubmit_completed_forms') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -110,11 +135,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('allow_to_decline_documents') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('allow_to_decline_documents') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -122,11 +152,33 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('remember_and_pre_fill_signatures') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('remember_and_pre_fill_signatures') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false %>
</submit-form>
</div>
<% end %>
<% end %>
<% account_config = AccountConfig.find_or_initialize_by(account: current_account, key: AccountConfig::DOWNLOAD_LINKS_EXPIRE_KEY) %>
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('expirable_file_download_links') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value != false %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -134,11 +186,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('require_authentication_for_file_download_links') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('require_authentication_for_file_download_links') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('require_authentication_with_user_login_or_api_key_to_access_the_document_download_links') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -146,11 +203,16 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('combine_completed_documents_and_audit_log') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('combine_completed_documents_and_audit_log') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value %>
</submit-form>
</div>
<% end %>
<% end %>
@@ -159,22 +221,27 @@
<% if can?(:manage, account_config) %>
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
<%= f.hidden_field :key %>
<div class="flex items-center justify-between py-2.5">
<span>
<%= t('always_enforce_signing_order') %>
</span>
<%= f.check_box :value, class: 'toggle', checked: account_config.value, onchange: 'this.form.requestSubmit()' %>
<div class="flex items-center justify-between gap-4 py-2.5">
<div class="flex items-center space-x-1">
<span class="text-left"><%= t('always_enforce_signing_order') %></span>
<span class="tooltip tooltip-top flex cursor-pointer" data-tip="<%= t('make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing') %>">
<%= svg_icon('info_circle', class: 'hidden md:inline-block w-4 h-4 shrink-0') %>
</span>
</div>
<submit-form data-on="change" class="flex">
<%= f.check_box :value, class: 'toggle', checked: account_config.value %>
</submit-form>
</div>
<% end %>
<% end %>
<% end %>
<%= render 'extra_preferences' %>
<% if !Docuseal.multitenant? && SearchEntry.table_exists? && (!Docuseal.fulltext_search? || params[:reindex] == 'true') && can?(:manage, EncryptedConfig) %>
<div class="flex items-center justify-between py-2.5">
<div class="flex items-center justify-between gap-4 py-2.5">
<span>
Efficient search with search index
<%= t('efficient_search_with_search_index') %>
</span>
<%= button_to params[:reindex] == 'true' ? 'Reindex' : 'Build Search Index', settings_search_entries_reindex_index_path, method: :post, class: 'btn btn-sm btn-neutral text-white px-4' %>
<%= button_to params[:reindex] == 'true' ? t('reindex') : t('build_search_index'), settings_search_entries_reindex_index_path, method: :post, class: 'btn btn-sm btn-neutral text-white px-4' %>
</div>
<% end %>
</div>
+18 -7
View File
@@ -11,10 +11,21 @@
<div class="flex flex-col md:flex-row gap-4">
<div class="flex w-full space-x-4">
<% token = current_user.access_token.token %>
<masked-input class="block w-full" data-token="<%= token %>">
<input id="api_key" type="text" value="<%= token.sub(token[5..], '*' * token[5..].size) %>" class="input font-mono input-bordered w-full" autocomplete="off" readonly>
</masked-input>
<%= render 'shared/clipboard_copy', icon: 'copy', text: token, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
<% obscured_token = current_user.access_token.token.sub(token[5..], '*' * token[5..].size) %>
<% if current_account.testing? %>
<masked-input class="block w-full" data-token="<%= token %>">
<input id="api_key" type="text" value="<%= obscured_token %>" class="input font-mono input-bordered w-full" autocomplete="off" readonly>
</masked-input>
<%= render 'shared/clipboard_copy', icon: 'copy', text: token, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
<% else %>
<a id="access_token_container" href="<%= settings_reveal_access_token_path %>" data-turbo-frame="modal" class="flex w-full space-x-4">
<input id="api_key" type="text" value="<%= obscured_token %>" class="input font-mono input-bordered w-full" autocomplete="off" readonly>
<div class="base-button">
<%= svg_icon('copy', class: 'w-6 h-6 text-white') %>
<span class="hidden md:inline"><%= t('copy') %></span>
</div>
</a>
<% end %>
</div>
<%= button_to button_title(title: t('rotate'), disabled_with: t('rotate'), icon: svg_icon('reload', class: 'w-6 h-6')), settings_api_index_path, class: 'white-button w-full', data: { turbo_confirm: t('remove_existing_api_token_and_generated_a_new_one_are_you_sure_') } %>
</div>
@@ -35,7 +46,7 @@
<div class="collapse-content" style="display: inherit">
<div class="mockup-code overflow-hidden">
<% text = capture do %>curl --location '<%= api_submissions_url %>' \
--header 'X-Auth-Token: <%= current_user.access_token.token %>' \
--header 'X-Auth-Token: API_TOKEN' \
--data-raw '{
"template_id": <%= current_account.templates.last&.id || 1 %>,
"submitters": [
@@ -71,7 +82,7 @@
<div class="collapse-content" style="display: inherit">
<div class="mockup-code overflow-hidden">
<% text = capture do %>curl --location '<%= api_submissions_emails_url %>' \
--header 'X-Auth-Token: <%= current_user.access_token.token %>' \
--header 'X-Auth-Token: API_TOKEN' \
--data-raw '{
"template_id": <%= current_account.templates.last&.id || 1 %>,
"emails": "<%= current_user.email.sub('@', '+test@') %>, <%= current_user.email.sub('@', '+test2@') %>"
@@ -97,7 +108,7 @@
<div class="collapse-content" style="display: inherit">
<div class="mockup-code overflow-hidden">
<% text = capture do %>curl '<%= api_template_url(current_account.templates&.last || 1) %>' \
--header 'X-Auth-Token: <%= current_user.access_token.token %>'<% end.to_str %>
--header 'X-Auth-Token: API_TOKEN'<% end.to_str %>
<span class="top-0 right-0 absolute">
<%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
</span>
+16 -9
View File
@@ -2,15 +2,22 @@
<h1 class="text-4xl font-bold text-center mt-8">
<%= t('sign_in') %>
</h1>
<%= form_for(resource, as: resource_name, html: { class: 'space-y-6' }, data: { turbo: params[:redir].blank? }, url: session_path(resource_name)) do |f| %>
<%= f.hidden_field :email %>
<%= f.hidden_field :password %>
<% if params[:redir].present? %>
<%= hidden_field_tag :redir, params[:redir] %>
<% end %>
<%= render 'otp_form', **local_assigns %>
<div class="form-control">
<%= f.button button_title(title: t('sign_in'), disabled_with: t('signing_in')), class: 'base-button' %>
<% if local_assigns[:access_error].present? %>
<div class="alert mt-6">
<%= svg_icon('x_circle', class: 'w-6 h-6 text-red-500') %>
<span><%= local_assigns[:access_error] %></span>
</div>
<% else %>
<%= form_for(resource, as: resource_name, html: { class: 'space-y-6' }, data: { turbo: params[:redir].blank? }, url: session_path(resource_name)) do |f| %>
<%= f.hidden_field :email %>
<%= f.hidden_field :password %>
<% if params[:redir].present? %>
<%= hidden_field_tag :redir, params[:redir] %>
<% end %>
<%= render 'otp_form', **local_assigns %>
<div class="form-control">
<%= f.button button_title(title: t('sign_in'), disabled_with: t('signing_in')), class: 'base-button' %>
</div>
<% end %>
<% end %>
</div>
+21 -11
View File
@@ -54,19 +54,29 @@
<p class="text-2xl font-bold mt-8 mb-4">
<%= t('change_password') %>
</p>
<%= form_for current_user, url: update_password_settings_profile_index_path, method: :patch, html: { autocomplete: 'off', class: 'space-y-4' } do |f| %>
<div class="form-control">
<%= f.label :password, t('new_password'), class: 'label' %>
<%= f.password_field :password, autocomplete: 'off', class: 'base-input' %>
</div>
<div class="form-control">
<%= f.label :password_confirmation, t('confirm_password'), class: 'label' %>
<%= f.password_field :password_confirmation, autocomplete: 'off', class: 'base-input' %>
</div>
<div class="form-control pt-2">
<%= f.button button_title(title: t('update'), disabled_with: t('updating')), class: 'base-button' %>
<%= form_for current_user, url: update_password_settings_profile_index_path, method: :patch, html: { autocomplete: 'off' } do |f| %>
<%= f.label :password, t('new_password'), class: 'label' %>
<%= f.password_field :password, autocomplete: 'off', class: 'base-input peer w-full', required: true %>
<div class="<%= 'peer-invalid:hidden' if current_user.errors.blank? %> space-y-4 mt-4">
<div class="form-control">
<%= f.label :password_confirmation, t('confirm_password'), class: 'label' %>
<%= f.password_field :password_confirmation, autocomplete: 'off', class: 'base-input' %>
</div>
<div class="form-control">
<%= f.label :current_password, t('current_password'), class: 'label' %>
<%= f.password_field :current_password, autocomplete: 'current-password', class: 'base-input' %>
<% if Accounts.can_send_emails?(current_account) %>
<span class="label-text-alt mt-1">
<%= t('dont_remember_your_current_password_click_here_to_reset_it_html') %>
</span>
<% end %>
</div>
<div class="form-control">
<%= f.button button_title(title: t('update'), disabled_with: t('updating')), class: 'base-button' %>
</div>
</div>
<% end %>
<%= button_to nil, user_send_reset_password_path(current_user), id: 'resend_password_button', method: :put, class: 'hidden', data: { turbo_confirm: t('are_you_sure_') } %>
<p class="text-2xl font-bold mt-8 mb-4">
<%= t('two_factor_authentication') %>
</p>
@@ -0,0 +1,2 @@
<input id="api_key" type="text" value="<%= token %>" class="input font-mono input-bordered w-full" autocomplete="off" readonly>
<%= render 'shared/clipboard_copy', icon: 'copy', text: token, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
@@ -0,0 +1,14 @@
<%= render 'shared/turbo_modal', title: t('reveal_api_key') do %>
<%= form_tag settings_reveal_access_token_path, enctype: 'multipart/form-data', data: { turbo_frame: :_top } do %>
<div class="form-control">
<%= label_tag :password, t('enter_your_password_to_reveal_the_api_key'), class: 'label' %>
<%= password_field_tag :password, nil, class: 'base-input', autocomplete: 'current-password', required: true, autofocus: true, placeholder: t('password') %>
<% if local_assigns[:error_message].present? %>
<span class="label-text-alt text-red-400 mt-1"><%= local_assigns[:error_message] %></span>
<% end %>
</div>
<div class="form-control mt-4">
<%= submit_tag t('submit'), class: 'base-button' %>
</div>
<% end %>
<% end %>
+3 -1
View File
@@ -56,6 +56,8 @@
<%= link_to 'API', settings_api_index_path, class: 'text-base hover:bg-base-300' %>
</li>
<% end %>
<% end %>
<% if Docuseal.demo? || !Docuseal.multitenant? || (current_user != true_user && !current_account.testing?) %>
<% if can?(:read, WebhookUrl) %>
<li>
<%= link_to 'Webhooks', settings_webhooks_path, class: 'text-base hover:bg-base-300' %>
@@ -70,7 +72,7 @@
<% end %>
</li>
<% end %>
<% if !Docuseal.demo? && can?(:manage, EncryptedConfig) && (current_user != true_user || !current_account.testing?) %>
<% if !Docuseal.demo? && can?(:manage, EncryptedConfig) && (current_user == true_user || current_account.testing?) %>
<li>
<%= link_to Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}#{'/test' if current_account.testing?}/api") : "#{Docuseal::CONSOLE_URL}/on_premises", class: 'text-base hover:bg-base-300', data: { prefetch: false } do %>
<% if Docuseal.multitenant? %> API <% else %> <%= t('console') %> <% end %>
@@ -25,6 +25,7 @@
</div>
<%= form_for '', url: start_form_path(@template.slug), method: :put, html: { class: 'space-y-4', id: 'code_form' } do |f| %>
<div dir="auto" class="form-control !mt-0">
<%= f.hidden_field 'resubmit', value: params[:resubmit] %>
<%= f.hidden_field 'submitter[name]', value: params[:name] || @submitter&.name %>
<%= f.hidden_field 'submitter[email]', value: params[:email] || @submitter&.email %>
<%= f.hidden_field 'submitter[phone]', value: params[:phone] || @submitter&.phone %>
+1 -1
View File
@@ -109,7 +109,7 @@
<%= render 'submissions/annotation', annot: %>
<% end %>
<% fields_index.dig(document.uuid, index)&.each do |(area, field)| %>
<% value = values[field['uuid']].presence || (field['default_value'] != '{{date}}' && field['readonly'] == true && field['default_value'].present? ? Submitters::SubmitValues.template_default_value_for_submitter(field['default_value'], @submission.submitters.find { |e| e.uuid == field['submitter_uuid'] }, with_time: false) : nil) %>
<% value = values[field['uuid']].presence || (field['default_value'] != '{{date}}' && field['readonly'] == true && field['conditions'].blank? && field['default_value'].present? ? Submitters::SubmitValues.template_default_value_for_submitter(field['default_value'], @submission.submitters.find { |e| e.uuid == field['submitter_uuid'] }, with_time: false) : nil) %>
<% value ||= field['default_value'] if field['type'] == 'heading' %>
<% next if value.blank? %>
<% submitter = submitters_index[field['submitter_uuid']] %>
+3 -2
View File
@@ -1,6 +1,7 @@
<% filter_params = params.permit(:q, *Submissions::Filter::ALLOWED_PARAMS) %>
<%= render 'shared/turbo_modal', title: t('export'), close_after_submit: false do %>
<div class="space-y-2">
<%= button_to template_submissions_export_index_path(@template), params: { format: :xlsx }, method: :get, data: { turbo_frame: :_top } do %>
<%= button_to template_submissions_export_index_path(@template), params: { format: :xlsx, **filter_params }, method: :get, data: { turbo_frame: :_top } do %>
<div class="flex items-center p-4 text-left rounded-2xl border border-neutral-300 hover:cursor-pointer hover:bg-neutral hover:text-gray-300">
<div class="enabled">
<%= svg_icon('download', class: 'w-12 h-12 stroke-2 mr-2') %>
@@ -14,7 +15,7 @@
</div>
</div>
<% end %>
<%= button_to template_submissions_export_index_path(@template), params: { format: :csv }, method: :get, data: { turbo_frame: :_top } do %>
<%= button_to template_submissions_export_index_path(@template), params: { format: :csv, **filter_params }, method: :get, data: { turbo_frame: :_top } do %>
<div class="flex items-center text-left p-4 rounded-2xl border border-neutral-300 hover:cursor-pointer hover:bg-neutral hover:text-gray-300">
<div class="enabled">
<%= svg_icon('download', class: 'w-12 h-12 stroke-2 mr-2') %>
@@ -23,6 +23,12 @@
<span><%= t('status') %></span>
<% end %>
</li>
<li class="flex">
<%= link_to submissions_filter_path('folder', query_params.merge(path: url_for)), data: { turbo_frame: 'modal' } do %>
<%= svg_icon('folder', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
<span><%= t('folder') %></span>
<% end %>
</li>
<li class="flex">
<%= link_to submissions_filter_path('author', query_params.merge(path: url_for)), data: { turbo_frame: 'modal' } do %>
<%= svg_icon('user', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
@@ -0,0 +1,9 @@
<%= render 'filter_modal', title: t('folder'), default_params: params.permit(*(Submissions::Filter::ALLOWED_PARAMS - ['folder'])) do %>
<div class="space-y-2">
<div class="form-control mt-6">
<folder-autocomplete class="flex justify-between w-full">
<input id="folder_name" placeholder="<%= t('folder_name') %>" type="text" class="base-input w-full" name="folder" value="<%= params[:folder] %>" autocomplete="off">
</folder-autocomplete>
</div>
</div>
<% end %>
+1 -1
View File
@@ -13,7 +13,7 @@
<% if params[:q].present? || params[:status].present? || filter_params.present? || @pagy.pages > 1 %>
<%= render 'shared/search_input', title_selector: 'h2' %>
<% end %>
<%= link_to new_template_submissions_export_path(@template), class: 'hidden md:flex btn btn-ghost text-base', data: { turbo_frame: 'modal' } do %>
<%= link_to new_template_submissions_export_path(@template, params.permit(:q, *Submissions::Filter::ALLOWED_PARAMS)), class: 'hidden md:flex btn btn-ghost text-base', data: { turbo_frame: 'modal' } do %>
<%= svg_icon('download', class: 'w-6 h-6 stroke-2') %>
<span><%= t('export') %></span>
<% end %>
+29 -11
View File
@@ -1,22 +1,37 @@
<%= form_for user, html: { class: 'space-y-4' }, data: { turbo_frame: :_top } do |f| %>
<div class="space-y-2">
<div class="form-control">
<%= f.label :first_name, t('first_name'), class: 'label' %>
<%= f.text_field :first_name, required: true, class: 'base-input', dir: 'auto' %>
</div>
<div class="form-control">
<%= f.label :last_name, t('last_name'), class: 'label' %>
<%= f.text_field :last_name, required: true, class: 'base-input', dir: 'auto' %>
<div class="flex space-x-4">
<div class="w-full">
<%= f.label :first_name, t('first_name'), class: 'label' %>
<%= f.text_field :first_name, required: true, class: 'base-input w-full', dir: 'auto' %>
</div>
<div class="w-full">
<%= f.label :last_name, t('last_name'), class: 'label' %>
<%= f.text_field :last_name, required: true, class: 'base-input w-full', dir: 'auto' %>
</div>
</div>
<div class="form-control">
<%= f.label :email, t('email'), class: 'label' %>
<%= f.email_field :email, required: true, class: 'base-input' %>
<% if user.persisted? && Accounts.can_send_emails?(current_account) %>
<span class="label-text-alt mt-2 mx-1">
<%= t('click_here_to_send_a_reset_password_email_html') %>
</span>
<% end %>
</div>
<div class="form-control">
<%= f.label :password, t('password'), class: 'label' %>
<%= f.password_field :password, required: user.new_record?, class: 'base-input' %>
</div>
<% if user.new_record? && !Docuseal.multitenant? %>
<div class="form-control">
<%= f.label :password, t('password'), class: 'label' %>
<%= f.password_field :password, class: 'base-input' %>
</div>
<% end %>
<% if f.object != current_user %>
<% if user.otp_required_for_login %>
<div class="form-control">
<%= f.label :otp_required_for_login, t('two_factor_authentication'), class: 'label' %>
<%= f.select :otp_required_for_login, [[t('enabled'), true], [t('disabled'), false]], { include_blank: false }, class: 'base-select' %>
</div>
<% end %>
<%= render 'role_select', f: %>
<% end %>
<% if local_assigns[:extra_fields_html].present? %>
@@ -27,3 +42,6 @@
<%= f.button button_title, class: 'base-button' %>
</div>
<% end %>
<% if user.persisted? %>
<%= button_to nil, user_send_reset_password_path(user), id: 'resend_password_button', method: :put, class: 'hidden', data: { turbo_confirm: t('are_you_sure_'), turbo_frame: :_top } %>
<% end %>
+2 -2
View File
@@ -4,7 +4,7 @@
<div class="flex flex-col gap-2 md:flex-row md:justify-between md:items-center mb-4">
<h1 class="text-4xl font-bold">Webhook</h1>
<div class="flex flex-col gap-2 md:flex-row md:justify-between md:items-center">
<% if params[:action] == 'index' %>
<% if params[:action] == 'index' && (current_user == true_user || current_account.testing?) %>
<%= render 'shared/test_mode_toggle' %>
<% end %>
<% if @webhook_url.persisted? && params[:action] == 'index' %>
@@ -84,7 +84,7 @@
<h2 id="log" class="text-3xl font-bold"><%= t('events_log') %></h2>
<div class="tabs border-b mt-4">
<%= link_to t('all'), url_for(params.to_unsafe_h.except(:status)), style: 'margin-bottom: -1px', class: "tab h-10 text-base #{params[:status].blank? ? 'tab-active tab-bordered' : 'pb-[3px]'}" %>
<%= link_to t('successed'), url_for(params.to_unsafe_h.merge(status: 'success')), style: 'margin-bottom: -1px', class: "tab h-10 text-base #{params[:status] == 'success' ? 'tab-active tab-bordered' : 'pb-[3px]'}" %>
<%= link_to t('succeeded'), url_for(params.to_unsafe_h.merge(status: 'success')), style: 'margin-bottom: -1px', class: "tab h-10 text-base #{params[:status] == 'success' ? 'tab-active tab-bordered' : 'pb-[3px]'}" %>
<%= link_to t('failed'), url_for(params.to_unsafe_h.merge(status: 'error')), style: 'margin-bottom: -1px', class: "tab h-10 text-base #{params[:status] == 'error' ? 'tab-active tab-bordered' : 'pb-[3px]'}" %>
</div>
<% if @webhook_events.present? %>
+212 -7
View File
@@ -24,8 +24,12 @@ en: &en
thanks: Thanks
private: Private
select: Select
enabled: Enabled
disabled: Disabled
party: Party
click_here_to_send_a_reset_password_email_html: '<label class="link" for="resend_password_button">Click here</label> to send a reset password email.'
edit_order: Edit Order
expirable_file_download_links: Expirable file download links
invite_form_fields: Invite form fields
default_parties: Default parties
authenticate_embedded_form_preview_with_token: Authenticate embedded form preview with token
@@ -36,13 +40,14 @@ en: &en
bcc_recipients: BCC recipients
resend_pending: Re-send pending
always_enforce_signing_order: Always enforce the signing order
create_templates_with_private_access_by_default: Create templates with private access by default
ensure_unique_recipients: Ensure unique recipients
edit_per_party: Edit per party
reply_to: Reply to
pending_by_me: Pending by me
partially_completed: Partially completed
require_phone_2fa_to_open: Require phone 2FA to open
the_sender_has_requested_a_two_factor_authentication_via_one_time_password_sent_to_your_html: The sender has requested a two factor authentication via one time password sent to your <b>%{phone}</b> phone number.
the_sender_has_requested_a_two_factor_authentication_via_one_time_password_sent_to_your_html: The sender has requested two-factor authentication via a one-time password sent to your <b>%{phone}</b> phone number.
send_verification_code: Send verification code
code_has_been_resent: Code has been re-sent
invalid_code: Invalid code
@@ -767,7 +772,7 @@ en: &en
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.
events_log: Events Log
successed: Successed
succeeded: Succeeded
failed: Failed
there_are_no_events: There are no events
resend: Resend
@@ -794,6 +799,33 @@ en: &en
template_name_has_been_completed_by_submitters_html: '"<strong>{template.name}</strong>" has been completed by <strong>{submission.submitters}</strong>'
please_check_the_copy_of_your_template_name_in_the_email_attachments_html: 'Please check the copy of your "<strong>{template.name}</strong>" in the email attachments.'
you_have_been_invited_to_sign_the_template_name_html: 'You have been invited to sign the "<strong>{template.name}</strong>".'
reveal_api_key: Reveal API Key
enter_your_password_to_reveal_the_api_key: Enter your password to reveal the API key
wrong_password: Wrong password.
current_password: Current password
dont_remember_your_current_password_click_here_to_reset_it_html: 'Don''t remember your current password? <label class="link" for="resend_password_button">Click here</label> to reset it.'
an_email_with_password_reset_instructions_has_been_sent: An email with password reset instructions has been sent.
api_key_access_code: API key access code
use_otp_code_to_access_the_api_key_html: Use <b>%{code}</b> code to access the API key.
please_reply_to_this_email_if_you_dont_recognize_this_request: Please reply to this email if you don't recognize this request.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Your user account has been archived. Contact your administrator to restore access to your account.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Your email could not be reached. This may happen if there was a typo in your address or if your mailbox is not available. Please contact support@docuseal.com to log in.
efficient_search_with_search_index: Efficient search with search index
reindex: Reindex
build_search_index: Build Search Index
require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password: Require two-factor authentication (2FA) with an authenticator app (e.g., Google Authenticator, Authy). All users signing documents must pass the second factor verification using a secure code in addition to their password.
add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings: "Add a unique Signature ID and timestamp to each signature for audit and traceability purposes along with the timestamp. Part of DocuSeal's 21 CFR Part 11 compliance settings."
require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings: "Require signers to provide a reason for signing before completing their signature (e.g., approvals, certifications). Part of DocuSeal's 21 CFR Part 11 compliance settings."
allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one: Allow signers to create signatures by typing their name instead of drawing or uploading one.
allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed: Allow signers to resubmit forms after completion, useful when corrections or multiple submissions are needed.
allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester: Allow recipients to decline signing a document. The decline reason notification will be sent to the signature requester.
save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions: "Save a user's signature and automatically pre-fill it in future signing sessions."
make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security: Make document download links expire after 40 minutes to prevent long-term access and enhance security.
require_authentication_with_user_login_or_api_key_to_access_the_document_download_links: Require authentication with user login or API key to access the document download links.
combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance: Combine signed documents and the Audit Log into a single PDF file for easier recordkeeping and compliance.
require_a_jwt_authorization_to_preview_embedded_forms_ensuring_only_authorized_users_can_view_them: Require a JWT authorization to preview embedded forms, ensuring only authorized users can view them.
make_all_newly_created_templates_private_to_their_creator_by_default: Make all newly created templates private to their creator by default.
make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing: Make the recipients signing order always enforced, so that the second signer can start signing their part only after the first signer has completed signing.
submission_sources:
api: API
bulk: Bulk Send
@@ -900,6 +932,10 @@ en: &en
range_without_total: "%{from}-%{to} events"
es: &es
enabled: Habilitado
disabled: Deshabilitado
expirable_file_download_links: Enlaces de descarga de archivos con vencimiento
create_templates_with_private_access_by_default: Crear plantillas con acceso privado por defecto
party: Parte
edit_order: Edita Pedido
select: Seleccionar
@@ -1647,7 +1683,7 @@ es: &es
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.
events_log: Registro de eventos
successed: Exitoso
succeeded: Exitoso
failed: Fallido
there_are_no_events: No hay eventos
resend: Reenviar
@@ -1674,6 +1710,33 @@ es: &es
template_name_has_been_completed_by_submitters_html: '"<strong>{template.name}</strong>" ha sido completado por <strong>{submission.submitters}</strong>'
please_check_the_copy_of_your_template_name_in_the_email_attachments_html: 'Por favor, revisa la copia de tu "<strong>{template.name}</strong>" en los archivos adjuntos del correo electrónico.'
you_have_been_invited_to_sign_the_template_name_html: 'Has sido invitado a firmar el "<strong>{template.name}</strong>".'
reveal_api_key: Revelar clave API
enter_your_password_to_reveal_the_api_key: Introduce tu contraseña para revelar la clave API
wrong_password: Contraseña incorrecta.
current_password: Contraseña actual
dont_remember_your_current_password_click_here_to_reset_it_html: '¿No recuerdas tu contraseña actual? <label class="link" for="resend_password_button">Haz clic aquí</label> para restablecerla.'
an_email_with_password_reset_instructions_has_been_sent: Se enviará un correo electrónico con las instrucciones para restablecer tu contraseña en unos minutos.
api_key_access_code: Código de acceso de la clave API
use_otp_code_to_access_the_api_key_html: Usa el código <b>%{code}</b> para acceder a la clave API.
please_reply_to_this_email_if_you_dont_recognize_this_request: Responde a este correo si no reconoces esta solicitud.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Tu cuenta de usuario ha sido archivada. Contacta a tu administrador para restaurar el acceso a tu cuenta.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: No se pudo acceder a tu correo electrónico. Esto puede ocurrir si hubo un error tipográfico en tu dirección o si tu buzón no está disponible. Por favor, contacta a support@docuseal.com para iniciar sesión.
efficient_search_with_search_index: Búsqueda eficiente con índice de búsqueda
reindex: Reindexar
build_search_index: Construir índice de búsqueda
require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password: Requerir autenticación de dos factores (2FA) con una aplicación de autenticación (p. ej., Google Authenticator, Authy). Todos los usuarios que firman documentos deben pasar la verificación del segundo factor usando un código seguro además de su contraseña.
add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings: Agregar un ID de firma único y una marca de tiempo a cada firma para fines de auditoría y trazabilidad junto con la marca de tiempo. Parte de la configuración de cumplimiento 21 CFR Parte 11 de DocuSeal.
require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings: Requerir que los firmantes proporcionen un motivo para firmar antes de completar su firma (p. ej., aprobaciones, certificaciones). Parte de la configuración de cumplimiento 21 CFR Parte 11 de DocuSeal.
allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one: Permitir que los firmantes creen firmas escribiendo su nombre en lugar de dibujar o subir una.
allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed: Permitir que los firmantes vuelvan a enviar formularios después de completarlos, útil cuando se necesitan correcciones o múltiples envíos.
allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester: Permitir que los destinatarios rechacen firmar un documento. La notificación del motivo del rechazo se enviará al solicitante de la firma.
save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions: Guardar la firma de un usuario y rellenarla automáticamente en futuras sesiones de firma.
make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security: Hacer que los enlaces de descarga de documentos caduquen después de 40 minutos para evitar el acceso a largo plazo y mejorar la seguridad.
require_authentication_with_user_login_or_api_key_to_access_the_document_download_links: Requerir autenticación con inicio de sesión de usuario o clave API para acceder a los enlaces de descarga de documentos.
combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance: Combinar documentos firmados y el registro de auditoría en un solo archivo PDF para una gestión y cumplimiento más fáciles.
require_a_jwt_authorization_to_preview_embedded_forms_ensuring_only_authorized_users_can_view_them: Requerir autorización JWT para previsualizar formularios incrustados, garantizando que solo los usuarios autorizados puedan verlos.
make_all_newly_created_templates_private_to_their_creator_by_default: Hacer que todas las plantillas creadas sean privadas para su creador por defecto.
make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing: Hacer que el orden de firma de los destinatarios se aplique siempre, de modo que el segundo firmante pueda comenzar a firmar solo después de que el primero haya completado la firma.
submission_sources:
api: API
bulk: Envío masivo
@@ -1780,6 +1843,11 @@ es: &es
range_without_total: "%{from}-%{to} eventos"
it: &it
click_here_to_send_a_reset_password_email_html: '<label class="link" for="resend_password_button">Clicca qui</label> per inviare una email per reimpostare la password.'
enabled: Abilitato
disabled: Disabilitato
expirable_file_download_links: Link di download di file con scadenza
create_templates_with_private_access_by_default: Crea modelli con accesso privato per impostazione predefinita
party: Parte
edit_order: Modifica Ordine
select: Seleziona
@@ -2526,7 +2594,7 @@ it: &it
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 luso di un link di condivisione perché non è chiaro quale parte sia responsabile di campi specifici. Per risolvere, definisci i dettagli predefiniti della parte.
events_log: Registro eventi
successed: Riuscito
succeeded: Riuscito
failed: Fallito
there_are_no_events: Nessun evento
resend: Invia di nuovo
@@ -2554,6 +2622,33 @@ it: &it
template_name_has_been_completed_by_submitters_html: '"<strong>{template.name}</strong>" è stato completato da <strong>{submission.submitters}</strong>'
please_check_the_copy_of_your_template_name_in_the_email_attachments_html: 'Per favore, controlla la copia del tuo "<strong>{template.name}</strong>" negli allegati dell''email.'
you_have_been_invited_to_sign_the_template_name_html: 'Sei stato invitato a firmare il "<strong>{template.name}</strong>".'
reveal_api_key: Mostra chiave API
enter_your_password_to_reveal_the_api_key: Inserisci la tua password per mostrare la chiave API
wrong_password: Password errata.
current_password: Password attuale
dont_remember_your_current_password_click_here_to_reset_it_html: 'Non ricordi la tua password attuale? <label class="link" for="resend_password_button">Clicca qui</label> per reimpostarla.'
an_email_with_password_reset_instructions_has_been_sent: Un'email con le istruzioni per reimpostare la password ti è stata inviata e arriverà entro pochi minuti.
api_key_access_code: Codice di accesso della chiave API
use_otp_code_to_access_the_api_key_html: Usa il codice <b>%{code}</b> per accedere alla chiave API.
please_reply_to_this_email_if_you_dont_recognize_this_request: Rispondi a questa email se non riconosci questa richiesta.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Il tuo account utente è stato archiviato. Contatta il tuo amministratore per ripristinare l'accesso al tuo account.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Non è stato possibile raggiungere la tua email. Questo può accadere se c'è stato un errore di digitazione nell'indirizzo o se la tua casella di posta non è disponibile. Contatta support@docuseal.com per accedere.
efficient_search_with_search_index: Ricerca efficiente con indice di ricerca
reindex: Reindicizza
build_search_index: Crea indice di ricerca
require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password: "Richiedere l'autenticazione a due fattori (2FA) con un'app di autenticazione (es. Google Authenticator, Authy). Tutti gli utenti che firmano documenti devono superare la verifica del secondo fattore utilizzando un codice sicuro oltre alla password."
add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings: Aggiungere un ID firma univoco e una marca temporale a ogni firma per scopi di audit e tracciabilità insieme alla marca temporale. Parte delle impostazioni di conformità 21 CFR Parte 11 di DocuSeal.
require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings: Richiedere ai firmatari di fornire una motivazione prima di completare la firma (es. approvazioni, certificazioni). Parte delle impostazioni di conformità 21 CFR Parte 11 di DocuSeal.
allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one: Consentire ai firmatari di creare firme digitando il proprio nome invece di disegnarle o caricarle.
allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed: Consentire ai firmatari di reinviare i moduli dopo il completamento, utile quando sono necessarie correzioni o più invii.
allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester: Consentire ai destinatari di rifiutare di firmare un documento. La notifica del motivo del rifiuto verrà inviata al richiedente della firma.
save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions: Salvare la firma di un utente e compilarla automaticamente nelle future sessioni di firma.
make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security: "Fare in modo che i link di download dei documenti scadano dopo 40 minuti per prevenire l'accesso a lungo termine e migliorare la sicurezza."
require_authentication_with_user_login_or_api_key_to_access_the_document_download_links: "Richiedere l'autenticazione con login utente o chiave API per accedere ai link di download dei documenti."
combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance: Combinare documenti firmati e registro di audit in un unico file PDF per una gestione e conformità più semplici.
require_a_jwt_authorization_to_preview_embedded_forms_ensuring_only_authorized_users_can_view_them: "Richiedere un'autorizzazione JWT per visualizzare in anteprima i moduli incorporati, garantendo che solo gli utenti autorizzati possano vederli."
make_all_newly_created_templates_private_to_their_creator_by_default: Rendere tutte le nuove template private per il creatore per impostazione predefinita.
make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing: "Rendere sempre obbligatorio l'ordine di firma dei destinatari, in modo che il secondo firmatario possa iniziare solo dopo che il primo ha completato la firma."
submission_sources:
api: API
bulk: Invio massivo
@@ -2660,6 +2755,11 @@ it: &it
range_without_total: "%{from}-%{to} eventi"
fr: &fr
click_here_to_send_a_reset_password_email_html: '<label class="link" for="resend_password_button">Cliquez ici</label> pour envoyer un e-mail de réinitialisation du mot de passe.'
enabled: Activé
disabled: Désactivé
expirable_file_download_links: Liens de téléchargement de fichiers expirables
create_templates_with_private_access_by_default: Créer des modèles avec un accès privé par défaut
party: Partie
edit_order: Modifier la commande
select: Sélectionner
@@ -3409,7 +3509,7 @@ fr: &fr
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 lutilisation dun lien de partage car il nest pas clair quelle partie est responsable de certains champs. Pour résoudre cela, définissez les détails de la partie par défaut.
events_log: Journal des événements
successed: Réussi
succeeded: Réussi
failed: Échoué
there_are_no_events: Aucun événement
resend: Renvoyer
@@ -3437,6 +3537,33 @@ fr: &fr
template_name_has_been_completed_by_submitters_html: '"<strong>{template.name}</strong>" a été complété par <strong>{submission.submitters}</strong>'
please_check_the_copy_of_your_template_name_in_the_email_attachments_html: 'Veuillez vérifier la copie de votre "<strong>{template.name}</strong>" dans les pièces jointes de le-mail.'
you_have_been_invited_to_sign_the_template_name_html: 'Vous avez été invité à signer le "<strong>{template.name}</strong>".'
reveal_api_key: Révéler la clé API
enter_your_password_to_reveal_the_api_key: Entrez votre mot de passe pour révéler la clé API
wrong_password: Mot de passe incorrect.
current_password: Mot de passe actuel
dont_remember_your_current_password_click_here_to_reset_it_html: 'Vous ne vous souvenez plus de votre mot de passe actuel ? <label class="link" for="resend_password_button">Cliquez ici</label> pour le réinitialiser.'
an_email_with_password_reset_instructions_has_been_sent: Un e-mail contenant les instructions pour réinitialiser votre mot de passe vous sera envoyé dans quelques minutes.
api_key_access_code: Code d'accès de la clé API
use_otp_code_to_access_the_api_key_html: Utilisez le code <b>%{code}</b> pour accéder à la clé API.
please_reply_to_this_email_if_you_dont_recognize_this_request: Veuillez répondre à cet e-mail si vous ne reconnaissez pas cette demande.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Votre compte utilisateur a été archivé. Contactez votre administrateur pour rétablir l'accès à votre compte.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Votre e-mail n'a pas pu être atteint. Cela peut arriver s'il y a eu une faute de frappe dans votre adresse ou si votre boîte aux lettres n'est pas disponible. Veuillez contacter support@docuseal.com pour vous connecter.
efficient_search_with_search_index: Recherche efficace avec index de recherche
reindex: Réindexer
build_search_index: Construire un index de recherche
require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password: "Exiger une authentification à deux facteurs (2FA) avec une application d'authentification (ex. Google Authenticator, Authy). Tous les utilisateurs signant des documents doivent passer la vérification du second facteur en utilisant un code sécurisé en plus de leur mot de passe."
add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings: "Ajouter un identifiant de signature unique et un horodatage à chaque signature à des fins d'audit et de traçabilité avec l'horodatage. Fait partie des paramètres de conformité 21 CFR Partie 11 de DocuSeal."
require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings: "Exiger des signataires qu'ils fournissent une raison avant de compléter leur signature (ex. approbations, certifications). Fait partie des paramètres de conformité 21 CFR Partie 11 de DocuSeal."
allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one: Permettre aux signataires de créer des signatures en tapant leur nom au lieu de les dessiner ou de les télécharger.
allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed: Permettre aux signataires de soumettre à nouveau des formulaires après achèvement, utile lorsque des corrections ou plusieurs envois sont nécessaires.
allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester: Permettre aux destinataires de refuser de signer un document. La notification de la raison du refus sera envoyée au demandeur de la signature.
save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions: "Enregistrer la signature d'un utilisateur et la pré-remplir automatiquement dans les futures sessions de signature."
make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security: Faire expirer les liens de téléchargement de documents après 40 minutes pour éviter un accès à long terme et améliorer la sécurité.
require_authentication_with_user_login_or_api_key_to_access_the_document_download_links: Exiger une authentification avec identifiant utilisateur ou clé API pour accéder aux liens de téléchargement de documents.
combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance: "Combiner les documents signés et le journal d'audit dans un seul fichier PDF pour une gestion et une conformité plus faciles."
require_a_jwt_authorization_to_preview_embedded_forms_ensuring_only_authorized_users_can_view_them: Exiger une autorisation JWT pour prévisualiser les formulaires intégrés, garantissant que seuls les utilisateurs autorisés puissent les voir.
make_all_newly_created_templates_private_to_their_creator_by_default: Rendre toutes les nouvelles modèles privées à leur créateur par défaut.
make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing: "Rendre l'ordre de signature des destinataires toujours obligatoire, de sorte que le deuxième signataire ne puisse commencer qu'après que le premier a terminé."
submission_sources:
api: API
bulk: Envoi en masse
@@ -3543,6 +3670,11 @@ fr: &fr
range_without_total: "%{from} à %{to} événements"
pt: &pt
click_here_to_send_a_reset_password_email_html: '<label class="link" for="resend_password_button">Clique aqui</label> para enviar um e-mail de redefinição de senha.'
enabled: Ativado
disabled: Desativado
expirable_file_download_links: Links de download de arquivos com expiração
create_templates_with_private_access_by_default: Criar modelos com acesso privado por padrão
party: Parte
edit_order: Edita Pedido
select: Selecionar
@@ -4291,7 +4423,7 @@ pt: &pt
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.
events_log: Registro de eventos
successed: Sucesso
succeeded: Sucesso
failed: Falhou
there_are_no_events: Nenhum evento
resend: Reenviar
@@ -4318,6 +4450,33 @@ pt: &pt
template_name_has_been_completed_by_submitters_html: '"<strong>{template.name}</strong>" foi concluído por <strong>{submission.submitters}</strong>'
please_check_the_copy_of_your_template_name_in_the_email_attachments_html: 'Por favor, verifique a cópia do seu "<strong>{template.name}</strong>" nos anexos do e-mail.'
you_have_been_invited_to_sign_the_template_name_html: 'Você foi convidado a assinar o "<strong>{template.name}</strong>".'
reveal_api_key: Revelar chave API
enter_your_password_to_reveal_the_api_key: Insira sua senha para revelar a chave API
wrong_password: Senha incorreta.
current_password: Senha atual
dont_remember_your_current_password_click_here_to_reset_it_html: 'Não se lembra da sua senha atual? <label class="link" for="resend_password_button">Clique aqui</label> para redefini-la.'
an_email_with_password_reset_instructions_has_been_sent: Um e-mail com instruções para redefinir sua senha será enviado em alguns minutos.
api_key_access_code: Código de acesso da chave API
use_otp_code_to_access_the_api_key_html: Use o código <b>%{code}</b> para acessar a chave API.
please_reply_to_this_email_if_you_dont_recognize_this_request: Responda a este e-mail se você não reconhecer esta solicitação.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Sua conta de usuário foi arquivada. Entre em contato com o administrador para restaurar o acesso à sua conta.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Seu e-mail não pôde ser acessado. Isso pode acontecer se houve um erro de digitação no endereço ou se sua caixa de correio não estiver disponível. Entre em contato com support@docuseal.com para fazer login.
efficient_search_with_search_index: Pesquisa eficiente com índice de busca
reindex: Reindexar
build_search_index: Construir índice de busca
require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password: "Exigir autenticação de dois fatores (2FA) com um aplicativo autenticador (ex.: Google Authenticator, Authy). Todos os usuários que assinam documentos devem passar pela verificação do segundo fator usando um código seguro além da senha."
add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings: Adicionar um ID de assinatura exclusivo e um carimbo de data/hora a cada assinatura para fins de auditoria e rastreabilidade junto com o carimbo de data/hora. Parte das configurações de conformidade 21 CFR Parte 11 do DocuSeal.
require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings: "Exigir que os signatários forneçam uma razão antes de completar a assinatura (ex.: aprovações, certificações). Parte das configurações de conformidade 21 CFR Parte 11 do DocuSeal."
allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one: Permitir que os signatários criem assinaturas digitando seu nome em vez de desenhá-las ou carregá-las.
allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed: Permitir que os signatários reenviem formulários após o término, útil quando são necessárias correções ou múltiplos envios.
allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester: Permitir que os destinatários recusem assinar um documento. A notificação do motivo da recusa será enviada ao solicitante da assinatura.
save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions: Salvar a assinatura de um usuário e preenchê-la automaticamente em futuras sessões de assinatura.
make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security: Fazer os links de download de documentos expirarem após 40 minutos para evitar o acesso prolongado e aumentar a segurança.
require_authentication_with_user_login_or_api_key_to_access_the_document_download_links: Exigir autenticação com login do usuário ou chave API para acessar os links de download de documentos.
combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance: Combinar documentos assinados e o registro de auditoria em um único arquivo PDF para facilitar o arquivamento e a conformidade.
require_a_jwt_authorization_to_preview_embedded_forms_ensuring_only_authorized_users_can_view_them: Exigir autorização JWT para visualizar formulários incorporados, garantindo que apenas usuários autorizados possam vê-los.
make_all_newly_created_templates_private_to_their_creator_by_default: Tornar todos os modelos recém-criados privados para seu criador por padrão.
make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing: Tornar a ordem de assinatura dos destinatários sempre obrigatória, para que o segundo signatário só possa assinar após o primeiro concluir.
submission_sources:
api: API
bulk: Envio em massa
@@ -4424,6 +4583,11 @@ pt: &pt
range_without_total: "%{from}-%{to} eventos"
de: &de
click_here_to_send_a_reset_password_email_html: '<label class="link" for="resend_password_button">Klicken Sie hier</label>, um eine E-Mail zum Zurücksetzen des Passworts zu senden.'
enabled: Aktiviert
disabled: Deaktiviert
expirable_file_download_links: Ablaufbare Datei-Download-Links
create_templates_with_private_access_by_default: Vorlagen standardmäßig mit privatem Zugriff erstellen
party: Partei
edit_order: Bestellung bearbeiten
select: Auswählen
@@ -5172,7 +5336,7 @@ de: &de
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.
events_log: Ereignisprotokoll
successed: Erfolgreich
succeeded: Erfolgreich
failed: Fehlgeschlagen
there_are_no_events: Keine Ereignisse vorhanden
resend: Erneut senden
@@ -5199,6 +5363,31 @@ de: &de
template_name_has_been_completed_by_submitters_html: '"<strong>{template.name}</strong>" wurde von <strong>{submission.submitters}</strong> abgeschlossen'
please_check_the_copy_of_your_template_name_in_the_email_attachments_html: 'Bitte prüfen Sie die Kopie Ihres "<strong>{template.name}</strong>" in den E-Mail-Anhängen.'
you_have_been_invited_to_sign_the_template_name_html: 'Du wurdest eingeladen, "<strong>{template.name}</strong>" zu unterschreiben.'
reveal_api_key: API-Schlüssel anzeigen
enter_your_password_to_reveal_the_api_key: Gib dein Passwort ein, um den API-Schlüssel anzuzeigen
wrong_password: Falsches Passwort.
current_password: Aktuelles Passwort
dont_remember_your_current_password_click_here_to_reset_it_html: 'Sie erinnern sich nicht an Ihr aktuelles Passwort? <label class="link" for="resend_password_button">Klicken Sie hier</label>, um es zurückzusetzen.'
an_email_with_password_reset_instructions_has_been_sent: Eine E-Mail mit Anweisungen zum Zurücksetzen Ihres Passworts wurde Ihnen in wenigen Minuten zugesendet.
api_key_access_code: API-Schlüssel-Zugangscode
use_otp_code_to_access_the_api_key_html: Verwenden Sie den Code <b>%{code}</b>, um auf den API-Schlüssel zuzugreifen.
please_reply_to_this_email_if_you_dont_recognize_this_request: Bitte antworten Sie auf diese E-Mail, wenn Sie diese Anfrage nicht erkennen.
efficient_search_with_search_index: Effiziente Suche mit Suchindex
reindex: Neu indexieren
build_search_index: Suchindex erstellen
require_two_factor_authentication_2fa_with_an_authenticator_app_e_g_google_authenticator_authy_all_users_signing_documents_must_pass_the_second_factor_verification_using_a_secure_code_in_addition_to_their_password: Zwei-Faktor-Authentifizierung (2FA) mit einer Authentifizierungs-App (z. B. Google Authenticator, Authy) erforderlich. Alle Benutzer, die Dokumente unterzeichnen, müssen die zweite Faktorprüfung mit einem sicheren Code zusätzlich zu ihrem Passwort bestehen.
add_a_unique_signature_id_and_timestamp_to_each_signature_for_audit_and_traceability_purposes_along_with_the_timestamp_part_of_docuseals_21_cfr_part_11_compliance_settings: Eine eindeutige Signatur-ID und einen Zeitstempel zu jeder Signatur hinzufügen, um Prüfungs- und Nachverfolgbarkeitszwecke zusammen mit dem Zeitstempel zu erfüllen. Teil der 21 CFR Teil 11-Compliance-Einstellungen von DocuSeal.
require_signer_to_provide_a_reason_for_signing_before_completing_their_signature_e_g_approvals_certifications_part_of_docuseals_21_cfr_part_11_compliance_settings: Unterzeichner müssen einen Grund für die Unterzeichnung angeben, bevor sie ihre Signatur abschließen (z. B. Genehmigungen, Zertifizierungen). Teil der 21 CFR Teil 11-Compliance-Einstellungen von DocuSeal.
allow_signers_to_create_signatures_by_typing_their_name_instead_of_drawing_or_uploading_one: Unterzeichner dürfen Signaturen erstellen, indem sie ihren Namen eingeben, anstatt eine zu zeichnen oder hochzuladen.
allow_signers_to_resubmit_forms_after_completion_useful_when_corrections_or_multiple_submissions_are_needed: Unterzeichner dürfen Formulare nach Abschluss erneut einreichen, was nützlich ist, wenn Korrekturen oder mehrere Einreichungen erforderlich sind.
allow_recipients_to_decline_signing_a_document_the_decline_reason_notification_will_be_sent_to_the_signature_requester: Empfänger dürfen die Unterzeichnung eines Dokuments ablehnen. Die Benachrichtigung über den Ablehnungsgrund wird an den Anforderer der Signatur gesendet.
save_a_users_signature_and_automatically_pre_fill_it_in_future_signing_sessions: Die Signatur eines Benutzers speichern und sie in zukünftigen Signatursitzungen automatisch ausfüllen.
make_document_download_links_expire_after_40_minutes_to_prevent_long_term_access_and_enhance_security: Download-Links für Dokumente nach 40 Minuten ablaufen lassen, um langfristigen Zugriff zu verhindern und die Sicherheit zu erhöhen.
require_authentication_with_user_login_or_api_key_to_access_the_document_download_links: Authentifizierung mit Benutzeranmeldung oder API-Schlüssel erforderlich, um auf die Download-Links für Dokumente zuzugreifen.
combine_signed_documents_and_the_audit_log_into_a_single_pdf_file_for_easier_recordkeeping_and_compliance: Unterzeichnete Dokumente und das Prüfprotokoll in einer einzigen PDF-Datei kombinieren, um die Aufbewahrung und Compliance zu erleichtern.
require_a_jwt_authorization_to_preview_embedded_forms_ensuring_only_authorized_users_can_view_them: JWT-Autorisierung erforderlich, um eingebettete Formulare anzuzeigen, sodass nur autorisierte Benutzer sie sehen können.
make_all_newly_created_templates_private_to_their_creator_by_default: Alle neu erstellten Vorlagen standardmäßig für ihren Ersteller privat machen.
make_the_recipients_signing_order_always_enforced_so_that_the_second_signer_can_start_signing_their_part_only_after_the_first_signer_has_completed_signing: Die Unterzeichnungsreihenfolge der Empfänger immer erzwingen, sodass der zweite Unterzeichner erst nach Abschluss der Unterschrift durch den ersten beginnen kann.
submission_sources:
api: API
bulk: Massenversand
@@ -5392,6 +5581,8 @@ pl:
email_verification: Weryfikacja e-mail
your_verification_code_to_access_the_name: 'Twój kod weryfikacyjny do uzyskania dostępu do "%{name}":'
please_reply_to_this_email_if_you_didnt_request_this: Odpowiedz na ten e-mail, jeśli nie prosiłeś o to.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Twoje konto użytkownika zostało zarchiwizowane. Skontaktuj się z administratorem, aby przywrócić dostęp do konta.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Nie udało się uzyskać dostępu do Twojego adresu e-mail. Może to być spowodowane literówką w adresie lub niedostępnością skrzynki. Skontaktuj się z support@docuseal.com, aby się zalogować.
uk:
require_phone_2fa_to_open: Вимагати двофакторну автентифікацію через телефон для відкриття
@@ -5481,6 +5672,8 @@ uk:
email_verification: Підтвердження електронної пошти
your_verification_code_to_access_the_name: 'Ваш код доступу до "%{name}":'
please_reply_to_this_email_if_you_didnt_request_this: Відповідайте на цей лист, якщо ви цього не запитували.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Ваш обліковий запис було архівовано. Зверніться до адміністратора, щоб відновити доступ.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Не вдалося отримати доступ до вашої електронної пошти. Це може статися, якщо була допущена помилка в адресі або ваша скринька недоступна. Зверніться до support@docuseal.com, щоб увійти.
cs:
require_phone_2fa_to_open: Vyžadovat otevření pomocí telefonního 2FA
@@ -5570,6 +5763,8 @@ cs:
email_verification: Ověření e-mailu
your_verification_code_to_access_the_name: 'Váš ověřovací kód pro přístup k "%{name}":'
please_reply_to_this_email_if_you_didnt_request_this: Odpovězte na tento e-mail, pokud jste o to nežádali.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Váš uživatelský účet byl archivován. Kontaktujte svého administrátora pro obnovení přístupu.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Nepodařilo se dosáhnout na váš e-mail. To se může stát, pokud je v adrese překlep nebo vaše schránka není dostupná. Kontaktujte support@docuseal.com pro přihlášení.
he:
require_phone_2fa_to_open: דרוש אימות דו-שלבי באמצעות טלפון לפתיחה
@@ -5659,6 +5854,8 @@ he:
email_verification: 'אימות דוא"ל'
your_verification_code_to_access_the_name: 'קוד האימות שלך לגישה ל-%{name}:'
please_reply_to_this_email_if_you_didnt_request_this: 'השב למייל זה אם לא ביקשת זאת.'
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: החשבון שלך הועבר לארכיון. פנה למנהל המערכת כדי לשחזר את הגישה.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: לא ניתן היה לגשת לדוא"ל שלך. ייתכן שזה קרה עקב שגיאת כתיב בכתובת או אם תיבת הדואר אינה זמינה. אנא פנה ל־support@docuseal.com כדי להתחבר.
nl:
require_phone_2fa_to_open: Vereis telefoon 2FA om te openen
@@ -5748,6 +5945,8 @@ nl:
email_verification: E-mailverificatie
your_verification_code_to_access_the_name: 'Je verificatiecode voor toegang tot "%{name}":'
please_reply_to_this_email_if_you_didnt_request_this: Reageer op deze e-mail als je dit niet hebt aangevraagd.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: Je gebruikersaccount is gearchiveerd. Neem contact op met je beheerder om de toegang te herstellen.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: Je e-mailadres kon niet worden bereikt. Dit kan gebeuren door een typefout in je adres of als je mailbox niet beschikbaar is. Neem contact op met support@docuseal.com om in te loggen.
ar:
require_phone_2fa_to_open: "تطلب فتح عبر تحقق الهاتف ذو العاملين"
@@ -5837,6 +6036,8 @@ ar:
email_verification: 'التحقق من البريد الإلكتروني'
your_verification_code_to_access_the_name: 'رمز التحقق الخاص بك للوصول إلى "%{name}":'
please_reply_to_this_email_if_you_didnt_request_this: 'يرجى الرد على هذا البريد إذا لم تطلب ذلك.'
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: تم أرشفة حسابك. يرجى التواصل مع المسؤول لاستعادة الوصول إلى حسابك.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: تعذّر الوصول إلى بريدك الإلكتروني. قد يحدث هذا في حال وجود خطأ في العنوان أو إذا كانت صندوق البريد غير متاح. يرجى التواصل مع support@docuseal.com لتسجيل الدخول.
ko:
require_phone_2fa_to_open: 휴대폰 2FA를 열 때 요구함
@@ -5926,6 +6127,8 @@ ko:
email_verification: 이메일 인증
your_verification_code_to_access_the_name: '"%{name}"에 액세스하기 위한 인증 코드:'
please_reply_to_this_email_if_you_didnt_request_this: 요청하지 않았다면 이 이메일에 회신하세요.
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: 사용자 계정이 보관되었습니다. 계정 접근을 복원하려면 관리자에게 문의하세요.
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: 이메일에 접근할 수 없습니다. 주소에 오타가 있거나 메일박스가 사용 불가능한 경우 발생할 수 있습니다. 로그인하려면 support@docuseal.com에 문의하세요.
ja:
require_phone_2fa_to_open: 電話による2段階認証が必要です
@@ -6015,6 +6218,8 @@ ja:
email_verification: メール認証
your_verification_code_to_access_the_name: '"%{name}"へのアクセスコード:'
please_reply_to_this_email_if_you_didnt_request_this: このリクエストを行っていない場合は、このメールに返信してください。
your_user_account_has_been_archived_contact_your_administrator_to_restore_access_to_your_account: あなたのユーザーアカウントはアーカイブされました。アクセスを復元するには管理者に連絡してください。
your_email_could_not_be_reached_this_may_happen_if_there_was_a_typo_in_your_address_or_if_your_mailbox_is_not_available_please_contact_support_email_to_log_in: メールにアクセスできませんでした。アドレスの入力ミスやメールボックスが利用できない場合に発生することがあります。ログインするには support@docuseal.com に連絡してください。
en-US:
<<: *en
+7 -2
View File
@@ -65,7 +65,9 @@ Rails.application.routes.draw do
resources :setup, only: %i[index create]
resource :newsletter, only: %i[show update]
resources :enquiries, only: %i[create]
resources :users, only: %i[new create edit update destroy]
resources :users, only: %i[new create edit update destroy] do
resource :send_reset_password, only: %i[update], controller: 'users_send_reset_password'
end
resource :user_signature, only: %i[edit update destroy]
resource :user_initials, only: %i[edit update destroy]
resources :submissions_archived, only: %i[index], path: 'submissions/archived'
@@ -168,6 +170,10 @@ Rails.application.routes.draw do
resources :search_entries_reindex, only: %i[create]
resources :sms, only: %i[index], controller: 'sms_settings'
end
if Docuseal.demo? || !Docuseal.multitenant?
resources :api, only: %i[index create], controller: 'api_settings'
resource :reveal_access_token, only: %i[show create], controller: 'reveal_access_token'
end
resources :email, only: %i[index create], controller: 'email_smtp_settings'
resources :sso, only: %i[index], controller: 'sso_settings'
resources :notifications, only: %i[index create], controller: 'notifications_settings'
@@ -178,7 +184,6 @@ Rails.application.routes.draw do
resources :integration_users, only: %i[index], path: 'users/:status', controller: 'users',
defaults: { status: :integration }
resource :personalization, only: %i[show create], controller: 'personalization_settings'
resources :api, only: %i[index create], controller: 'api_settings'
resources :webhooks, only: %i[index show new create update destroy], controller: 'webhook_settings' do
post :resend
+1 -1
View File
@@ -1,7 +1,7 @@
disk:
service: Disk
root: <%= ENV['WORKDIR'] || '.' %>/attachments
public: true
public: <%= ENV['ACTIVE_STORAGE_PUBLIC'] == 'true' %>
aws_s3:
service: S3
@@ -0,0 +1,30 @@
# frozen_string_literal: true
class PopulateExpireLinkConfigs < ActiveRecord::Migration[8.0]
disable_ddl_transaction!
class MigrationAccount < ActiveRecord::Base
self.table_name = 'accounts'
end
class MigrationAccountConfig < ActiveRecord::Base
self.table_name = 'account_configs'
serialize :value, coder: JSON
end
def up
MigrationAccount.find_each do |account|
config = MigrationAccountConfig.find_or_initialize_by(key: 'download_links_expire', account_id: account.id)
next if config.persisted?
config.value = false
config.save!
end
end
def down
nil
end
end
@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddVerificationMethodToCompletedSubmitters < ActiveRecord::Migration[8.0]
def change
add_column :completed_submitters, :verification_method, :string
end
end
@@ -0,0 +1,9 @@
# frozen_string_literal: true
class AddTemplateVariables < ActiveRecord::Migration[8.0]
def change
add_column :templates, :variables_schema, :text
add_column :submissions, :variables_schema, :text
add_column :submissions, :variables, :text
end
end
@@ -0,0 +1,14 @@
# frozen_string_literal: true
class CreateLockEvents < ActiveRecord::Migration[8.0]
def change
create_table :lock_events do |t|
t.string :key, index: true, null: false
t.string :event_name, null: false
t.index %i[event_name key], unique: true, where: "event_name IN ('start', 'complete')"
t.timestamps
end
end
end
@@ -0,0 +1,12 @@
# frozen_string_literal: true
class UpdateEmailEventTypeIndex < ActiveRecord::Migration[8.0]
def change
remove_index :email_events, :email, where: "event_type IN ('bounce', 'soft_bounce', 'complaint', 'soft_complaint')",
name: 'index_email_events_on_email_event_types'
add_index :email_events, :email,
where: "event_type IN ('bounce', 'soft_bounce', 'permanent_bounce', 'complaint', 'soft_complaint')",
name: 'index_email_events_on_email_event_types'
end
end
+15 -2
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_07_18_121133) do
ActiveRecord::Schema[8.0].define(version: 2025_09_22_053744) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
enable_extension "plpgsql"
@@ -117,6 +117,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_18_121133) do
t.datetime "completed_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "verification_method"
t.index ["account_id"], name: "index_completed_submitters_on_account_id"
t.index ["submitter_id"], name: "index_completed_submitters_on_submitter_id", unique: true
end
@@ -177,7 +178,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_18_121133) do
t.datetime "created_at", null: false
t.index ["account_id", "event_datetime"], name: "index_email_events_on_account_id_and_event_datetime"
t.index ["email"], name: "index_email_events_on_email"
t.index ["email"], name: "index_email_events_on_email_event_types", where: "((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]))"
t.index ["email"], name: "index_email_events_on_email_event_types", where: "((event_type)::text = ANY ((ARRAY['bounce'::character varying, 'soft_bounce'::character varying, 'permanent_bounce'::character varying, 'complaint'::character varying, 'soft_complaint'::character varying])::text[]))"
t.index ["emailable_type", "emailable_id"], name: "index_email_events_on_emailable"
t.index ["message_id"], name: "index_email_events_on_message_id"
end
@@ -216,6 +217,15 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_18_121133) do
t.index ["user_id"], name: "index_encrypted_user_configs_on_user_id"
end
create_table "lock_events", force: :cascade do |t|
t.string "key", null: false
t.string "event_name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["event_name", "key"], name: "index_lock_events_on_event_name_and_key", unique: true, where: "((event_name)::text = ANY ((ARRAY['start'::character varying, 'complete'::character varying])::text[]))"
t.index ["key"], name: "index_lock_events_on_key"
end
create_table "oauth_access_grants", force: :cascade do |t|
t.bigint "resource_owner_id", null: false
t.bigint "application_id", null: false
@@ -304,6 +314,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_18_121133) do
t.bigint "account_id", null: false
t.datetime "expire_at"
t.text "name"
t.text "variables_schema"
t.text "variables"
t.index ["account_id", "id"], name: "index_submissions_on_account_id_and_id"
t.index ["account_id", "template_id", "id"], name: "index_submissions_on_account_id_and_template_id_and_id", where: "(archived_at IS NULL)"
t.index ["account_id", "template_id", "id"], name: "index_submissions_on_account_id_and_template_id_and_id_archived", where: "(archived_at IS NOT NULL)"
@@ -388,6 +400,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_07_18_121133) do
t.string "external_id"
t.text "preferences", null: false
t.boolean "shared_link", default: false, null: false
t.text "variables_schema"
t.index ["account_id", "folder_id", "id"], name: "index_templates_on_account_id_and_folder_id_and_id", where: "(archived_at IS NULL)"
t.index ["account_id", "id"], name: "index_templates_on_account_id_and_id_archived", where: "(archived_at IS NOT NULL)"
t.index ["account_id"], name: "index_templates_on_account_id"
+703 -37
View File
@@ -523,6 +523,15 @@ var response = client.Execute(request);
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -598,14 +607,45 @@ var response = client.Execute(request);
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1025,10 +1065,6 @@ var response = client.Execute(request);
"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."
@@ -1038,6 +1074,15 @@ var response = client.Execute(request);
"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": {
@@ -1105,14 +1150,45 @@ var response = client.Execute(request);
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1775,6 +1851,46 @@ var response = client.Execute(request);
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2253,7 +2369,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```csharp
@@ -2531,6 +2647,15 @@ var response = client.Execute(request);
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2593,14 +2718,45 @@ var response = client.Execute(request);
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -2946,6 +3102,15 @@ var response = client.Execute(request);
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3008,14 +3173,45 @@ var response = client.Execute(request);
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3323,6 +3519,46 @@ var response = client.Execute(request);
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3439,3 +3675,433 @@ var response = client.Execute(request);
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```csharp
var client = new RestClient("https://api.docuseal.com/submissions/docx");
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\",\"variables\":{\"variable_name\":\"value\"},\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}],\"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 DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+726 -37
View File
@@ -653,6 +653,15 @@ func main() {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -728,14 +737,45 @@ func main() {
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1285,10 +1325,6 @@ func main() {
"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."
@@ -1298,6 +1334,15 @@ func main() {
"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": {
@@ -1365,14 +1410,45 @@ func main() {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -2148,6 +2224,46 @@ func main() {
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2672,7 +2788,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```go
@@ -2973,6 +3089,15 @@ func main() {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3035,14 +3160,45 @@ func main() {
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3411,6 +3567,15 @@ func main() {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3473,14 +3638,45 @@ func main() {
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3811,6 +4007,46 @@ func main() {
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3927,3 +4163,456 @@ func main() {
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.docuseal.com/submissions/docx"
payload := strings.NewReader("{\"name\":\"Test Submission Document\",\"variables\":{\"variable_name\":\"value\"},\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}],\"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 DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+702 -37
View File
@@ -517,6 +517,15 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissio
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -592,14 +601,45 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissio
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1013,10 +1053,6 @@ HttpResponse<String> response = Unirest.put("https://api.docuseal.com/submitters
"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."
@@ -1026,6 +1062,15 @@ HttpResponse<String> response = Unirest.put("https://api.docuseal.com/submitters
"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": {
@@ -1093,14 +1138,45 @@ HttpResponse<String> response = Unirest.put("https://api.docuseal.com/submitters
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1758,6 +1834,46 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/templates
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2234,7 +2350,7 @@ HttpResponse<String> 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```java
@@ -2511,6 +2627,15 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissio
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2573,14 +2698,45 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissio
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -2925,6 +3081,15 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissio
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2987,14 +3152,45 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissio
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3301,6 +3497,46 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/templates
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3417,3 +3653,432 @@ HttpResponse<String> response = Unirest.post("https://api.docuseal.com/templates
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```java
HttpResponse<String> response = Unirest.post("https://api.docuseal.com/submissions/docx")
.header("X-Auth-Token", "API_KEY")
.header("content-type", "application/json")
.body("{\"name\":\"Test Submission Document\",\"variables\":{\"variable_name\":\"value\"},\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
.asString();
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+719 -37
View File
@@ -537,6 +537,15 @@ const submission = await docuseal.createSubmission({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -612,14 +621,45 @@ const submission = await docuseal.createSubmission({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1052,10 +1092,6 @@ const submitter = await docuseal.updateSubmitter(500001, {
"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."
@@ -1065,6 +1101,15 @@ const submitter = await docuseal.updateSubmitter(500001, {
"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": {
@@ -1132,14 +1177,45 @@ const submitter = await docuseal.updateSubmitter(500001, {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1826,6 +1902,46 @@ const template = await docuseal.createTemplateFromDocx({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2330,7 +2446,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```javascript
@@ -2635,6 +2751,15 @@ const submission = await docuseal.createSubmissionFromPdf({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2697,14 +2822,45 @@ const submission = await docuseal.createSubmissionFromPdf({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3071,6 +3227,15 @@ and typesetting industry</p>
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3133,14 +3298,45 @@ and typesetting industry</p>
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3469,6 +3665,46 @@ const template = await docuseal.createTemplateFromPdf({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3585,3 +3821,449 @@ const template = await docuseal.createTemplateFromPdf({
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```javascript
const docuseal = require("@docuseal/api");
docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
const submission = await docuseal.createSubmissionFromDocx({
name: "Test Submission Document",
variables: {
variable_name: "value"
},
documents: [
{
name: "string",
file: "base64"
}
],
submitters: [
{
role: "First Party",
email: "john.doe@example.com"
}
]
});
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+725 -37
View File
@@ -569,6 +569,15 @@ const submitters = await resp.json();
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -644,14 +653,45 @@ const submitters = await resp.json();
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1116,10 +1156,6 @@ const submitter = await resp.json();
"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."
@@ -1129,6 +1165,15 @@ const submitter = await resp.json();
"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": {
@@ -1196,14 +1241,45 @@ const submitter = await resp.json();
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1919,6 +1995,46 @@ const template = await resp.json();
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2435,7 +2551,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```nodejs
@@ -2746,6 +2862,15 @@ const submission = await resp.json();
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2808,14 +2933,45 @@ const submission = await resp.json();
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3188,6 +3344,15 @@ const submission = await resp.json();
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3250,14 +3415,45 @@ const submission = await resp.json();
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3592,6 +3788,46 @@ const template = await resp.json();
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3708,3 +3944,455 @@ const template = await resp.json();
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```nodejs
const fetch = require("node-fetch");
const resp = await fetch("https://api.docuseal.com/submissions/docx", {
method: "POST",
headers: {
"X-Auth-Token": "API_KEY"
},
body: JSON.stringify({
name: "Test Submission Document",
variables: {
variable_name: "value"
},
documents: [
{
name: "string",
file: "base64"
}
],
submitters: [
{
role: "First Party",
email: "john.doe@example.com"
}
]
})
});
const submitters = await resp.json();
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+717 -37
View File
@@ -525,6 +525,15 @@ $docuseal->createSubmission([
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -600,14 +609,45 @@ $docuseal->createSubmission([
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1028,10 +1068,6 @@ $docuseal->updateSubmitter(500001, [
"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."
@@ -1041,6 +1077,15 @@ $docuseal->updateSubmitter(500001, [
"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": {
@@ -1108,14 +1153,45 @@ $docuseal->updateSubmitter(500001, [
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1792,6 +1868,46 @@ $docuseal->createTemplateFromDocx([
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2292,7 +2408,7 @@ $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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```php
@@ -2595,6 +2711,15 @@ $docuseal->createSubmissionFromPdf([
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2657,14 +2782,45 @@ $docuseal->createSubmissionFromPdf([
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3029,6 +3185,15 @@ and typesetting industry</p>
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3091,14 +3256,45 @@ and typesetting industry</p>
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3425,6 +3621,46 @@ $docuseal->createTemplateFromPdf([
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3541,3 +3777,447 @@ $docuseal->createTemplateFromPdf([
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```php
$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
$docuseal->createSubmissionFromDocx([
'name' => 'Test Submission Document',
'variables' => [
'variable_name' => 'value'
],
'documents' => [
[
'name' => 'string',
'file' => 'base64'
]
],
'submitters' => [
[
'role' => 'First Party',
'email' => 'john.doe@example.com'
]
]
]);
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+720 -37
View File
@@ -543,6 +543,15 @@ docuseal.create_submission({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -618,14 +627,45 @@ docuseal.create_submission({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1064,10 +1104,6 @@ docuseal.update_submitter(500001, {
"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."
@@ -1077,6 +1113,15 @@ docuseal.update_submitter(500001, {
"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": {
@@ -1144,14 +1189,45 @@ docuseal.update_submitter(500001, {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1843,6 +1919,46 @@ docuseal.create_template_from_docx({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2349,7 +2465,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```python
@@ -2655,6 +2771,15 @@ docuseal.create_submission_from_pdf({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2717,14 +2842,45 @@ docuseal.create_submission_from_pdf({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3092,6 +3248,15 @@ and typesetting industry</p>
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3154,14 +3319,45 @@ and typesetting industry</p>
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3491,6 +3687,46 @@ docuseal.create_template_from_pdf({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3607,3 +3843,450 @@ docuseal.create_template_from_pdf({
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```python
from docuseal import docuseal
docuseal.key = "API_KEY"
docuseal.url = "https://api.docuseal.com"
docuseal.create_submission_from_docx({
"name": "Test Submission Document",
"variables": {
"variable_name": "value"
},
"documents": [
{
"name": "string",
"file": "base64"
}
],
"submitters": [
{
"role": "First Party",
"email": "john.doe@example.com"
}
]
})
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+720 -37
View File
@@ -543,6 +543,15 @@ Docuseal.create_submission({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -618,14 +627,45 @@ Docuseal.create_submission({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1064,10 +1104,6 @@ Docuseal.update_submitter(500001, {
"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."
@@ -1077,6 +1113,15 @@ Docuseal.update_submitter(500001, {
"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": {
@@ -1144,14 +1189,45 @@ Docuseal.update_submitter(500001, {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1843,6 +1919,46 @@ Docuseal.create_template_from_docx({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2349,7 +2465,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```ruby
@@ -2655,6 +2771,15 @@ Docuseal.create_submission_from_pdf({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2717,14 +2842,45 @@ Docuseal.create_submission_from_pdf({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3092,6 +3248,15 @@ and typesetting industry</p>
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3154,14 +3319,45 @@ and typesetting industry</p>
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3491,6 +3687,46 @@ Docuseal.create_template_from_pdf({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3607,3 +3843,450 @@ Docuseal.create_template_from_pdf({
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```ruby
require "docuseal"
Docuseal.key = ENV["DOCUSEAL_API_KEY"]
Docuseal.url = "https://api.docuseal.com"
Docuseal.create_submission_from_docx({
name: "Test Submission Document",
variables: {
variable_name: "value"
},
documents: [
{
name: "string",
file: "base64"
}
],
submitters: [
{
role: "First Party",
email: "john.doe@example.com"
}
]
})
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+702 -37
View File
@@ -517,6 +517,15 @@ curl --request POST \
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -592,14 +601,45 @@ curl --request POST \
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1013,10 +1053,6 @@ curl --request PUT \
"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."
@@ -1026,6 +1062,15 @@ curl --request PUT \
"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": {
@@ -1093,14 +1138,45 @@ curl --request PUT \
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1758,6 +1834,46 @@ curl --request POST \
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2234,7 +2350,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```shell
@@ -2511,6 +2627,15 @@ curl --request POST \
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2573,14 +2698,45 @@ curl --request POST \
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -2925,6 +3081,15 @@ curl --request POST \
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2987,14 +3152,45 @@ curl --request POST \
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3301,6 +3497,46 @@ curl --request POST \
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3417,3 +3653,432 @@ curl --request POST \
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```shell
curl --request POST \
--url https://api.docuseal.com/submissions/docx \
--header 'X-Auth-Token: API_KEY' \
--header 'content-type: application/json' \
--data '{"name":"Test Submission Document","variables":{"variable_name":"value"},"documents":[{"name":"string","file":"base64"}],"submitters":[{"role":"First Party","email":"john.doe@example.com"}]}'
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+719 -37
View File
@@ -537,6 +537,15 @@ const submission = await docuseal.createSubmission({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
@@ -612,14 +621,45 @@ const submission = await docuseal.createSubmission({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1052,10 +1092,6 @@ const submitter = await docuseal.updateSubmitter(500001, {
"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."
@@ -1065,6 +1101,15 @@ const submitter = await docuseal.updateSubmitter(500001, {
"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": {
@@ -1132,14 +1177,45 @@ const submitter = await docuseal.updateSubmitter(500001, {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -1826,6 +1902,46 @@ const template = await docuseal.createTemplateFromDocx({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -2330,7 +2446,7 @@ 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 <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
The API endpoint provides the functionality to create one-off submission request from a PDF. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href="https://www.docuseal.com/examples/fieldtags.pdf" target="_blank" class="link font-bold">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```typescript
@@ -2635,6 +2751,15 @@ const submission = await docuseal.createSubmissionFromPdf({
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -2697,14 +2822,45 @@ const submission = await docuseal.createSubmissionFromPdf({
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3071,6 +3227,15 @@ and typesetting industry</p>
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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.",
@@ -3133,14 +3298,45 @@ and typesetting industry</p>
"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."
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
@@ -3469,6 +3665,46 @@ const template = await docuseal.createTemplateFromPdf({
"Option B"
]
},
"validation": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"properties": {
@@ -3585,3 +3821,449 @@ const template = await docuseal.createTemplateFromPdf({
}
```
### Create a submission from DOCX
The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href="https://www.docuseal.com/examples/demo_template.docx" target="_blank" class="link font-bold">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and list. You can also use the <code>{{signature}}</code> fillable field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href="https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form" class="link">Use embedded text field tags to create a fillable form</a>
```typescript
import docuseal from "@docuseal/api";
docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
const submission = await docuseal.createSubmissionFromDocx({
name: "Test Submission Document",
variables: {
variable_name: "value"
},
documents: [
{
name: "string",
file: "base64"
}
],
submitters: [
{
role: "First Party",
email: "john.doe@example.com"
}
]
});
```
```json
{
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"operationId": "createSubmissionFromDocx",
"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
},
"variables": {
"type": "object",
"description": "Dynamic content variables object",
"example": {
"variable_name": "value"
}
},
"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."
},
"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."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"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": {
"type": "object",
"properties": {
"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}"
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"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.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- 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
},
"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
}
}
}
}
}
}
}
```
+11
View File
@@ -450,6 +450,11 @@ const token = jwt.sign({
"default": false,
"description": "Set `true` to display field name placeholders instead of the field type icons."
},
"withSignatureId": {
"type": "boolean",
"required": false,
"description": "Set to `true` to enable Signature ID by default for newly added fields. If set to `false`, the Signature ID toggle will be displayed under field settings, with the Signature ID turned off by default."
},
"onlyDefinedFields": {
"type": "boolean",
"required": false,
@@ -462,6 +467,12 @@ const token = jwt.sign({
"default": false,
"description": "Show template in preview mode without ability to edit it."
},
"inputMode": {
"type": "boolean",
"required": false,
"default": false,
"description": "Open template in data input mode to prefill fields with default values."
},
"autosave": {
"type": "boolean",
"required": false,
+11
View File
@@ -414,12 +414,23 @@
"default": false,
"description": "Set `true` to display field name placeholders instead of the field type icons."
},
"data-with-signature-id": {
"type": "boolean",
"required": false,
"description": "Set to `true` to enable Signature ID by default for newly added fields. If set to `false`, the Signature ID toggle will be displayed under field settings, with the Signature ID turned off by default."
},
"data-preview": {
"type": "boolean",
"required": false,
"default": false,
"description": "Show template in preview mode without ability to edit it."
},
"data-input-mode": {
"type": "boolean",
"required": false,
"default": false,
"description": "Open template in data input mode to prefill fields with default values."
},
"data-only-defined-fields": {
"type": "boolean",
"required": false,
+11
View File
@@ -441,6 +441,11 @@ const token = jwt.sign({
"default": false,
"description": "Set `true` to display field name placeholders instead of the field type icons."
},
"withSignatureId": {
"type": "boolean",
"required": false,
"description": "Set to `true` to enable Signature ID by default for newly added fields. If set to `false`, the Signature ID toggle will be displayed under field settings, with the Signature ID turned off by default."
},
"onlyDefinedFields": {
"type": "boolean",
"required": false,
@@ -453,6 +458,12 @@ const token = jwt.sign({
"default": false,
"description": "Show template in preview mode without ability to edit it."
},
"inputMode": {
"type": "boolean",
"required": false,
"default": false,
"description": "Open template in data input mode to prefill fields with default values."
},
"autosave": {
"type": "boolean",
"required": false,
+11
View File
@@ -456,6 +456,11 @@ const token = jwt.sign({
"default": false,
"description": "Set `true` to display field name placeholders instead of the field type icons."
},
"with-signature-id": {
"type": "boolean",
"required": false,
"description": "Set to `true` to enable Signature ID by default for newly added fields. If set to `false`, the Signature ID toggle will be displayed under field settings, with the Signature ID turned off by default."
},
"autosave": {
"type": "boolean",
"required": false,
@@ -468,6 +473,12 @@ const token = jwt.sign({
"default": false,
"description": "Show template in preview mode without ability to edit it."
},
"input-mode": {
"type": "boolean",
"required": false,
"default": false,
"description": "Open template in data input mode to prefill fields with default values."
},
"language": {
"type": "string",
"required": false,
+5 -3
View File
@@ -7,12 +7,14 @@
<docuseal-form
id="docusealForm"
data-src="https://docuseal.com/d/{{template_slug}}"
data-email="{{signer_email}}">
data-src="https://docuseal.com/d/{{ template_slug }}"
data-email="{{ signer_email }}">
</docuseal-form>
<script>
window.docusealForm.addEventListener('completed', (e) => e.detail)
window.docusealForm.addEventListener('completed', (e) => {
console.log(e.detail)
})
</script>
```
+1101 -34
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -146,6 +146,10 @@ During the form filling and signing process, 3 types of events may occur and are
"type": "string",
"description": "The submission URL."
},
"variables": {
"type": "object",
"description": "Dynamic content variables object."
},
"created_at": {
"type": "string",
"description": "The submission creation date.",
+4
View File
@@ -216,6 +216,10 @@ Get submission creation, completion, expiration, and archiving notifications usi
}
}
},
"variables": {
"type": "object",
"description": "Dynamic content variables object."
},
"created_by_user": {
"type": "object",
"properties": {
+9
View File
@@ -1,6 +1,8 @@
# frozen_string_literal: true
module Accounts
LINK_EXPIRES_AT = 40.minutes
module_function
def create_duplicate(account)
@@ -185,4 +187,11 @@ module Accounts
rescue TZInfo::InvalidTimezoneIdentifier
'UTC'
end
def link_expires_at(account)
return if AccountConfig.find_or_initialize_by(account: account,
key: AccountConfig::DOWNLOAD_LINKS_EXPIRE_KEY).value == false
LINK_EXPIRES_AT.from_now
end
end
+6 -1
View File
@@ -102,6 +102,7 @@ module ReplaceEmailVariables
return unless submitter
value = submitter.try(field_name)
expires_at = nil
if value_name
field = (submission.template_fields || submission.template.fields).find { |e| e['name'] == value_name }
@@ -114,7 +115,11 @@ module ReplaceEmailVariables
attachment = submitter.attachments.find { |e| e.uuid == attachment_uuid }
ActiveStorage::Blob.proxy_url(attachment.blob) if attachment
if attachment
expires_at ||= Accounts.link_expires_at(Account.new(id: submission.account_id))
ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:)
end
else
value[field&.dig('uuid')]
end
+2 -1
View File
@@ -70,6 +70,7 @@ module Submissions
def update_template_fields!(submission)
submission.template_fields = submission.template.fields
submission.variables_schema = submission.template.variables_schema
submission.template_schema = submission.template.schema
submission.template_submitters = submission.template.submitters if submission.template_submitters.blank?
@@ -239,7 +240,7 @@ module Submissions
item['conditions'].each_with_object([]) do |condition, acc|
result =
if fields_index[condition['field_uuid']]['submitter_uuid'] == include_submitter_uuid
if fields_index.dig(condition['field_uuid'], 'submitter_uuid') == include_submitter_uuid
submitter_conditions_acc << condition if submitter_conditions_acc
true
+12 -7
View File
@@ -18,12 +18,15 @@ module Submissions
set_submission_preferences['send_email'] = true if params['send_completed_email']
expire_at = attrs[:expire_at] || Templates.build_default_expire_at(template)
submission = template.submissions.new(created_by_user: user, source:,
account_id: user.account_id,
preferences: set_submission_preferences,
name: with_template ? attrs[:name] : (attrs[:name] || template.name),
expire_at:,
template_submitters: [], submitters_order:)
submission = template.submissions.new(
created_by_user: user, source:,
account_id: user.account_id,
preferences: set_submission_preferences,
name: with_template ? attrs[:name] : (attrs[:name].presence || template.name),
variables: attrs[:variables] || {},
expire_at:,
template_submitters: [], submitters_order:
)
template_submitters = template.submitters.deep_dup
@@ -139,9 +142,11 @@ module Submissions
end
if template_fields != (submission.template_fields || submission.template.fields) ||
submitters_attrs.any? { |e| e[:completed].present? } || !with_template
submitters_attrs.any? { |e| e[:completed].present? } || !with_template || submission.variables.present?
submission.template_fields = template_fields
submission.template_schema = submission.template.schema if submission.template_schema.blank?
submission.variables_schema = submission.template.variables_schema if submission.template_id &&
submission.variables_schema.blank?
end
submission
+74
View File
@@ -0,0 +1,74 @@
# frozen_string_literal: true
module Submissions
module EnsureAuditGenerated
WAIT_FOR_RETRY = 2.seconds
CHECK_EVENT_INTERVAL = 1.second
CHECK_COMPLETE_TIMEOUT = 90.seconds
KEY_PREFIX = 'audit_trail'
WaitForCompleteTimeout = Class.new(StandardError)
NotCompletedYet = Class.new(StandardError)
module_function
def call(submission)
return nil unless submission
raise NotCompletedYet unless submission.submitters.all?(&:completed_at?)
key = [KEY_PREFIX, submission.id].join(':')
if ApplicationRecord.uncached { LockEvent.exists?(key:, event_name: :complete) }
return submission.audit_trail_attachment
end
events = ApplicationRecord.uncached { LockEvent.where(key:).order(:id).to_a }
if events.present? && events.last.event_name.in?(%w[start retry])
wait_for_complete_or_fail(submission)
else
LockEvent.create!(key:, event_name: events.present? ? :retry : :start)
result = Submissions::GenerateAuditTrail.call(submission)
LockEvent.create!(key:, event_name: :complete)
result
end
rescue ActiveRecord::RecordNotUnique
sleep WAIT_FOR_RETRY
retry
rescue StandardError => e
Rollbar.error(e) if defined?(Rollbar)
Rails.logger.error(e)
LockEvent.create!(key:, event_name: :fail)
raise
end
def wait_for_complete_or_fail(submission)
total_wait_time = 0
loop do
sleep CHECK_EVENT_INTERVAL
total_wait_time += CHECK_EVENT_INTERVAL
last_event =
ApplicationRecord.uncached do
LockEvent.where(key: [KEY_PREFIX, submission.id].join(':')).order(:id).last
end
if last_event.event_name.in?(%w[complete fail])
break ApplicationRecord.uncached do
ActiveStorage::Attachment.find_by(record: submission, name: 'audit_trail')
end
end
raise WaitForCompleteTimeout if total_wait_time > CHECK_COMPLETE_TIMEOUT
end
end
end
end
@@ -0,0 +1,74 @@
# frozen_string_literal: true
module Submissions
module EnsureCombinedGenerated
WAIT_FOR_RETRY = 2.seconds
CHECK_EVENT_INTERVAL = 1.second
CHECK_COMPLETE_TIMEOUT = 90.seconds
KEY_PREFIX = 'combined_document'
WaitForCompleteTimeout = Class.new(StandardError)
NotCompletedYet = Class.new(StandardError)
module_function
def call(submitter)
return nil unless submitter
raise NotCompletedYet unless submitter.completed_at?
key = [KEY_PREFIX, submitter.id].join(':')
if ApplicationRecord.uncached { LockEvent.exists?(key:, event_name: :complete) }
return submitter.submission.combined_document_attachment
end
events = ApplicationRecord.uncached { LockEvent.where(key:).order(:id).to_a }
if events.present? && events.last.event_name.in?(%w[start retry])
wait_for_complete_or_fail(submitter)
else
LockEvent.create!(key:, event_name: events.present? ? :retry : :start)
result = Submissions::GenerateCombinedAttachment.call(submitter)
LockEvent.create!(key:, event_name: :complete)
result
end
rescue ActiveRecord::RecordNotUnique
sleep WAIT_FOR_RETRY
retry
rescue StandardError => e
Rollbar.error(e) if defined?(Rollbar)
Rails.logger.error(e)
LockEvent.create!(key:, event_name: :fail)
raise
end
def wait_for_complete_or_fail(submitter)
total_wait_time = 0
loop do
sleep CHECK_EVENT_INTERVAL
total_wait_time += CHECK_EVENT_INTERVAL
last_event =
ApplicationRecord.uncached do
LockEvent.where(key: [KEY_PREFIX, submitter.id].join(':')).order(:id).last
end
if last_event.event_name.in?(%w[complete fail])
break ApplicationRecord.uncached do
ActiveStorage::Attachment.find_by(record: submitter.submission, name: 'combined_document')
end
end
raise WaitForCompleteTimeout if total_wait_time > CHECK_COMPLETE_TIMEOUT
end
end
end
end
+8 -9
View File
@@ -16,21 +16,20 @@ module Submissions
raise NotCompletedYet unless submitter.completed_at?
return submitter.documents if ApplicationRecord.uncached { submitter.document_generation_events.complete.exists? }
key = ['result_attachments', submitter.id].join(':')
events =
ApplicationRecord.uncached do
DocumentGenerationEvent.where(submitter:).order(:created_at).to_a
end
return submitter.documents if ApplicationRecord.uncached { LockEvent.exists?(key:, event_name: :complete) }
events = ApplicationRecord.uncached { LockEvent.where(key:).order(:id).to_a }
if events.present? && events.last.event_name.in?(%w[start retry])
wait_for_complete_or_fail(submitter)
else
submitter.document_generation_events.create!(event_name: events.present? ? :retry : :start)
LockEvent.create!(key:, event_name: events.present? ? :retry : :start)
documents = GenerateResultAttachments.call(submitter)
submitter.document_generation_events.create!(event_name: :complete)
LockEvent.create!(key:, event_name: :complete)
documents
end
@@ -42,7 +41,7 @@ module Submissions
Rollbar.error(e) if defined?(Rollbar)
Rails.logger.error(e)
submitter.document_generation_events.create!(event_name: :fail)
LockEvent.create!(key:, event_name: :fail)
raise
end
@@ -56,7 +55,7 @@ module Submissions
last_event =
ApplicationRecord.uncached do
DocumentGenerationEvent.where(submitter:).order(:created_at).last
LockEvent.where(key: ['result_attachments', submitter.id].join(':')).order(:id).last
end
break submitter.documents.reload if last_event.event_name.in?(%w[complete fail])
+23 -2
View File
@@ -113,11 +113,13 @@ module Submissions
configs = submission.account.account_configs.where(key: [AccountConfig::WITH_AUDIT_VALUES_KEY,
AccountConfig::WITH_SIGNATURE_ID,
AccountConfig::WITH_FILE_LINKS_KEY,
AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY])
last_submitter = submission.submitters.select(&:completed_at).max_by(&:completed_at)
with_signature_id = configs.find { |c| c.key == AccountConfig::WITH_SIGNATURE_ID }&.value == true
with_file_links = configs.find { |c| c.key == AccountConfig::WITH_FILE_LINKS_KEY }&.value == true
with_audit_values = configs.find { |c| c.key == AccountConfig::WITH_AUDIT_VALUES_KEY }&.value != false
with_submitter_timezone = configs.find { |c| c.key == AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY }&.value == true
@@ -196,7 +198,7 @@ module Submissions
composer.draw_box(divider)
documents_data = Submitters.select_attachments_for_download(last_submitter).map do |document|
documents_data = select_attachments(last_submitter).map do |document|
original_documents = submission.schema_documents.select do |e|
e.uuid == (document.metadata['original_uuid'] || document.uuid)
end.presence
@@ -391,8 +393,13 @@ module Submissions
composer.formatted_text_box(
Array.wrap(value).map do |uuid|
attachment = submitter.attachments.find { |a| a.uuid == uuid }
link =
ActiveStorage::Blob.proxy_url(attachment.blob)
if with_file_links
ActiveStorage::Blob.proxy_url(attachment.blob)
else
r.submissions_preview_url(submission.slug, **Docuseal.default_url_options)
end
{ link:, text: "#{attachment.filename}\n", style: :link }
end,
@@ -472,6 +479,16 @@ module Submissions
'Signed with DocuSeal.com'
end
def select_attachments(submitter)
original_documents = submitter.submission.schema_documents.preload(:blob)
is_more_than_two_images = original_documents.count(&:image?) > 1
submitter.documents.preload(:blob).reject do |attachment|
is_more_than_two_images &&
original_documents.find { |a| a.uuid == (attachment.metadata['original_uuid'] || attachment.uuid) }&.image?
end
end
def maybe_add_background(_canvas, _submission, _page_size); end
def show_verify?(submission)
@@ -489,6 +506,10 @@ module Submissions
padding: [5, 0, 0, 8],
position: :float, text_align: :left)
end
def r
Rails.application.routes.url_helpers
end
# rubocop:enable Metrics
end
end
@@ -46,7 +46,7 @@ module Submissions
def sign_pdf(io, pdf, sign_params)
pdf.sign(io, **sign_params)
rescue HexaPDF::MalformedPDFError => e
rescue HexaPDF::MalformedPDFError, NoMethodError => e
Rollbar.error(e) if defined?(Rollbar)
pdf.sign(io, write_options: { incremental: false }, **sign_params)
+10 -8
View File
@@ -6,8 +6,8 @@ module Submissions
module_function
def call(submissions, format: :csv)
rows = build_table_rows(submissions)
def call(submissions, format: :csv, expires_at: nil)
rows = build_table_rows(submissions, expires_at:)
if format.to_sym == :csv
rows_to_csv(rows)
@@ -57,7 +57,7 @@ module Submissions
headers.map { |key| row.find { |e| e[:name] == key }&.dig(:value) }
end
def build_table_rows(submissions)
def build_table_rows(submissions, expires_at: nil)
submissions.preload(submitters: [attachments_attachments: :blob, documents_attachments: :blob])
.find_each.map do |submission|
submission_data = []
@@ -69,7 +69,7 @@ module Submissions
submission_data += build_submission_data(submitter, submitter_name, submitters_count)
submission_data += submitter_formatted_fields(submitter).map do |field|
submission_data += submitter_formatted_fields(submitter, expires_at:).map do |field|
{
name: column_name(field[:name], submitter_name, submitters_count),
value: field[:value]
@@ -81,7 +81,7 @@ module Submissions
submission_data += submitter.documents.map.with_index(1) do |attachment, index|
{
name: "#{I18n.t('document')} #{index}",
value: ActiveStorage::Blob.proxy_url(attachment.blob)
value: ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:)
}
end
end
@@ -123,7 +123,7 @@ module Submissions
submitters_count > 1 ? "#{submitter_name} - #{name}" : name
end
def submitter_formatted_fields(submitter)
def submitter_formatted_fields(submitter, expires_at: nil)
fields = submitter.submission.template_fields || submitter.submission.template.fields
template_fields = fields.select { |f| f['submitter_uuid'] == submitter.uuid }
@@ -142,11 +142,13 @@ module Submissions
value =
if template_field_type.in?(%w[image signature])
attachment = attachments_index[submitter_value]
ActiveStorage::Blob.proxy_url(attachment.blob) if attachment
ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:) if attachment
elsif template_field_type == 'file'
Array.wrap(submitter_value).compact_blank.filter_map do |e|
attachment = attachments_index[e]
ActiveStorage::Blob.proxy_url(attachment.blob) if attachment
ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:) if attachment
end
else
submitter_value
@@ -15,9 +15,11 @@ module Submissions
configs = submission.account.account_configs.where(key: [AccountConfig::FLATTEN_RESULT_PDF_KEY,
AccountConfig::WITH_SIGNATURE_ID,
AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY,
AccountConfig::WITH_FILE_LINKS_KEY,
AccountConfig::WITH_SIGNATURE_ID_REASON_KEY])
with_signature_id = configs.find { |c| c.key == AccountConfig::WITH_SIGNATURE_ID }&.value == true
with_file_links = configs.find { |c| c.key == AccountConfig::WITH_FILE_LINKS_KEY }&.value == true
is_flatten = configs.find { |c| c.key == AccountConfig::FLATTEN_RESULT_PDF_KEY }&.value != false
with_submitter_timezone = configs.find { |c| c.key == AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY }&.value == true
with_signature_id_reason =
@@ -34,7 +36,7 @@ module Submissions
submitters.preload(attachments_attachments: :blob).each_with_index do |s, index|
GenerateResultAttachments.fill_submitter_fields(s, submission.account, pdfs_index,
with_signature_id:, is_flatten:, with_headings: index.zero?,
with_submitter_timezone:,
with_submitter_timezone:, with_file_links:,
with_signature_id_reason:)
end
+26 -11
View File
@@ -139,12 +139,14 @@ module Submissions
def generate_pdfs(submitter)
configs = submitter.account.account_configs.where(key: [AccountConfig::FLATTEN_RESULT_PDF_KEY,
AccountConfig::WITH_SIGNATURE_ID,
AccountConfig::WITH_FILE_LINKS_KEY,
AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY,
AccountConfig::WITH_SIGNATURE_ID_REASON_KEY])
with_signature_id = configs.find { |c| c.key == AccountConfig::WITH_SIGNATURE_ID }&.value == true
is_flatten = configs.find { |c| c.key == AccountConfig::FLATTEN_RESULT_PDF_KEY }&.value != false
with_submitter_timezone = configs.find { |c| c.key == AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY }&.value == true
with_file_links = configs.find { |c| c.key == AccountConfig::WITH_FILE_LINKS_KEY }&.value == true
with_signature_id_reason =
configs.find { |c| c.key == AccountConfig::WITH_SIGNATURE_ID_REASON_KEY }&.value != false
@@ -192,22 +194,25 @@ module Submissions
fill_submitter_fields(submitter, submitter.account, pdfs_index, with_signature_id:, is_flatten:,
with_submitter_timezone:,
with_file_links:,
with_signature_id_reason:)
end
def fill_submitter_fields(submitter, account, pdfs_index, with_signature_id:, is_flatten:, with_headings: nil,
with_submitter_timezone: false, with_signature_id_reason: true)
with_submitter_timezone: false, with_signature_id_reason: true, with_file_links: nil)
cell_layouter = HexaPDF::Layout::TextLayouter.new(text_valign: :center, text_align: :center)
attachments_data_cache = {}
return pdfs_index if submitter.submission.template_fields.blank?
submission = submitter.submission
with_headings = find_last_submitter(submitter.submission, submitter:).blank? if with_headings.nil?
return pdfs_index if submission.template_fields.blank?
with_headings = find_last_submitter(submission, submitter:).blank? if with_headings.nil?
locale = submitter.metadata.fetch('lang', account.locale)
submitter.submission.template_fields.each do |field|
submission.template_fields.each do |field|
next if field['type'] == 'heading' && !with_headings
next if field['submitter_uuid'] != submitter.uuid && field['type'] != 'heading'
@@ -224,7 +229,7 @@ module Submissions
page[:Annots] ||= []
page[:Annots] = page[:Annots].try(:reject) do |e|
next if e.is_a?(Integer)
next if e.is_a?(Integer) || e.is_a?(Symbol)
e.present? && e[:A] && e[:A][:URI].to_s.starts_with?('file:///docuseal_field')
end || page[:Annots]
@@ -464,6 +469,13 @@ module Submissions
diff = ((area['h'] * height) / 2) - (lines.sum(&:height) / 2)
url =
if with_file_links
ActiveStorage::Blob.proxy_url(attachment.blob)
else
r.submissions_preview_url(submission.slug, **Docuseal.default_url_options)
end
page[:Annots] << pdf.add(
{
Type: :Annot, Subtype: :Link,
@@ -475,8 +487,7 @@ module Submissions
height - (area['y'] * height) - lines[..next_index].sum(&:height) +
height_diff - (height_diff.zero? ? diff : 0)
],
A: { Type: :Action, S: :URI,
URI: ActiveStorage::Blob.proxy_url(attachment.blob) }
A: { Type: :Action, S: :URI, URI: url }
}
)
@@ -650,7 +661,7 @@ module Submissions
begin
pdf.sign(io, write_options: { validate: false }, **sign_params)
rescue HexaPDF::MalformedPDFError => e
rescue HexaPDF::MalformedPDFError, NoMethodError => e
Rollbar.error(e) if defined?(Rollbar)
pdf.sign(io, write_options: { validate: false, incremental: false }, **sign_params)
@@ -660,7 +671,7 @@ module Submissions
else
begin
pdf.write(io, incremental: true, validate: false)
rescue HexaPDF::MalformedPDFError => e
rescue HexaPDF::MalformedPDFError, NoMethodError => e
Rollbar.error(e) if defined?(Rollbar)
pdf.write(io, incremental: false, validate: false)
@@ -747,11 +758,15 @@ module Submissions
def maybe_rotate_pdf(pdf)
return pdf if pdf.pages.size > MAX_PAGE_ROTATE
is_pages_rotated = pdf.pages.root[:Rotate].present? && pdf.pages.root[:Rotate] != 0
pdf.pages.root[:Rotate] = 0 if is_pages_rotated
is_rotated = pdf.pages.filter_map do |page|
page.rotate(0, flatten: true) if page[:Rotate] != 0
end.present?
return pdf unless is_rotated
return pdf if !is_rotated && !is_pages_rotated
io = StringIO.new
@@ -873,7 +888,7 @@ module Submissions
end
end
def h
def r
Rails.application.routes.url_helpers
end
end
+14 -8
View File
@@ -4,7 +4,6 @@ module Submissions
module SerializeForApi
SERIALIZE_PARAMS = {
only: %i[id name slug source submitters_order expire_at created_at updated_at archived_at],
methods: %i[audit_log_url combined_document_url],
include: {
submitters: { only: %i[id] },
template: { only: %i[id name external_id created_at updated_at],
@@ -15,23 +14,24 @@ module Submissions
module_function
def call(submission, submitters = nil, params = {}, with_events: true, with_documents: true, with_values: true)
def call(submission, submitters = nil, params = {}, with_events: true, with_documents: true, with_values: true,
expires_at: Accounts.link_expires_at(Account.new(id: submission.account_id)))
submitters ||= submission.submitters.preload(documents_attachments: :blob, attachments_attachments: :blob)
serialized_submitters = submitters.map do |submitter|
Submitters::SerializeForApi.call(submitter, with_documents:, with_events: false, with_values:, params:)
Submitters::SerializeForApi.call(submitter, with_documents:, with_events: false, with_values:, params:,
expires_at:)
end
json = submission.as_json(SERIALIZE_PARAMS)
json['variables'] = (submission.variables || {}).as_json
json['created_by_user'] ||= nil
if with_events
json['submission_events'] = Submitters::SerializeForApi.serialize_events(submission.submission_events)
end
json['combined_document_url'] ||= maybe_build_combined_url(submitters, submission, params)
if submitters.all?(&:completed_at?)
last_submitter = submitters.max_by(&:completed_at)
@@ -39,10 +39,16 @@ module Submissions
json['documents'] = serialized_submitters.find { |e| e['id'] == last_submitter.id }['documents']
end
json['audit_log_url'] = submission.audit_log_url(expires_at:)
json['combined_document_url'] = submission.combined_document_url(expires_at:)
json['combined_document_url'] ||= maybe_build_combined_url(submitters, submission, params, expires_at:)
json['status'] = 'completed'
json['completed_at'] = last_submitter.completed_at.as_json
else
json['documents'] = [] if with_documents
json['audit_log_url'] = nil
json['combined_document_url'] = nil
json['status'] = build_status(submission, submitters)
json['completed_at'] = nil
end
@@ -60,7 +66,7 @@ module Submissions
end
end
def maybe_build_combined_url(submitters, submission, params)
def maybe_build_combined_url(submitters, submission, params, expires_at: nil)
return unless submitters.all?(&:completed_at?)
attachment = submission.combined_document_attachment
@@ -68,10 +74,10 @@ module Submissions
if !attachment && params[:include].to_s.include?('combined_document_url')
submitter = submitters.max_by(&:completed_at)
attachment = Submissions::GenerateCombinedAttachment.call(submitter)
attachment = Submissions::EnsureCombinedGenerated.call(submitter)
end
ActiveStorage::Blob.proxy_url(attachment.blob) if attachment
ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:) if attachment
end
end
end
+3 -2
View File
@@ -94,8 +94,9 @@ module Submitters
def select_attachments_for_download(submitter)
if AccountConfig.exists?(account_id: submitter.submission.account_id,
key: AccountConfig::COMBINE_PDF_RESULT_KEY,
value: true) && submitter.submission.combined_document_attachment
return [submitter.submission.combined_document_attachment]
value: true) &&
submitter.submission.submitters.all?(&:completed_at?)
return [submitter.submission.combined_document_attachment || Submissions::EnsureCombinedGenerated.call(submitter)]
end
original_documents = submitter.submission.schema_documents.preload(:blob)
+8 -4
View File
@@ -11,7 +11,7 @@ module Submitters
module_function
def call(submitter, with_template: false, with_events: false, with_documents: true, with_urls: false,
with_values: true, params: {})
with_values: true, params: {}, expires_at: Accounts.link_expires_at(Account.new(id: submitter.account_id)))
ActiveRecord::Associations::Preloader.new(
records: [submitter],
associations: if with_documents
@@ -24,15 +24,19 @@ module Submitters
additional_attrs = {}
if params[:include].to_s.include?('fields')
additional_attrs['fields'] = SerializeForWebhook.build_fields_array(submitter)
additional_attrs['fields'] = SerializeForWebhook.build_fields_array(submitter, expires_at:)
end
if with_template
additional_attrs['template'] = submitter.submission.template.as_json(only: %i[id name created_at updated_at])
end
additional_attrs['values'] = SerializeForWebhook.build_values_array(submitter) if with_values
additional_attrs['documents'] = SerializeForWebhook.build_documents_array(submitter) if with_documents
additional_attrs['values'] = SerializeForWebhook.build_values_array(submitter, expires_at:) if with_values
if with_documents
additional_attrs['documents'] = SerializeForWebhook.build_documents_array(submitter, expires_at:)
end
additional_attrs['preferences'] = submitter.preferences.except('default_values')
additional_attrs['submission_events'] = serialize_events(submitter.submission_events) if with_events
+19 -19
View File
@@ -10,13 +10,13 @@ module Submitters
module_function
def call(submitter)
def call(submitter, expires_at: Accounts.link_expires_at(Account.new(id: submitter.account_id)))
ActiveRecord::Associations::Preloader.new(
records: [submitter], associations: [documents_attachments: :blob, attachments_attachments: :blob]
).call
values = build_values_array(submitter)
documents = build_documents_array(submitter)
values = build_values_array(submitter, expires_at:)
documents = build_documents_array(submitter, expires_at:)
submission = submitter.submission
@@ -32,23 +32,23 @@ module Submitters
'preferences' => submitter.preferences.except('default_values'),
'values' => values,
'documents' => documents,
'audit_log_url' => submitter.submission.audit_log_url,
'audit_log_url' => submitter.submission.audit_log_url(expires_at:),
'submission_url' => r.submissions_preview_url(submission.slug, **Docuseal.default_url_options),
'template' => submission.template.as_json(
only: %i[id name external_id created_at updated_at],
methods: %i[folder_name]
only: %i[id name external_id created_at updated_at], methods: %i[folder_name]
),
'submission' => {
'id' => submission.id,
'audit_log_url' => submission.audit_log_url,
'combined_document_url' => submission.combined_document_url,
'audit_log_url' => submission.audit_log_url(expires_at:),
'combined_document_url' => submission.combined_document_url(expires_at:),
'status' => build_submission_status(submission),
'url' => r.submissions_preview_url(submission.slug, **Docuseal.default_url_options),
'variables' => (submission.variables || {}).as_json,
'created_at' => submission.created_at.as_json
})
end
def build_values_array(submitter)
def build_values_array(submitter, expires_at: nil)
fields = submitter.submission.template_fields.presence || submitter.submission&.template&.fields || []
attachments_index = submitter.attachments.index_by(&:uuid)
submitter_field_counters = Hash.new { 0 }
@@ -64,13 +64,13 @@ module Submitters
next if !submitter.values.key?(field['uuid']) && !submitter.completed_at?
value = fetch_field_value(field, submitter.values[field['uuid']], attachments_index)
value = fetch_field_value(field, submitter.values[field['uuid']], attachments_index, expires_at:)
{ 'field' => field_name, 'value' => value }
end
end
def build_fields_array(submitter)
def build_fields_array(submitter, expires_at: nil)
fields = submitter.submission.template_fields.presence || submitter.submission&.template&.fields || []
attachments_index = submitter.attachments.index_by(&:uuid)
submitter_field_counters = Hash.new { 0 }
@@ -86,7 +86,7 @@ module Submitters
next if !submitter.values.key?(field['uuid']) && !submitter.completed_at?
value = fetch_field_value(field, submitter.values[field['uuid']], attachments_index)
value = fetch_field_value(field, submitter.values[field['uuid']], attachments_index, expires_at:)
{ 'name' => field_name, 'uuid' => field['uuid'], 'value' => value, 'readonly' => field['readonly'] == true }
end
@@ -104,26 +104,26 @@ module Submitters
end
end
def build_documents_array(submitter)
def build_documents_array(submitter, expires_at: nil)
submitter.documents.map do |attachment|
{ 'name' => attachment.filename.base, 'url' => rails_storage_proxy_url(attachment) }
{ 'name' => attachment.filename.base, 'url' => rails_storage_proxy_url(attachment, expires_at:) }
end
end
def fetch_field_value(field, value, attachments_index)
def fetch_field_value(field, value, attachments_index, expires_at: nil)
if field['type'].in?(%w[image signature initials stamp payment])
rails_storage_proxy_url(attachments_index[value])
rails_storage_proxy_url(attachments_index[value], expires_at:)
elsif field['type'] == 'file'
Array.wrap(value).compact_blank.filter_map { |e| rails_storage_proxy_url(attachments_index[e]) }
Array.wrap(value).compact_blank.filter_map { |e| rails_storage_proxy_url(attachments_index[e], expires_at:) }
else
value
end
end
def rails_storage_proxy_url(attachment)
def rails_storage_proxy_url(attachment, expires_at: nil)
return if attachment.blank?
ActiveStorage::Blob.proxy_url(attachment.blob)
ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:)
end
def r
+4
View File
@@ -37,6 +37,10 @@ module Templates
hash
end
def maybe_assign_access(_template)
nil
end
def search(current_user, templates, keyword)
if Docuseal.fulltext_search?
fulltext_search(current_user, templates, keyword)
+1
View File
@@ -10,6 +10,7 @@ module Templates
pdf.pages.flat_map.with_index do |page, index|
(page[:Annots] || []).filter_map do |annot|
next if annot.blank?
next if annot.is_a?(Integer) || annot.is_a?(Symbol)
next if annot[:A].blank? || annot[:A][:URI].blank?
next unless annot[:Subtype] == :Link
next if !annot[:A][:URI].starts_with?('https://') && !annot[:A][:URI].starts_with?('http://')
+4 -1
View File
@@ -225,7 +225,10 @@ module Templates
is_option_number = option.is_a?(Symbol) && option.to_s.match?(/\A\d+\z/)
option = option[1] if option.is_a?(Array) && option.size == 2
option = option.encode('utf-8', invalid: :replace, undef: :replace, replace: '') if option.is_a?(String)
if option.is_a?(String) || option.is_a?(Symbol)
option = option.to_s.encode('utf-8', invalid: :replace, undef: :replace, replace: '')
end
next if type == 'select' && option.to_s.match?(SELECT_PLACEHOLDER_REGEXP)
+4 -3
View File
@@ -14,7 +14,8 @@ module Templates
module_function
def call(template, schema_documents = template.schema_documents.preload(:blob), preview_image_attachments = nil)
def call(template, schema_documents: template.schema_documents.preload(:blob), preview_image_attachments: nil,
expires_at: Accounts.link_expires_at(Account.new(id: template.account_id)))
json = template.as_json(SERIALIZE_PARAMS)
preview_image_attachments ||=
@@ -40,8 +41,8 @@ module Templates
{
'id' => attachment.id,
'uuid' => attachment.uuid,
'url' => ActiveStorage::Blob.proxy_url(attachment.blob),
'preview_image_url' => first_page_blob && ActiveStorage::Blob.proxy_url(first_page_blob),
'url' => ActiveStorage::Blob.proxy_url(attachment.blob, expires_at:),
'preview_image_url' => first_page_blob && ActiveStorage::Blob.proxy_url(first_page_blob, expires_at:),
'filename' => attachment.filename
}
end
+12
View File
@@ -0,0 +1,12 @@
# frozen_string_literal: true
FactoryBot.define do
factory :email_event do
account
event_type { 'bounce' }
message_id { SecureRandom.uuid }
tag { 'submitter_invitation' }
email { Faker::Internet.email }
event_datetime { 1.hour.ago }
end
end
+2
View File
@@ -298,6 +298,7 @@ describe 'Submission API' do
completed_at: nil,
created_at: submission.created_at,
updated_at: submission.updated_at,
variables: {},
archived_at: nil,
status: 'pending',
submitters:,
@@ -358,6 +359,7 @@ describe 'Submission API' do
completed_at: nil,
created_at: submission.created_at,
updated_at: submission.updated_at,
variables: {},
archived_at: nil,
submitters:,
template: {
+7 -3
View File
@@ -8,6 +8,10 @@ describe 'Templates API' do
let(:folder) { create(:template_folder, account:) }
let(:template_preferences) { { 'request_email_subject' => 'Subject text', 'request_email_body' => 'Body Text' } }
before do
allow(Accounts).to receive(:link_expires_at).and_return(Accounts::LINK_EXPIRES_AT)
end
describe 'GET /api/templates' do
it 'returns a list of templates' do
templates = [
@@ -211,8 +215,8 @@ describe 'Templates API' do
{
id: template.documents.first.id,
uuid: template.documents.first.uuid,
url: ActiveStorage::Blob.proxy_url(attachment.blob),
preview_image_url: ActiveStorage::Blob.proxy_url(first_page_blob),
url: ActiveStorage::Blob.proxy_url(attachment.blob, expires_at: Accounts::LINK_EXPIRES_AT),
preview_image_url: ActiveStorage::Blob.proxy_url(first_page_blob, expires_at: Accounts::LINK_EXPIRES_AT),
filename: 'sample-document.pdf'
}
],
@@ -235,7 +239,7 @@ describe 'Templates API' do
folder_name: folder.name,
source: 'native',
external_id: template.external_id,
application_key: template.external_id # Backward compatibility
application_key: template.external_id
}
end
+22
View File
@@ -14,4 +14,26 @@ RSpec.describe 'API Settings' do
token = user.access_token.token
expect(page).to have_field('X-Auth-Token', with: token.sub(token[5..], '*' * token[5..].size))
end
it 'reveals API key with correct password' do
find('#api_key').click
within('.modal') do
fill_in 'password', with: user.password
click_button 'Submit'
end
expect(page).to have_field('X-Auth-Token', with: user.access_token.token)
end
it 'shows error with incorrect password' do
find('#api_key').click
within('.modal') do
fill_in 'password', with: 'wrong_password'
click_button 'Submit'
end
expect(page).to have_content('Wrong password')
end
end

Some files were not shown because too many files have changed in this diff Show More