Package com.docspring
Class Client
java.lang.Object
com.docspring.Client
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.16.0-DOCSPRING")
public class Client
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFieldsToTemplate(String templateId, AddFieldsData data) Add new fields to a Template Adds fields to a PDF template.addFieldsToTemplateWithHttpInfo(String templateId, AddFieldsData data) Add new fields to a Template Adds fields to a PDF template.batchGeneratePdfs(SubmissionBatchData data, Boolean wait) Generate multiple PDFs Generates up to 50 PDFs in a single request.batchGeneratePdfsWithHttpInfo(SubmissionBatchData data, Boolean wait) Generate multiple PDFs Generates up to 50 PDFs in a single request.combinePdfs(CombinePdfsData data) Merge submission PDFs, template PDFs, or custom files Combines multiple PDFs from various sources into a single PDF file.Merge submission PDFs, template PDFs, or custom files Combines multiple PDFs from various sources into a single PDF file.copyTemplate(String templateId, CopyTemplateOptions options) Copy a template Creates a copy of an existing template with all its fields and configuration.copyTemplateWithHttpInfo(String templateId, CopyTemplateOptions options) Copy a template Creates a copy of an existing template with all its fields and configuration.Create a new custom file from a cached S3 upload The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs.Create a new custom file from a cached S3 upload The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs.createDataRequestEvent(String dataRequestId, CreateSubmissionDataRequestEventRequest event) Create a new event for emailing a signee a request for signature Records user notification events for data requests.createDataRequestEventWithHttpInfo(String dataRequestId, CreateSubmissionDataRequestEventRequest event) Create a new event for emailing a signee a request for signature Records user notification events for data requests.createDataRequestToken(String dataRequestId, String type) Create a new data request token for form authentication Creates an authentication token for accessing a data request form.createDataRequestTokenWithHttpInfo(String dataRequestId, String type) Create a new data request token for form authentication Creates an authentication token for accessing a data request form.createFolder(CreateFolderData data) Create a folder Creates a new folder for organizing templates.Create a folder Creates a new folder for organizing templates.Create a new HTML template Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating.Create a new HTML template Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating.createPdfTemplate(File templateDocument, String templateName, Boolean wait, String templateDescription, String templateParentFolderId) Create a new PDF template with a form POST file upload Creates a new PDF template by uploading a PDF file.Create a new PDF template from a cached S3 file upload Creates a new PDF template from a file previously uploaded to S3 using a presigned URL.Create a new PDF template from a cached S3 file upload Creates a new PDF template from a file previously uploaded to S3 using a presigned URL.createPdfTemplateWithHttpInfo(File templateDocument, String templateName, Boolean wait, String templateDescription, String templateParentFolderId) Create a new PDF template with a form POST file upload Creates a new PDF template by uploading a PDF file.deleteFolder(String folderId) Delete a folder Deletes an empty folder.deleteFolderWithHttpInfo(String folderId) Delete a folder Deletes an empty folder.deleteTemplate(String templateId, String version) Delete a template Deletes a template or a specific template version.deleteTemplateWithHttpInfo(String templateId, String version) Delete a template Deletes a template or a specific template version.expireCombinedSubmission(String combinedSubmissionId) Expire a combined submission Expiring a combined submission deletes the PDF from our system.expireCombinedSubmissionWithHttpInfo(String combinedSubmissionId) Expire a combined submission Expiring a combined submission deletes the PDF from our system.expireSubmission(String submissionId) Expire a PDF submission Expiring a PDF submission deletes the PDF and removes the data from our database.expireSubmissionWithHttpInfo(String submissionId) Expire a PDF submission Expiring a PDF submission deletes the PDF and removes the data from our database.generatePdf(String templateId, CreatePdfSubmissionData submission, Boolean wait) Generate a PDF Creates a PDF submission by filling in a template with data.generatePdfWithHttpInfo(String templateId, CreatePdfSubmissionData submission, Boolean wait) Generate a PDF Creates a PDF submission by filling in a template with data.generatePreview(String submissionId) Generate a preview PDF for partially completed data requests Generates a preview PDF for a submission with partially completed data requests.generatePreviewWithHttpInfo(String submissionId) Generate a preview PDF for partially completed data requests Generates a preview PDF for a submission with partially completed data requests.Get the API clientgetCombinedSubmission(String combinedSubmissionId) Check the status of a combined submission (merged PDFs) Retrieves the details and status of a combined submission.getCombinedSubmissionWithHttpInfo(String combinedSubmissionId) Check the status of a combined submission (merged PDFs) Retrieves the details and status of a combined submission.getDataRequest(String dataRequestId) Look up a submission data request Retrieves the details and status of a data request.getDataRequestWithHttpInfo(String dataRequestId) Look up a submission data request Retrieves the details and status of a data request.getFullTemplate(String templateId) Fetch the full attributes for a PDF template Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content.getFullTemplateWithHttpInfo(String templateId) Fetch the full attributes for a PDF template Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content.Get a presigned S3 URL for direct file upload Returns a presigned S3 URL for uploading files directly to our S3 bucket.Get a presigned S3 URL for direct file upload Returns a presigned S3 URL for uploading files directly to our S3 bucket.getSubmission(String submissionId, Boolean includeData) Check the status of a PDF Retrieves the details and status of a PDF submission.getSubmissionBatch(String submissionBatchId, Boolean includeSubmissions) Check the status of a submission batch job Retrieves the status and results of a batch PDF generation job.getSubmissionBatchWithHttpInfo(String submissionBatchId, Boolean includeSubmissions) Check the status of a submission batch job Retrieves the status and results of a batch PDF generation job.getSubmissionWithHttpInfo(String submissionId, Boolean includeData) Check the status of a PDF Retrieves the details and status of a PDF submission.getTemplate(String templateId) Check the status of an uploaded template Retrieves information about a template including processing status and document URL.getTemplateSchema(String templateId) Fetch the JSON schema for a template Retrieves the JSON Schema definition for a template's fields.getTemplateSchemaWithHttpInfo(String templateId) Fetch the JSON schema for a template Retrieves the JSON Schema definition for a template's fields.getTemplateWithHttpInfo(String templateId) Check the status of an uploaded template Retrieves information about a template including processing status and document URL.listCombinedSubmissions(Integer page, Integer perPage) Get a list of all combined submissions Returns a paginated list of combined submissions (merged PDFs) for your account.listCombinedSubmissionsWithHttpInfo(Integer page, Integer perPage) Get a list of all combined submissions Returns a paginated list of combined submissions (merged PDFs) for your account.listFolders(String parentFolderId) Get a list of all folders Returns a list of folders in your account.listFoldersWithHttpInfo(String parentFolderId) Get a list of all folders Returns a list of folders in your account.listSubmissions(String cursor, Integer limit, String createdAfter, String createdBefore, String type, Boolean includeData) List all submissions Returns a paginated list of all PDF submissions across all templates in your account.listSubmissionsWithHttpInfo(String cursor, Integer limit, String createdAfter, String createdBefore, String type, Boolean includeData) List all submissions Returns a paginated list of all PDF submissions across all templates in your account.listTemplates(String query, String parentFolderId, Integer page, Integer perPage) Get a list of all templates Retrieves a list of your templates with search, filtering, and pagination options.listTemplateSubmissions(String templateId, String cursor, Integer limit, String createdAfter, String createdBefore, String type, Boolean includeData) List all submissions for a given template Returns a paginated list of all submissions for a specific template.listTemplateSubmissionsWithHttpInfo(String templateId, String cursor, Integer limit, String createdAfter, String createdBefore, String type, Boolean includeData) List all submissions for a given template Returns a paginated list of all submissions for a specific template.listTemplatesWithHttpInfo(String query, String parentFolderId, Integer page, Integer perPage) Get a list of all templates Retrieves a list of your templates with search, filtering, and pagination options.moveFolderToFolder(String folderId, MoveFolderData data) Move a folder Moves a folder to a new parent folder or to the root level.moveFolderToFolderWithHttpInfo(String folderId, MoveFolderData data) Move a folder Moves a folder to a new parent folder or to the root level.moveTemplateToFolder(String templateId, MoveTemplateData data) Move Template to folder Moves a template to a different folder or to the root level.moveTemplateToFolderWithHttpInfo(String templateId, MoveTemplateData data) Move Template to folder Moves a template to a different folder or to the root level.publishTemplateVersion(String templateId, PublishVersionData data) Publish a template version Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).publishTemplateVersionWithHttpInfo(String templateId, PublishVersionData data) Publish a template version Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).renameFolder(String folderId, RenameFolderData data) Rename a folder Renames an existing folder.renameFolderWithHttpInfo(String folderId, RenameFolderData data) Rename a folder Renames an existing folder.restoreTemplateVersion(String templateId, RestoreVersionData data) Restore a template version Restores your template to a previously published version, copying that version's content and configuration to the current draft.restoreTemplateVersionWithHttpInfo(String templateId, RestoreVersionData data) Restore a template version Restores your template to a previously published version, copying that version's content and configuration to the current draft.voidsetApiClient(ApiClient apiClient) Set the API clientTest authentication Checks whether your API token is valid by making an authenticated request.Test authentication Checks whether your API token is valid by making an authenticated request.updateDataRequest(String dataRequestId, UpdateSubmissionDataRequestData data) Update a submission data request Updates authentication details for a data request.updateDataRequestWithHttpInfo(String dataRequestId, UpdateSubmissionDataRequestData data) Update a submission data request Updates authentication details for a data request.updateTemplate(String templateId, UpdateHtmlTemplate data) Update a Template Updates template content and properties.updateTemplateDocument(String templateId, File templateDocument, String templateName) Update a template's document with a form POST file upload Upload a new PDF file to update a PDF template's document.updateTemplateDocumentFromUpload(String templateId, UpdatePdfTemplate data) Update a template's document with a cached S3 file upload Updates a PDF template's document using a cached file upload.updateTemplateDocumentFromUploadWithHttpInfo(String templateId, UpdatePdfTemplate data) Update a template's document with a cached S3 file upload Updates a PDF template's document using a cached file upload.updateTemplateDocumentWithHttpInfo(String templateId, File templateDocument, String templateName) Update a template's document with a form POST file upload Upload a new PDF file to update a PDF template's document.updateTemplateWithHttpInfo(String templateId, UpdateHtmlTemplate data) Update a Template Updates template content and properties.
-
Constructor Details
-
Client
public Client() -
Client
-
-
Method Details
-
getApiClient
Get the API client- Returns:
- API client
-
setApiClient
Set the API client- Parameters:
apiClient- an instance of API client
-
addFieldsToTemplate
public TemplateAddFieldsResponse addFieldsToTemplate(@Nonnull String templateId, @Nonnull AddFieldsData data) throws ApiException Add new fields to a Template Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.- Parameters:
templateId- (required)data- (required)- Returns:
- TemplateAddFieldsResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
View the field schema to see all available properties and typesResponse Details Status Code Description Response Headers 200 add fields success - 422 add fields error -
-
addFieldsToTemplateWithHttpInfo
public ApiResponse<TemplateAddFieldsResponse> addFieldsToTemplateWithHttpInfo(@Nonnull String templateId, @Nonnull AddFieldsData data) throws ApiException Add new fields to a Template Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.- Parameters:
templateId- (required)data- (required)- Returns:
- ApiResponse<TemplateAddFieldsResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
View the field schema to see all available properties and typesResponse Details Status Code Description Response Headers 200 add fields success - 422 add fields error -
-
batchGeneratePdfs
public BatchGeneratePdfs201Response batchGeneratePdfs(@Nonnull SubmissionBatchData data, @Nullable Boolean wait) throws ApiException Generate multiple PDFs Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. See also: - [Batch and Combine PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Generate and merge PDFs in one request- Parameters:
data- (required)wait- Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (optional, default to true)- Returns:
- BatchGeneratePdfs201Response
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn more about generating multiple PDFs in batchesResponse Details Status Code Description Response Headers 201 submissions created - 200 some PDFs with invalid data - 401 authentication failed - 422 array of arrays - 400 invalid JSON -
-
batchGeneratePdfsWithHttpInfo
public ApiResponse<BatchGeneratePdfs201Response> batchGeneratePdfsWithHttpInfo(@Nonnull SubmissionBatchData data, @Nullable Boolean wait) throws ApiException Generate multiple PDFs Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. See also: - [Batch and Combine PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Generate and merge PDFs in one request- Parameters:
data- (required)wait- Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (optional, default to true)- Returns:
- ApiResponse<BatchGeneratePdfs201Response>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn more about generating multiple PDFs in batchesResponse Details Status Code Description Response Headers 201 submissions created - 200 some PDFs with invalid data - 401 authentication failed - 422 array of arrays - 400 invalid JSON -
-
combinePdfs
public CreateCombinedSubmissionResponse combinePdfs(@Nonnull CombinePdfsData data) throws ApiException Merge submission PDFs, template PDFs, or custom files Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided.- Parameters:
data- (required)- Returns:
- CreateCombinedSubmissionResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 201 combined submission created - 422 invalid request - 400 invalid JSON - 401 authentication failed -
-
combinePdfsWithHttpInfo
public ApiResponse<CreateCombinedSubmissionResponse> combinePdfsWithHttpInfo(@Nonnull CombinePdfsData data) throws ApiException Merge submission PDFs, template PDFs, or custom files Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided.- Parameters:
data- (required)- Returns:
- ApiResponse<CreateCombinedSubmissionResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 201 combined submission created - 422 invalid request - 400 invalid JSON - 401 authentication failed -
-
copyTemplate
public TemplatePreview copyTemplate(@Nonnull String templateId, @Nullable CopyTemplateOptions options) throws ApiException Copy a template Creates a copy of an existing template with all its fields and configuration. Optionally specify a new name and target folder. The copied template starts as a new draft that can be modified independently of the original.- Parameters:
templateId- (required)options- (optional)- Returns:
- TemplatePreview
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 copy template success - 404 folder not found -
-
copyTemplateWithHttpInfo
public ApiResponse<TemplatePreview> copyTemplateWithHttpInfo(@Nonnull String templateId, @Nullable CopyTemplateOptions options) throws ApiException Copy a template Creates a copy of an existing template with all its fields and configuration. Optionally specify a new name and target folder. The copied template starts as a new draft that can be modified independently of the original.- Parameters:
templateId- (required)options- (optional)- Returns:
- ApiResponse<TemplatePreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 copy template success - 404 folder not found -
-
createCustomFileFromUpload
public CreateCustomFileResponse createCustomFileFromUpload(@Nonnull CreateCustomFileData data) throws ApiException Create a new custom file from a cached S3 upload The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs. First upload your file using the presigned URL endpoint, then use the returned cache_id to create the custom file.- Parameters:
data- (required)- Returns:
- CreateCustomFileResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn how to merge custom files with other PDFsResponse Details Status Code Description Response Headers 201 returns the custom file - 401 authentication failed -
-
createCustomFileFromUploadWithHttpInfo
public ApiResponse<CreateCustomFileResponse> createCustomFileFromUploadWithHttpInfo(@Nonnull CreateCustomFileData data) throws ApiException Create a new custom file from a cached S3 upload The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs. First upload your file using the presigned URL endpoint, then use the returned cache_id to create the custom file.- Parameters:
data- (required)- Returns:
- ApiResponse<CreateCustomFileResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn how to merge custom files with other PDFsResponse Details Status Code Description Response Headers 201 returns the custom file - 401 authentication failed -
-
createDataRequestEvent
public CreateSubmissionDataRequestEventResponse createDataRequestEvent(@Nonnull String dataRequestId, @Nonnull CreateSubmissionDataRequestEventRequest event) throws ApiException Create a new event for emailing a signee a request for signature Records user notification events for data requests. Use this to create an audit trail showing when and how users were notified about data request forms. Supports email, SMS, and other notification types. Records the notification time for compliance tracking. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - User notification workflow- Parameters:
dataRequestId- (required)event- (required)- Returns:
- CreateSubmissionDataRequestEventResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Track user notification events for audit trail loggingResponse Details Status Code Description Response Headers 201 event created - 401 authentication failed - 422 message recipient must not be blank -
-
createDataRequestEventWithHttpInfo
public ApiResponse<CreateSubmissionDataRequestEventResponse> createDataRequestEventWithHttpInfo(@Nonnull String dataRequestId, @Nonnull CreateSubmissionDataRequestEventRequest event) throws ApiException Create a new event for emailing a signee a request for signature Records user notification events for data requests. Use this to create an audit trail showing when and how users were notified about data request forms. Supports email, SMS, and other notification types. Records the notification time for compliance tracking. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - User notification workflow- Parameters:
dataRequestId- (required)event- (required)- Returns:
- ApiResponse<CreateSubmissionDataRequestEventResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Track user notification events for audit trail loggingResponse Details Status Code Description Response Headers 201 event created - 401 authentication failed - 422 message recipient must not be blank -
-
createDataRequestToken
public CreateSubmissionDataRequestTokenResponse createDataRequestToken(@Nonnull String dataRequestId, @Nullable String type) throws ApiException Create a new data request token for form authentication Creates an authentication token for accessing a data request form. Tokens can be created for API access (1 hour expiration) or email links (30 day expiration). Returns a token and a pre-authenticated URL for the data request form. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)- Parameters:
dataRequestId- (required)type- (optional)- Returns:
- CreateSubmissionDataRequestTokenResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Generate authentication tokens for embedded data requestsResponse Details Status Code Description Response Headers 201 token created - 401 authentication failed - 422 invalid request -
-
createDataRequestTokenWithHttpInfo
public ApiResponse<CreateSubmissionDataRequestTokenResponse> createDataRequestTokenWithHttpInfo(@Nonnull String dataRequestId, @Nullable String type) throws ApiException Create a new data request token for form authentication Creates an authentication token for accessing a data request form. Tokens can be created for API access (1 hour expiration) or email links (30 day expiration). Returns a token and a pre-authenticated URL for the data request form. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)- Parameters:
dataRequestId- (required)type- (optional)- Returns:
- ApiResponse<CreateSubmissionDataRequestTokenResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Generate authentication tokens for embedded data requestsResponse Details Status Code Description Response Headers 201 token created - 401 authentication failed - 422 invalid request -
-
createFolder
Create a folder Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.- Parameters:
data- (required)- Returns:
- Folder
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 422 name already exist - 404 parent folder doesn't exist - 200 folder created inside another folder - 401 authentication failed -
-
createFolderWithHttpInfo
public ApiResponse<Folder> createFolderWithHttpInfo(@Nonnull CreateFolderData data) throws ApiException Create a folder Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.- Parameters:
data- (required)- Returns:
- ApiResponse<Folder>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 422 name already exist - 404 parent folder doesn't exist - 200 folder created inside another folder - 401 authentication failed -
-
createHtmlTemplate
Create a new HTML template Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.- Parameters:
data- (required)- Returns:
- TemplatePreview
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn more about HTML/SCSS templates and Liquid templatingResponse Details Status Code Description Response Headers 201 returns a created template - 401 authentication failed -
-
createHtmlTemplateWithHttpInfo
public ApiResponse<TemplatePreview> createHtmlTemplateWithHttpInfo(@Nonnull CreateHtmlTemplate data) throws ApiException Create a new HTML template Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.- Parameters:
data- (required)- Returns:
- ApiResponse<TemplatePreview>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn more about HTML/SCSS templates and Liquid templatingResponse Details Status Code Description Response Headers 201 returns a created template - 401 authentication failed -
-
createPdfTemplate
public TemplatePreview createPdfTemplate(@Nonnull File templateDocument, @Nonnull String templateName, @Nullable Boolean wait, @Nullable String templateDescription, @Nullable String templateParentFolderId) throws ApiException Create a new PDF template with a form POST file upload Creates a new PDF template by uploading a PDF file. The uploaded PDF becomes the foundation for your template, and you can then add fillable fields using the template editor. Use the wait parameter to control whether the request waits for document processing to complete.- Parameters:
templateDocument- (required)templateName- (required)wait- Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (optional, default to true)templateDescription- (optional)templateParentFolderId- (optional)- Returns:
- TemplatePreview
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 201 returns a pending template - 401 authentication failed -
-
createPdfTemplateWithHttpInfo
public ApiResponse<TemplatePreview> createPdfTemplateWithHttpInfo(@Nonnull File templateDocument, @Nonnull String templateName, @Nullable Boolean wait, @Nullable String templateDescription, @Nullable String templateParentFolderId) throws ApiException Create a new PDF template with a form POST file upload Creates a new PDF template by uploading a PDF file. The uploaded PDF becomes the foundation for your template, and you can then add fillable fields using the template editor. Use the wait parameter to control whether the request waits for document processing to complete.- Parameters:
templateDocument- (required)templateName- (required)wait- Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (optional, default to true)templateDescription- (optional)templateParentFolderId- (optional)- Returns:
- ApiResponse<TemplatePreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 201 returns a pending template - 401 authentication failed -
-
createPdfTemplateFromUpload
public TemplatePreview createPdfTemplateFromUpload(@Nonnull CreatePdfTemplate data) throws ApiException Create a new PDF template from a cached S3 file upload Creates a new PDF template from a file previously uploaded to S3 using a presigned URL. This two-step process allows for more reliable large file uploads by first uploading the file to S3, then creating the template using the cached upload ID.- Parameters:
data- (required)- Returns:
- TemplatePreview
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 201 returns a pending template - 401 authentication failed -
-
createPdfTemplateFromUploadWithHttpInfo
public ApiResponse<TemplatePreview> createPdfTemplateFromUploadWithHttpInfo(@Nonnull CreatePdfTemplate data) throws ApiException Create a new PDF template from a cached S3 file upload Creates a new PDF template from a file previously uploaded to S3 using a presigned URL. This two-step process allows for more reliable large file uploads by first uploading the file to S3, then creating the template using the cached upload ID.- Parameters:
data- (required)- Returns:
- ApiResponse<TemplatePreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 201 returns a pending template - 401 authentication failed -
-
deleteFolder
Delete a folder Deletes an empty folder. The folder must not contain any templates or subfolders. Move or delete all contents before attempting to delete the folder.- Parameters:
folderId- (required)- Returns:
- Folder
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 404 folder doesn't exist - 422 folder has contents - 200 folder is empty - 401 authentication failed -
-
deleteFolderWithHttpInfo
Delete a folder Deletes an empty folder. The folder must not contain any templates or subfolders. Move or delete all contents before attempting to delete the folder.- Parameters:
folderId- (required)- Returns:
- ApiResponse<Folder>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 404 folder doesn't exist - 422 folder has contents - 200 folder is empty - 401 authentication failed -
-
deleteTemplate
public TemplateDeleteResponse deleteTemplate(@Nonnull String templateId, @Nullable String version) throws ApiException Delete a template Deletes a template or a specific template version. When no version is specified, deletes the entire template including all versions. When a version is specified, deletes only that version while preserving others. Returns remaining version information.- Parameters:
templateId- (required)version- (optional)- Returns:
- TemplateDeleteResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template version deleted successfully - 404 template not found - 401 authentication failed -
-
deleteTemplateWithHttpInfo
public ApiResponse<TemplateDeleteResponse> deleteTemplateWithHttpInfo(@Nonnull String templateId, @Nullable String version) throws ApiException Delete a template Deletes a template or a specific template version. When no version is specified, deletes the entire template including all versions. When a version is specified, deletes only that version while preserving others. Returns remaining version information.- Parameters:
templateId- (required)version- (optional)- Returns:
- ApiResponse<TemplateDeleteResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template version deleted successfully - 404 template not found - 401 authentication failed -
-
expireCombinedSubmission
public CombinedSubmission expireCombinedSubmission(@Nonnull String combinedSubmissionId) throws ApiException Expire a combined submission Expiring a combined submission deletes the PDF from our system. This is useful for invalidating sensitive documents.- Parameters:
combinedSubmissionId- (required)- Returns:
- CombinedSubmission
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 200 submission was expired - 404 combined submission not found - 403 test API token used - 401 authentication failed -
-
expireCombinedSubmissionWithHttpInfo
public ApiResponse<CombinedSubmission> expireCombinedSubmissionWithHttpInfo(@Nonnull String combinedSubmissionId) throws ApiException Expire a combined submission Expiring a combined submission deletes the PDF from our system. This is useful for invalidating sensitive documents.- Parameters:
combinedSubmissionId- (required)- Returns:
- ApiResponse<CombinedSubmission>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 200 submission was expired - 404 combined submission not found - 403 test API token used - 401 authentication failed -
-
expireSubmission
Expire a PDF submission Expiring a PDF submission deletes the PDF and removes the data from our database. This is useful for invalidating sensitive documents after they've been downloaded. You can also [configure a data retention policy for your submissions](https://docspring.com/docs/template-editor/settings/#expire-submissions) so that they automatically expire.- Parameters:
submissionId- (required)- Returns:
- SubmissionPreview
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 submission was expired - 404 submission not found - 401 authentication failed - 403 test API token used -
-
expireSubmissionWithHttpInfo
public ApiResponse<SubmissionPreview> expireSubmissionWithHttpInfo(@Nonnull String submissionId) throws ApiException Expire a PDF submission Expiring a PDF submission deletes the PDF and removes the data from our database. This is useful for invalidating sensitive documents after they've been downloaded. You can also [configure a data retention policy for your submissions](https://docspring.com/docs/template-editor/settings/#expire-submissions) so that they automatically expire.- Parameters:
submissionId- (required)- Returns:
- ApiResponse<SubmissionPreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 submission was expired - 404 submission not found - 401 authentication failed - 403 test API token used -
-
generatePdf
public CreateSubmissionResponse generatePdf(@Nonnull String templateId, @Nonnull CreatePdfSubmissionData submission, @Nullable Boolean wait) throws ApiException Generate a PDF Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Set `wait: false` to return immediately. See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields- Parameters:
templateId- (required)submission- (required)wait- Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (optional, default to true)- Returns:
- CreateSubmissionResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to generating PDFs with DocSpringResponse Details Status Code Description Response Headers 201 submission created - 422 invalid request - 401 authentication failed -
-
generatePdfWithHttpInfo
public ApiResponse<CreateSubmissionResponse> generatePdfWithHttpInfo(@Nonnull String templateId, @Nonnull CreatePdfSubmissionData submission, @Nullable Boolean wait) throws ApiException Generate a PDF Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Set `wait: false` to return immediately. See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields- Parameters:
templateId- (required)submission- (required)wait- Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (optional, default to true)- Returns:
- ApiResponse<CreateSubmissionResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to generating PDFs with DocSpringResponse Details Status Code Description Response Headers 201 submission created - 422 invalid request - 401 authentication failed -
-
generatePreview
Generate a preview PDF for partially completed data requests Generates a preview PDF for a submission with partially completed data requests. Useful for showing users what the final document will look like before all signatures or data have been collected. The preview includes any data collected so far.- Parameters:
submissionId- (required)- Returns:
- SuccessErrorResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 preview was successfully requested - 404 submission not found - 422 error requesting preview -
-
generatePreviewWithHttpInfo
public ApiResponse<SuccessErrorResponse> generatePreviewWithHttpInfo(@Nonnull String submissionId) throws ApiException Generate a preview PDF for partially completed data requests Generates a preview PDF for a submission with partially completed data requests. Useful for showing users what the final document will look like before all signatures or data have been collected. The preview includes any data collected so far.- Parameters:
submissionId- (required)- Returns:
- ApiResponse<SuccessErrorResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 preview was successfully requested - 404 submission not found - 422 error requesting preview -
-
getCombinedSubmission
public CombinedSubmission getCombinedSubmission(@Nonnull String combinedSubmissionId) throws ApiException Check the status of a combined submission (merged PDFs) Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads).- Parameters:
combinedSubmissionId- (required)- Returns:
- CombinedSubmission
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 200 processed combined submission found - 404 combined submission not found - 401 authentication failed -
-
getCombinedSubmissionWithHttpInfo
public ApiResponse<CombinedSubmission> getCombinedSubmissionWithHttpInfo(@Nonnull String combinedSubmissionId) throws ApiException Check the status of a combined submission (merged PDFs) Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads).- Parameters:
combinedSubmissionId- (required)- Returns:
- ApiResponse<CombinedSubmission>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 200 processed combined submission found - 404 combined submission not found - 401 authentication failed -
-
getDataRequest
Look up a submission data request Retrieves the details and status of a data request. Returns information about the request state (pending, viewed, completed), authentication details, and metadata. Includes audit information like IP address, browseruser agent, and timestamps. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - Complete guide to data request workflow- Parameters:
dataRequestId- (required)- Returns:
- SubmissionDataRequestShow
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 completed submission data request found - 404 submission data request not found - 401 authentication failed -
-
getDataRequestWithHttpInfo
public ApiResponse<SubmissionDataRequestShow> getDataRequestWithHttpInfo(@Nonnull String dataRequestId) throws ApiException Look up a submission data request Retrieves the details and status of a data request. Returns information about the request state (pending, viewed, completed), authentication details, and metadata. Includes audit information like IP address, browseruser agent, and timestamps. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - Complete guide to data request workflow- Parameters:
dataRequestId- (required)- Returns:
- ApiResponse<SubmissionDataRequestShow>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 completed submission data request found - 404 submission data request not found - 401 authentication failed -
-
getFullTemplate
Fetch the full attributes for a PDF template Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content. Use this to get all template data needed for automated updates or analysis. Returns more detailed information than the basic `getTemplate` endpoint.- Parameters:
templateId- (required)- Returns:
- Template
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template found - 404 template not found - 401 authentication failed -
-
getFullTemplateWithHttpInfo
public ApiResponse<Template> getFullTemplateWithHttpInfo(@Nonnull String templateId) throws ApiException Fetch the full attributes for a PDF template Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content. Use this to get all template data needed for automated updates or analysis. Returns more detailed information than the basic `getTemplate` endpoint.- Parameters:
templateId- (required)- Returns:
- ApiResponse<Template>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template found - 404 template not found - 401 authentication failed -
-
getPresignUrl
Get a presigned S3 URL for direct file upload Returns a presigned S3 URL for uploading files directly to our S3 bucket. Use this endpoint to upload large files before creating templates or custom files. S3 will respond with a JSON object that you can include in your DocSpring API request. Uploaded files can be used to: - [Create templates](https://docspring.com/docs/api/#tag/templates/post/templates?endpoint_variant=create_template_from_cached_upload) - [Update templates](https://docspring.com/docs/api/#tag/templates/put/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload) - [Create custom files](https://docspring.com/docs/api/#tag/custom-files/post/custom_files) and then [merge them with other PDFs](https://docspring.com/docs/api/#tag/combine-pdfs/post/combined_submissions)- Returns:
- UploadPresignResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn about uploading custom files for PDF combiningResponse Details Status Code Description Response Headers 200 presign URL generated - 401 authentication failed -
-
getPresignUrlWithHttpInfo
Get a presigned S3 URL for direct file upload Returns a presigned S3 URL for uploading files directly to our S3 bucket. Use this endpoint to upload large files before creating templates or custom files. S3 will respond with a JSON object that you can include in your DocSpring API request. Uploaded files can be used to: - [Create templates](https://docspring.com/docs/api/#tag/templates/post/templates?endpoint_variant=create_template_from_cached_upload) - [Update templates](https://docspring.com/docs/api/#tag/templates/put/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload) - [Create custom files](https://docspring.com/docs/api/#tag/custom-files/post/custom_files) and then [merge them with other PDFs](https://docspring.com/docs/api/#tag/combine-pdfs/post/combined_submissions)- Returns:
- ApiResponse<UploadPresignResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn about uploading custom files for PDF combiningResponse Details Status Code Description Response Headers 200 presign URL generated - 401 authentication failed -
-
getSubmission
public Submission getSubmission(@Nonnull String submissionId, @Nullable Boolean includeData) throws ApiException Check the status of a PDF Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing.- Parameters:
submissionId- (required)includeData- (optional)- Returns:
- Submission
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 processed submission found with data - 404 submission not found - 401 authentication failed -
-
getSubmissionWithHttpInfo
public ApiResponse<Submission> getSubmissionWithHttpInfo(@Nonnull String submissionId, @Nullable Boolean includeData) throws ApiException Check the status of a PDF Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing.- Parameters:
submissionId- (required)includeData- (optional)- Returns:
- ApiResponse<Submission>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 processed submission found with data - 404 submission not found - 401 authentication failed -
-
getSubmissionBatch
public SubmissionBatchWithSubmissions getSubmissionBatch(@Nonnull String submissionBatchId, @Nullable Boolean includeSubmissions) throws ApiException Check the status of a submission batch job Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing.- Parameters:
submissionBatchId- (required)includeSubmissions- (optional)- Returns:
- SubmissionBatchWithSubmissions
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 processed submission batch found - 404 submission batch not found - 401 authentication failed -
-
getSubmissionBatchWithHttpInfo
public ApiResponse<SubmissionBatchWithSubmissions> getSubmissionBatchWithHttpInfo(@Nonnull String submissionBatchId, @Nullable Boolean includeSubmissions) throws ApiException Check the status of a submission batch job Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing.- Parameters:
submissionBatchId- (required)includeSubmissions- (optional)- Returns:
- ApiResponse<SubmissionBatchWithSubmissions>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 processed submission batch found - 404 submission batch not found - 401 authentication failed -
-
getTemplate
Check the status of an uploaded template Retrieves information about a template including processing status and document URL. Use this to check if template is ready to view in the template editor or generate PDFs.- Parameters:
templateId- (required)- Returns:
- TemplatePreview
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template found - 404 template not found - 401 authentication failed -
-
getTemplateWithHttpInfo
public ApiResponse<TemplatePreview> getTemplateWithHttpInfo(@Nonnull String templateId) throws ApiException Check the status of an uploaded template Retrieves information about a template including processing status and document URL. Use this to check if template is ready to view in the template editor or generate PDFs.- Parameters:
templateId- (required)- Returns:
- ApiResponse<TemplatePreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template found - 404 template not found - 401 authentication failed -
-
getTemplateSchema
Fetch the JSON schema for a template Retrieves the JSON Schema definition for a template's fields. Use this to validate data before submitting it for PDF generation, or to build dynamic forms that match the template's field structure and validation requirements. See also: - [Generate PDFs Guide](https://docspring.com/docs/api-guide/generate-pdfs/generate-pdfs-via-api/) - Use schema to validate submission data- Parameters:
templateId- (required)- Returns:
- JsonSchema
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template found - 404 template not found - 401 authentication failed -
-
getTemplateSchemaWithHttpInfo
public ApiResponse<JsonSchema> getTemplateSchemaWithHttpInfo(@Nonnull String templateId) throws ApiException Fetch the JSON schema for a template Retrieves the JSON Schema definition for a template's fields. Use this to validate data before submitting it for PDF generation, or to build dynamic forms that match the template's field structure and validation requirements. See also: - [Generate PDFs Guide](https://docspring.com/docs/api-guide/generate-pdfs/generate-pdfs-via-api/) - Use schema to validate submission data- Parameters:
templateId- (required)- Returns:
- ApiResponse<JsonSchema>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 template found - 404 template not found - 401 authentication failed -
-
listCombinedSubmissions
public List<CombinedSubmission> listCombinedSubmissions(@Nullable Integer page, @Nullable Integer perPage) throws ApiException Get a list of all combined submissions Returns a paginated list of combined submissions (merged PDFs) for your account. Includes processing status, expiration details, and download URLs for processed PDFs.- Parameters:
page- Default: 1 (optional)perPage- Default: 50 (optional)- Returns:
- List<CombinedSubmission>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 200 enumerate all combined submissions - 401 authentication failed -
-
listCombinedSubmissionsWithHttpInfo
public ApiResponse<List<CombinedSubmission>> listCombinedSubmissionsWithHttpInfo(@Nullable Integer page, @Nullable Integer perPage) throws ApiException Get a list of all combined submissions Returns a paginated list of combined submissions (merged PDFs) for your account. Includes processing status, expiration details, and download URLs for processed PDFs.- Parameters:
page- Default: 1 (optional)perPage- Default: 50 (optional)- Returns:
- ApiResponse<List<CombinedSubmission>>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Complete guide to combining PDFs with DocSpringResponse Details Status Code Description Response Headers 200 enumerate all combined submissions - 401 authentication failed -
-
listFolders
Get a list of all folders Returns a list of folders in your account. Can be filtered by parent folder ID to retrieve subfolders. Folders help organize templates and maintain a hierarchical structure.- Parameters:
parentFolderId- Filter By Folder Id (optional)- Returns:
- List<Folder>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 enumerate all folders - 401 authentication failed -
-
listFoldersWithHttpInfo
public ApiResponse<List<Folder>> listFoldersWithHttpInfo(@Nullable String parentFolderId) throws ApiException Get a list of all folders Returns a list of folders in your account. Can be filtered by parent folder ID to retrieve subfolders. Folders help organize templates and maintain a hierarchical structure.- Parameters:
parentFolderId- Filter By Folder Id (optional)- Returns:
- ApiResponse<List<Folder>>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 enumerate all folders - 401 authentication failed -
-
listSubmissions
public ListSubmissionsResponse listSubmissions(@Nullable String cursor, @Nullable Integer limit, @Nullable String createdAfter, @Nullable String createdBefore, @Nullable String type, @Nullable Boolean includeData) throws ApiException List all submissions Returns a paginated list of all PDF submissions across all templates in your account. Can be filtered by date range and submission type (test/live). Supports cursor-based pagination and optionally includes submission data for each result.- Parameters:
cursor- (optional)limit- (optional)createdAfter- (optional)createdBefore- (optional)type- (optional)includeData- (optional)- Returns:
- ListSubmissionsResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 listing submissions - 422 invalid type - 401 authentication failed -
-
listSubmissionsWithHttpInfo
public ApiResponse<ListSubmissionsResponse> listSubmissionsWithHttpInfo(@Nullable String cursor, @Nullable Integer limit, @Nullable String createdAfter, @Nullable String createdBefore, @Nullable String type, @Nullable Boolean includeData) throws ApiException List all submissions Returns a paginated list of all PDF submissions across all templates in your account. Can be filtered by date range and submission type (test/live). Supports cursor-based pagination and optionally includes submission data for each result.- Parameters:
cursor- (optional)limit- (optional)createdAfter- (optional)createdBefore- (optional)type- (optional)includeData- (optional)- Returns:
- ApiResponse<ListSubmissionsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 listing submissions - 422 invalid type - 401 authentication failed -
-
listTemplateSubmissions
public ListSubmissionsResponse listTemplateSubmissions(@Nonnull String templateId, @Nullable String cursor, @Nullable Integer limit, @Nullable String createdAfter, @Nullable String createdBefore, @Nullable String type, @Nullable Boolean includeData) throws ApiException List all submissions for a given template Returns a paginated list of all submissions for a specific template. Can be filtered by date range, submission type (test/live), and optionally include submission data. Supports cursor-based pagination for efficient retrieval of large result sets.- Parameters:
templateId- (required)cursor- (optional)limit- (optional)createdAfter- (optional)createdBefore- (optional)type- (optional)includeData- (optional)- Returns:
- ListSubmissionsResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 listing submissions - 404 invalid template id -
-
listTemplateSubmissionsWithHttpInfo
public ApiResponse<ListSubmissionsResponse> listTemplateSubmissionsWithHttpInfo(@Nonnull String templateId, @Nullable String cursor, @Nullable Integer limit, @Nullable String createdAfter, @Nullable String createdBefore, @Nullable String type, @Nullable Boolean includeData) throws ApiException List all submissions for a given template Returns a paginated list of all submissions for a specific template. Can be filtered by date range, submission type (test/live), and optionally include submission data. Supports cursor-based pagination for efficient retrieval of large result sets.- Parameters:
templateId- (required)cursor- (optional)limit- (optional)createdAfter- (optional)createdBefore- (optional)type- (optional)includeData- (optional)- Returns:
- ApiResponse<ListSubmissionsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 listing submissions - 404 invalid template id -
-
listTemplates
public List<TemplatePreview> listTemplates(@Nullable String query, @Nullable String parentFolderId, @Nullable Integer page, @Nullable Integer perPage) throws ApiException Get a list of all templates Retrieves a list of your templates with search, filtering, and pagination options. Returns basic template information including ID, name, type (PDF or HTML), and folder location. Supports text search by name and filtering by parent folder.- Parameters:
query- Search By Name (optional)parentFolderId- Filter By Folder Id (optional)page- Default: 1 (optional)perPage- Default: 50 (optional)- Returns:
- List<TemplatePreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 enumerate all templates - 404 filter templates by invalid folder id - 401 authentication failed -
-
listTemplatesWithHttpInfo
public ApiResponse<List<TemplatePreview>> listTemplatesWithHttpInfo(@Nullable String query, @Nullable String parentFolderId, @Nullable Integer page, @Nullable Integer perPage) throws ApiException Get a list of all templates Retrieves a list of your templates with search, filtering, and pagination options. Returns basic template information including ID, name, type (PDF or HTML), and folder location. Supports text search by name and filtering by parent folder.- Parameters:
query- Search By Name (optional)parentFolderId- Filter By Folder Id (optional)page- Default: 1 (optional)perPage- Default: 50 (optional)- Returns:
- ApiResponse<List<TemplatePreview>>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 enumerate all templates - 404 filter templates by invalid folder id - 401 authentication failed -
-
moveFolderToFolder
public Folder moveFolderToFolder(@Nonnull String folderId, @Nonnull MoveFolderData data) throws ApiException Move a folder Moves a folder to a new parent folder or to the root level. All templates and subfolders within the folder are moved together. Cannot move a folder into one of its own subfolders.- Parameters:
folderId- (required)data- (required)- Returns:
- Folder
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 404 parent folder doesn't exist - 200 move to root folder - 401 authentication failed -
-
moveFolderToFolderWithHttpInfo
public ApiResponse<Folder> moveFolderToFolderWithHttpInfo(@Nonnull String folderId, @Nonnull MoveFolderData data) throws ApiException Move a folder Moves a folder to a new parent folder or to the root level. All templates and subfolders within the folder are moved together. Cannot move a folder into one of its own subfolders.- Parameters:
folderId- (required)data- (required)- Returns:
- ApiResponse<Folder>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 404 parent folder doesn't exist - 200 move to root folder - 401 authentication failed -
-
moveTemplateToFolder
public TemplatePreview moveTemplateToFolder(@Nonnull String templateId, @Nonnull MoveTemplateData data) throws ApiException Move Template to folder Moves a template to a different folder or to the root level. Use this to organize templates within your folders. Provide a folder ID to move to a specific folder, or `null` to move to the root level.- Parameters:
templateId- (required)data- (required)- Returns:
- TemplatePreview
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 move template success - 404 folder not found -
-
moveTemplateToFolderWithHttpInfo
public ApiResponse<TemplatePreview> moveTemplateToFolderWithHttpInfo(@Nonnull String templateId, @Nonnull MoveTemplateData data) throws ApiException Move Template to folder Moves a template to a different folder or to the root level. Use this to organize templates within your folders. Provide a folder ID to move to a specific folder, or `null` to move to the root level.- Parameters:
templateId- (required)data- (required)- Returns:
- ApiResponse<TemplatePreview>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 move template success - 404 folder not found -
-
publishTemplateVersion
public TemplatePublishVersionResponse publishTemplateVersion(@Nonnull String templateId, @Nonnull PublishVersionData data) throws ApiException Publish a template version Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).- Parameters:
templateId- (required)data- (required)- Returns:
- TemplatePublishVersionResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 version published successfully - 422 invalid version type - 404 template not found - 401 authentication failed -
-
publishTemplateVersionWithHttpInfo
public ApiResponse<TemplatePublishVersionResponse> publishTemplateVersionWithHttpInfo(@Nonnull String templateId, @Nonnull PublishVersionData data) throws ApiException Publish a template version Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).- Parameters:
templateId- (required)data- (required)- Returns:
- ApiResponse<TemplatePublishVersionResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 version published successfully - 422 invalid version type - 404 template not found - 401 authentication failed -
-
renameFolder
public Folder renameFolder(@Nonnull String folderId, @Nonnull RenameFolderData data) throws ApiException Rename a folder Renames an existing folder. The new name must be unique within the same parent folder. This operation only changes the folder name, not its location or contents.- Parameters:
folderId- (required)data- (required)- Returns:
- Folder
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 422 name already exist - 404 folder doesn't belong to me - 200 successful rename - 401 authentication failed -
-
renameFolderWithHttpInfo
public ApiResponse<Folder> renameFolderWithHttpInfo(@Nonnull String folderId, @Nonnull RenameFolderData data) throws ApiException Rename a folder Renames an existing folder. The new name must be unique within the same parent folder. This operation only changes the folder name, not its location or contents.- Parameters:
folderId- (required)data- (required)- Returns:
- ApiResponse<Folder>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 422 name already exist - 404 folder doesn't belong to me - 200 successful rename - 401 authentication failed -
-
restoreTemplateVersion
public SuccessErrorResponse restoreTemplateVersion(@Nonnull String templateId, @Nonnull RestoreVersionData data) throws ApiException Restore a template version Restores your template to a previously published version, copying that version's content and configuration to the current draft. Use this to revert changes or recover from an unwanted modification.- Parameters:
templateId- (required)data- (required)- Returns:
- SuccessErrorResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 version restored successfully - 422 draft version not allowed - 404 template version not found - 401 authentication failed -
-
restoreTemplateVersionWithHttpInfo
public ApiResponse<SuccessErrorResponse> restoreTemplateVersionWithHttpInfo(@Nonnull String templateId, @Nonnull RestoreVersionData data) throws ApiException Restore a template version Restores your template to a previously published version, copying that version's content and configuration to the current draft. Use this to revert changes or recover from an unwanted modification.- Parameters:
templateId- (required)data- (required)- Returns:
- ApiResponse<SuccessErrorResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 version restored successfully - 422 draft version not allowed - 404 template version not found - 401 authentication failed -
-
testAuthentication
Test authentication Checks whether your API token is valid by making an authenticated request. Returns a success response if authentication passes. This endpoint is useful for verifying credentials during setup or troubleshooting issues.- Returns:
- SuccessErrorResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn how to authenticate with the DocSpring APIResponse Details Status Code Description Response Headers 200 authentication succeeded - 401 authentication failed -
-
testAuthenticationWithHttpInfo
Test authentication Checks whether your API token is valid by making an authenticated request. Returns a success response if authentication passes. This endpoint is useful for verifying credentials during setup or troubleshooting issues.- Returns:
- ApiResponse<SuccessErrorResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Learn how to authenticate with the DocSpring APIResponse Details Status Code Description Response Headers 200 authentication succeeded - 401 authentication failed -
-
updateDataRequest
public CreateSubmissionDataRequestResponse updateDataRequest(@Nonnull String dataRequestId, @Nonnull UpdateSubmissionDataRequestData data) throws ApiException Update a submission data request Updates authentication details for a data request. Use this when a user logs in to record their authentication method, provider, session information, and hashed identifiers. Updates metadata and tracks authentication state changes for auditing and compliance.- Parameters:
dataRequestId- (required)data- (required)- Returns:
- CreateSubmissionDataRequestResponse
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Update authentication details after user sign-inResponse Details Status Code Description Response Headers 200 submission data request updated - 422 invalid request - 404 submission data request not found - 401 authentication failed -
-
updateDataRequestWithHttpInfo
public ApiResponse<CreateSubmissionDataRequestResponse> updateDataRequestWithHttpInfo(@Nonnull String dataRequestId, @Nonnull UpdateSubmissionDataRequestData data) throws ApiException Update a submission data request Updates authentication details for a data request. Use this when a user logs in to record their authentication method, provider, session information, and hashed identifiers. Updates metadata and tracks authentication state changes for auditing and compliance.- Parameters:
dataRequestId- (required)data- (required)- Returns:
- ApiResponse<CreateSubmissionDataRequestResponse>
- Throws:
ApiException- if fails to make API call- See Also:
- Http Response Details:
Update authentication details after user sign-inResponse Details Status Code Description Response Headers 200 submission data request updated - 422 invalid request - 404 submission data request not found - 401 authentication failed -
-
updateTemplate
public SuccessMultipleErrorsResponse updateTemplate(@Nonnull String templateId, @Nonnull UpdateHtmlTemplate data) throws ApiException Update a Template Updates template content and properties. For HTML templates, you can modify the HTML, SCSS, headers, footers, name, and description. Changes are applied to your draft template and do not affect published template versions.- Parameters:
templateId- (required)data- (required)- Returns:
- SuccessMultipleErrorsResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 update template success -
-
updateTemplateWithHttpInfo
public ApiResponse<SuccessMultipleErrorsResponse> updateTemplateWithHttpInfo(@Nonnull String templateId, @Nonnull UpdateHtmlTemplate data) throws ApiException Update a Template Updates template content and properties. For HTML templates, you can modify the HTML, SCSS, headers, footers, name, and description. Changes are applied to your draft template and do not affect published template versions.- Parameters:
templateId- (required)data- (required)- Returns:
- ApiResponse<SuccessMultipleErrorsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 update template success -
-
updateTemplateDocument
public SuccessMultipleErrorsResponse updateTemplateDocument(@Nonnull String templateId, @Nonnull File templateDocument, @Nullable String templateName) throws ApiException Update a template's document with a form POST file upload Upload a new PDF file to update a PDF template's document. This replaces the template's PDF while preserving all of the existing fields. If you upload a PDF with fewer pages than the current document, any fields on the removed pages will be deleted.- Parameters:
templateId- (required)templateDocument- (required)templateName- (optional)- Returns:
- SuccessMultipleErrorsResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 returns a template with updated document - 401 authentication failed -
-
updateTemplateDocumentWithHttpInfo
public ApiResponse<SuccessMultipleErrorsResponse> updateTemplateDocumentWithHttpInfo(@Nonnull String templateId, @Nonnull File templateDocument, @Nullable String templateName) throws ApiException Update a template's document with a form POST file upload Upload a new PDF file to update a PDF template's document. This replaces the template's PDF while preserving all of the existing fields. If you upload a PDF with fewer pages than the current document, any fields on the removed pages will be deleted.- Parameters:
templateId- (required)templateDocument- (required)templateName- (optional)- Returns:
- ApiResponse<SuccessMultipleErrorsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 returns a template with updated document - 401 authentication failed -
-
updateTemplateDocumentFromUpload
public SuccessMultipleErrorsResponse updateTemplateDocumentFromUpload(@Nonnull String templateId, @Nonnull UpdatePdfTemplate data) throws ApiException Update a template's document with a cached S3 file upload Updates a PDF template's document using a cached file upload. This is a three-step process: First, request a presigned URL to upload your PDF file to our S3 bucket. Then, use that URL to upload your PDF file. Finally, submit the ID of the uploaded file to replace the template's document.- Parameters:
templateId- (required)data- (required)- Returns:
- SuccessMultipleErrorsResponse
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 returns a template with updated document - 401 authentication failed -
-
updateTemplateDocumentFromUploadWithHttpInfo
public ApiResponse<SuccessMultipleErrorsResponse> updateTemplateDocumentFromUploadWithHttpInfo(@Nonnull String templateId, @Nonnull UpdatePdfTemplate data) throws ApiException Update a template's document with a cached S3 file upload Updates a PDF template's document using a cached file upload. This is a three-step process: First, request a presigned URL to upload your PDF file to our S3 bucket. Then, use that URL to upload your PDF file. Finally, submit the ID of the uploaded file to replace the template's document.- Parameters:
templateId- (required)data- (required)- Returns:
- ApiResponse<SuccessMultipleErrorsResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response Details Status Code Description Response Headers 200 returns a template with updated document - 401 authentication failed -
-