Skip to content

Commit 6bdb778

Browse files
committed
Updated on 2026-10-19 10:06:21. Version: 3.3.0
1 parent d020efb commit 6bdb778

141 files changed

Lines changed: 510 additions & 182 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.openapi-generator/FILES‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ docs/CustomFile.md
2828
docs/ErrorOrMultipleErrorsResponse.md
2929
docs/ErrorResponse.md
3030
docs/Folder.md
31+
docs/ForbiddenErrorResponse.md
3132
docs/JsonSchema.md
3233
docs/ListSubmissionsResponse.md
3334
docs/MoveFolderData.md
@@ -93,6 +94,7 @@ docspring/models/custom_file.py
9394
docspring/models/error_or_multiple_errors_response.py
9495
docspring/models/error_response.py
9596
docspring/models/folder.py
97+
docspring/models/forbidden_error_response.py
9698
docspring/models/json_schema.py
9799
docspring/models/list_submissions_response.py
98100
docspring/models/move_folder_data.py
@@ -160,6 +162,7 @@ test/test_custom_file.py
160162
test/test_error_or_multiple_errors_response.py
161163
test/test_error_response.py
162164
test/test_folder.py
165+
test/test_forbidden_error_response.py
163166
test/test_json_schema.py
164167
test/test_list_submissions_response.py
165168
test/test_move_folder_data.py

‎CHANGELOG.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
### 3.3.0 [October 18, 2026]
2+
3+
- Submissions and combined submissions can be in the new `insufficient_credits` state: a live PDF that your credit
4+
balance can't cover is saved and processed once you add credits. See
5+
https://docspring.com/docs/api-guide/credits-and-rate-limits/.
6+
- generate_pdf, batch_generate_pdfs and combine_pdfs document the 402 response for insufficient credits. Their
7+
responses can include a `code`, which is `insufficient_credits` on a 402.
8+
- generate_pdf, batch_generate_pdfs, create_pdf_template, create_pdf_template_from_upload, create_html_template and
9+
copy_template document a 403 response with a `code` of `upgrade_required` (the plan doesn't include it) or
10+
`account_suspended`.
11+
112
### 3.2.0 [October 18, 2026]
213

314
- Response models keep fields this version doesn't know in `additional_properties`.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ templates with your data, generates PDFs from HTML templates, combines PDFs and
66
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
77
[PyPI](https://pypi.org/project/docspring/) · [Changelog](https://github.com/DocSpring/docspring-python/blob/main/CHANGELOG.md)
88

9-
Version 3.2.0. Requires Python >=3.9.
9+
Version 3.3.0. Requires Python >=3.9.
1010

1111
## Install and configure
1212

‎docs/BatchGeneratePdfs201Response.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**errors** | **List[str]** | | [optional]
1111
**submission_batch** | [**SubmissionBatch**](SubmissionBatch.md) | |
1212
**submissions** | **List[object]** | |
13+
**code** | **str** | `insufficient_credits` when the response is a 402. | [optional]
1314

1415
## Example
1516

‎docs/Client.md‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ Generates up to 50 PDFs in a single request. Each submission can use a different
146146
and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More
147147
efficient than individual requests when creating multiple PDFs.
148148

149+
Live PDFs use credits. If any live submission is waiting for credits, the API returns 402 and the
150+
others are still processed: check each submission's `state`. See
151+
[Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
152+
149153
See also:
150154
- [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
151155

@@ -221,6 +225,8 @@ Name | Type | Description | Notes
221225

222226
| Status code | Description | Response headers |
223227
|-------------|-------------|------------------|
228+
**402** | insufficient credits | - |
229+
**403** | account suspended | - |
224230
**201** | submissions created | - |
225231
**200** | some PDFs with invalid data | - |
226232
**401** | authentication failed | - |
@@ -238,6 +244,11 @@ Combines multiple PDFs from various sources into a single PDF file. Supports mer
238244
submission PDFs, template PDFs, custom files, other merged PDFs,
239245
and PDFs from URLs. Merges the PDFs in the order provided.
240246

247+
Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API
248+
token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined
249+
submission waits in the `insufficient_credits` state until you add credits. See
250+
[Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
251+
241252

242253
### Example
243254

@@ -308,9 +319,10 @@ Name | Type | Description | Notes
308319

309320
| Status code | Description | Response headers |
310321
|-------------|-------------|------------------|
322+
**402** | insufficient credits | - |
323+
**403** | test API token used to delete custom files | - |
311324
**201** | combined submission created | - |
312325
**422** | invalid request | - |
313-
**403** | test API token used to delete custom files | - |
314326
**400** | invalid JSON | - |
315327
**401** | authentication failed | - |
316328

@@ -398,6 +410,7 @@ Name | Type | Description | Notes
398410
| Status code | Description | Response headers |
399411
|-------------|-------------|------------------|
400412
**200** | copy template success | - |
413+
**403** | the plan's template limit is reached | - |
401414
**404** | folder not found | - |
402415

403416
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -830,6 +843,7 @@ Name | Type | Description | Notes
830843
| Status code | Description | Response headers |
831844
|-------------|-------------|------------------|
832845
**201** | returns a created template | - |
846+
**403** | the plan's template limit is reached | - |
833847
**401** | authentication failed | - |
834848

835849
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -921,6 +935,7 @@ Name | Type | Description | Notes
921935
| Status code | Description | Response headers |
922936
|-------------|-------------|------------------|
923937
**201** | returns a pending template | - |
938+
**403** | the plan's template limit is reached | - |
924939
**401** | authentication failed | - |
925940

926941
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -1006,6 +1021,7 @@ Name | Type | Description | Notes
10061021
|-------------|-------------|------------------|
10071022
**201** | returns a pending template | - |
10081023
**401** | authentication failed | - |
1024+
**403** | the plan's template limit is reached | - |
10091025

10101026
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
10111027

@@ -1522,6 +1538,10 @@ Generate a PDF
15221538
Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and
15231539
asynchronous processing. Add the `wait=false` query parameter to return immediately.
15241540

1541+
Live PDFs use credits; test PDFs (`test: true`) are free and watermarked. If your balance can't cover a
1542+
live PDF, the API returns 402 and the submission waits in the `insufficient_credits` state until you add
1543+
credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
1544+
15251545
See also:
15261546
- [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata
15271547
- [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
@@ -1600,8 +1620,10 @@ Name | Type | Description | Notes
16001620

16011621
| Status code | Description | Response headers |
16021622
|-------------|-------------|------------------|
1623+
**402** | insufficient credits | - |
16031624
**201** | submission created | - |
16041625
**422** | invalid request | - |
1626+
**403** | live data requests need Starter or higher | - |
16051627
**401** | authentication failed | - |
16061628

16071629
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -1699,6 +1721,9 @@ Retrieves the details and status of a combined submission. Returns processing st
16991721
download URL (if processed), metadata, and information about any integrated actions
17001722
(e.g., S3 uploads).
17011723

1724+
`insufficient_credits` means the combined submission is waiting for credits and is processed once you
1725+
add them. If it's still waiting after 30 days, it moves to `error`.
1726+
17021727

17031728
### Example
17041729

@@ -2038,6 +2063,9 @@ Retrieves the details and status of a PDF submission. Returns processing state,
20382063
URL (if processed), metadata, submission data (optional), and information about any
20392064
integrated actions. Use this to poll for completion when using asynchronous processing.
20402065

2066+
`insufficient_credits` means the submission is waiting for credits and is processed once you add them.
2067+
If it's still waiting after 30 days, it moves to `error`.
2068+
20412069

20422070
### Example
20432071

@@ -2124,6 +2152,9 @@ Retrieves the status and results of a batch PDF generation job. Returns processi
21242152
completion statistics, and optionally includes all individual submission details. Use this
21252153
to poll for completion when using asynchronous batch processing.
21262154

2155+
Submissions waiting for credits are in the `insufficient_credits` state and count as pending, so the
2156+
batch stays `pending` until you add credits or they stop waiting after 30 days.
2157+
21272158

21282159
### Example
21292160

‎docs/CombinePdfsData.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**metadata** | **object** | | [optional]
1111
**password** | **str** | | [optional]
1212
**source_pdfs** | **List[object]** | |
13-
**test** | **bool** | Deprecated, and has no effect. A combined PDF is a test or live document because of its source PDFs. | [optional]
13+
**test** | **bool** | Deprecated, and has no effect. Combining always uses credits, even with a test API token or watermarked source PDFs. | [optional]
1414

1515
## Example
1616

‎docs/CreateCombinedSubmissionResponse.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**status** | **str** | |
99
**combined_submission** | [**CombinedSubmission**](CombinedSubmission.md) | |
10+
**error** | **str** | | [optional]
1011
**errors** | **List[str]** | | [optional]
12+
**code** | **str** | `insufficient_credits` when the response is a 402. | [optional]
1113

1214
## Example
1315

‎docs/CreateCustomFileResponse.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**status** | **str** | |
99
**custom_file** | [**CustomFile**](CustomFile.md) | |
10+
**error** | **str** | | [optional]
1011
**errors** | **List[str]** | | [optional]
1112

1213
## Example

‎docs/CreatePdfSubmissionData.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**field_overrides** | **object** | | [optional]
1313
**metadata** | **object** | | [optional]
1414
**password** | **str** | | [optional]
15-
**test** | **bool** | | [optional]
15+
**test** | **bool** | Generate a watermarked test PDF. Test PDFs are free; live PDFs (the default) use credits. | [optional]
1616
**version** | **str** | | [optional]
1717

1818
## Example

‎docs/CreateSubmissionDataRequestEventResponse.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**status** | **str** | |
99
**event** | [**SubmissionDataRequestEvent**](SubmissionDataRequestEvent.md) | |
10+
**error** | **str** | | [optional]
1011
**errors** | **List[str]** | | [optional]
1112

1213
## Example

0 commit comments

Comments
 (0)