Skip to content

Commit 11a118f

Browse files
committed
Update to version 4.6.0 on 2026-11-07
- **BREAKING CHANGE**: Each operation's parameters struct (`docspring::CreateSubmissionParams`) is `#[non_exhaustive]`, so it can only be built with its builder (`CreateSubmissionParams::builder()`), not a struct literal. A new optional parameter no longer breaks your code. - Changed: the request validator refuses a `filename` that's blank or only whitespace (create_template, update_template_document), and an empty `field_groups` list in update_template. - New: a 409 `idempotency_key_in_use` error names what the first request with the key did: the email action (`email_action_id`) or email domain (`email_domain_id`) it created, or the template whose fields it changed or whose version it published (`template_id`). - New: `Template` has `form_sections`, the web form's sections in order (`TemplateFormSection`: an `id`, a `title`, a `description` and the `field_ids` in it), which update_template takes too. Setting them replaces all of the sections. - New: `Template` has `success_title`, `success_message` and `show_fill_again_button`, what the web form shows once it's submitted, which create_template and update_template take too. - New: create_template and upload_template take `include_office_use_fields`: with `detect_fields`, whether AI field setup keeps the fields that only the office receiving the form fills in, such as a "For office use only" box. It leaves them out by default (your account's template settings).
1 parent f4074af commit 11a118f

33 files changed

Lines changed: 579 additions & 157 deletions

‎.github/workflows/release.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ jobs:
4848
persist-credentials: false
4949
- uses: rust-lang/crates-io-auth-action@3268eb413133e2960fa4ae0e963ca76380c54cd9 # v1.0.6
5050
id: auth
51-
- run: cargo publish
51+
# --no-verify: the build job's dry run built the same commit. Building again here would run the dependencies'
52+
# build scripts and macros (there's no Cargo.lock) with the token in the environment.
53+
- run: cargo publish --no-verify
5254
env:
5355
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
5456

‎.openapi-generator/FILES‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ docs/TemplateFieldLogicStatus.md
157157
docs/TemplateFieldMove.md
158158
docs/TemplateFields.md
159159
docs/TemplateFormMode.md
160+
docs/TemplateFormSection.md
161+
docs/TemplateFormSectionInput.md
160162
docs/TemplateModelCode.md
161163
docs/TemplatePageAiError.md
162164
docs/TemplatePageAiNamingStatus.md
@@ -352,6 +354,8 @@ src/models/template_field_logic_status.rs
352354
src/models/template_field_move.rs
353355
src/models/template_fields.rs
354356
src/models/template_form_mode.rs
357+
src/models/template_form_section.rs
358+
src/models/template_form_section_input.rs
355359
src/models/template_model_code.rs
356360
src/models/template_page_ai_error.rs
357361
src/models/template_page_ai_naming_status.rs

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ keeps it.
2020
- https://docspring.com/docs/: the guides. https://docspring.com/docs/api/: the API reference, with Rust code
2121
for every method.
2222
- https://docspring.com/api-docs/v2/openapi.json: the OpenAPI spec this SDK is generated from.
23+
- https://docspring.com/docs/cli/: the DocSpring CLI (`docspring`), for scripts and terminal work outside Rust
24+
code. https://docspring.com/docs/mcp/: the MCP server, which connects AI assistants to a DocSpring account.
2325

2426
## Set up
2527

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
### 4.6.0 [November 7, 2026]
2+
3+
- **BREAKING CHANGE**: Each operation's parameters struct (`docspring::CreateSubmissionParams`) is `#[non_exhaustive]`,
4+
so it can only be built with its builder (`CreateSubmissionParams::builder()`), not a struct literal. A new optional
5+
parameter no longer breaks your code.
6+
- Changed: the request validator refuses a `filename` that's blank or only whitespace (create_template,
7+
update_template_document), and an empty `field_groups` list in update_template.
8+
- New: a 409 `idempotency_key_in_use` error names what the first request with the key did: the email action
9+
(`email_action_id`) or email domain (`email_domain_id`) it created, or the template whose fields it changed or whose
10+
version it published (`template_id`).
11+
- New: `Template` has `form_sections`, the web form's sections in order (`TemplateFormSection`: an `id`, a `title`, a
12+
`description` and the `field_ids` in it), which update_template takes too. Setting them replaces all of the sections.
13+
- New: `Template` has `success_title`, `success_message` and `show_fill_again_button`, what the web form shows once
14+
it's submitted, which create_template and update_template take too.
15+
- New: create_template and upload_template take `include_office_use_fields`: with `detect_fields`, whether AI field
16+
setup keeps the fields that only the office receiving the form fills in, such as a "For office use only" box. It
17+
leaves them out by default (your account's template settings).
18+
119
### 4.5.0 [November 3, 2026]
220

321
- Response models keep fields added to the API after this version in `additional_properties`, a `serde_json::Map`,

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "docspring"
3-
version = "4.5.0"
3+
version = "4.6.0"
44
authors = ["DocSpring <support@docspring.com>"]
55
description = "Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures."
66
license = "MIT"

‎README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ e-signatures.
1010
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1111
pull requests are welcome.
1212

13-
Version 4.5.0. Requires Rust 1.88 or later.
13+
Outside Rust code, the [DocSpring CLI](https://docspring.com/docs/cli/) calls the same API from a terminal or a
14+
shell script, and the [MCP server](https://docspring.com/docs/mcp/) connects AI assistants to your account.
15+
16+
Version 4.6.0. Requires Rust 1.88 or later.
1417

1518
## Install and configure
1619

1720
Add the crate to your `Cargo.toml`, with Tokio to run its async methods and serde_json to build the data you send:
1821

1922
```toml
2023
[dependencies]
21-
docspring = "4.5.0"
24+
docspring = "4.6.0"
2225
serde_json = "1"
2326
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
2427
```

‎docs/Client.md‎

Lines changed: 49 additions & 48 deletions
Large diffs are not rendered by default.

‎docs/CreateSubmissionRequest.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**test** | Option<**bool**> | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions, and the demo API token's are always live. | [optional]
88
**editable** | Option<**bool**> | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | [optional]
9-
**data** | Option<**std::collections::HashMap<String, serde_json::Value>**> | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). | [optional]
9+
**data** | Option<**std::collections::HashMap<String, serde_json::Value>**> | The values of the template's fields, by field name. Required for PDF templates, Word templates and page designs, unless `signature_requests` collects them (PDF templates only). Signatures come only from signature requests: a value for a signature or initials field makes the submission `invalid_data`, in test mode too. To print an image or a name you send, use an Image or Text field. | [optional]
1010
**metadata** | Option<**std::collections::HashMap<String, serde_json::Value>**> | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`). | [optional]
1111
**password** | Option<**String**> | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. Word documents and OpenDocument files can't be password-protected, so a submission with a password can't make them. | [optional]
1212
**output_formats** | Option<[**HashSet<models::OutputFormat>**](OutputFormat.md)> | What the submission makes: `pdf`, `docx` (a Word document, from a Word template), `odt` (an OpenDocument file, the format LibreOffice uses, converted from a Word template's Word document), and `png` (an image of each page of the PDF, up to 100 pages, which adds `pdf`) when you ask for it. Default `["pdf"]`, or a Word template's `output_format`. POST /submissions/{submission_id}/generate_files adds `png`, and a Word template's submission's `pdf`, `docx` or `odt`, to a processed submission. | [optional]
1313
**expires_in** | Option<**i32**> | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. The demo API token's submissions expire within an hour: up to 3600, and that's their default. | [optional]
14-
**field_overrides** | Option<[**std::collections::HashMap<String, models::FieldOverride>**](FieldOverride.md)> | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`. | [optional]
14+
**field_overrides** | Option<[**std::collections::HashMap<String, models::FieldOverride>**](FieldOverride.md)> | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. A `default` for a signature or initials field makes the submission `invalid_data`. With `signature_requests`, `editable: true` is a 422. | [optional]
1515
**html** | Option<**String**> | For an HTML template, HTML to use instead of the template's. | [optional]
1616
**css** | Option<**String**> | For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity. | [optional]
17-
**signature_requests** | Option<[**Vec<models::SignatureRequestInput>**](SignatureRequestInput.md)> | The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out. Only the signers sign: a value for a signature or initials field in `data` makes the submission `invalid_data`. | [optional]
17+
**signature_requests** | Option<[**Vec<models::SignatureRequestInput>**](SignatureRequestInput.md)> | The people who sign the PDF, and fill in their fields first. The PDF is generated once every signature request is completed. PDF templates only. Without `role`s, the first signature request is `Signer 1`, the second `Signer 2`, and so on. To leave a signer out, give every signature request its `role` and leave that one's out. | [optional]
1818
**send_email** | Option<**bool**> | Whether DocSpring emails the signers their signing links, and sends the reminders and the completed document. Default true. Each signature request's own `send_email` overrides it. A test submission only emails your DocSpring team: every other address is a 422. `true` needs `signature_requests`. DocSpring doesn't email the signers of a form library template: leave `send_email` out, and send them their links yourself. | [optional]
1919
**signing_order** | Option<[**models::SigningOrder**](SigningOrder.md)> | `parallel` (the default): everyone can sign at once. `sequential`: people sign one step at a time (`signing_step`), and DocSpring emails each step when the one before it is done. Needs `signature_requests`. | [optional]
2020
**email_subject** | Option<**String**> | The subject of the emails that ask people to sign. You can use `{{ signer.name }}`, `{{ signer.email }}`, `{{ document.name }}`, `{{ sender.name }}` and `{{ account.name }}`. Default "<sender> sent you <document> to sign" when you leave it out (a blank subject is a 422). Links and web addresses are shown as plain text (`example[.]com`). | [optional]

0 commit comments

Comments
 (0)