<%= render 'shared/settings_nav' %>

API

<%= render 'shared/test_mode_toggle' %>
<% token = current_user.access_token.token %> <%= 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') %>
<%= 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_') } %>
<%= t('request_signature_multiple_submitters_with_default_values') %>
POST
<%= api_submissions_path %>
<% text = capture do %>curl --location '<%= api_submissions_url %>' \ --header 'X-Auth-Token: <%= current_user.access_token.token %>' \ --data-raw '{ "template_id": <%= current_account.templates.last&.id || 1 %>, "submitters": [ { "name": "John Doe", "role": "<%= current_account.templates.last ? current_account.templates.last.submitters.first['name'] : 'First Party' %>", "email": "<%= current_user.email.sub('@', '+test@') %>", "values": { "Form Text Field Name": "Default Value" } }, { "role": "Second Submitter", "email": "<%= current_user.email.sub('@', '+test2@') %>" } ] }'<% end.to_str %> <%= 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') %>
<%= text %>
<%= t('request_signature_single_submitter') %>
POST
<%= api_submissions_emails_path %>
<% text = capture do %>curl --location '<%= api_submissions_emails_url %>' \ --header 'X-Auth-Token: <%= current_user.access_token.token %>' \ --data-raw '{ "template_id": <%= current_account.templates.last&.id || 1 %>, "emails": "<%= current_user.email.sub('@', '+test@') %>, <%= current_user.email.sub('@', '+test2@') %>" }'<% end.to_str %> <%= 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') %>
<%= text %>
<%= t('template_details') %>
GET
<%= api_template_path(':id') %>
<% text = capture do %>curl '<%= api_template_url(current_account.templates&.last || 1) %>' \ --header 'X-Auth-Token: <%= current_user.access_token.token %>'<% end.to_str %> <%= 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') %>
<%= text %>
<%= link_to t('open_full_api_reference'), "#{Docuseal::PRODUCT_URL}/docs/api", class: 'btn btn-warning text-base mt-4 px-8', target: '_blank', rel: 'noopener' %>