API Reference docspring v4.3.0
Modules
API calls for all endpoints tagged Client.
Handle Tesla connections for Docspring.
Helper functions for deserializing responses into models
The fields to add to the template's draft.
The language AI field setup names a PDF template's fields in.
Returned when the Authorization header has a valid API token.
A kind of barcode.
A check mark or cross, as the HTML entity of its character: ✓ (✓), ✔ (✔), ✖ (✖), ✗ (✗) or ✘ (✘).
How a combined field joins its fields' values: with combined_field_separator between them (separator), or into combined_field_format (format).
A PDF made by merging other PDFs: submissions, other combined PDFs, templates, custom files and PDFs from URLs.
A combined PDF's generated files, by format.
A page of combined PDFs, newest first.
A PDF to merge.
A PDF to merge.
Another combined PDF to merge.
What a source PDF is.
Where a combined PDF is in its processing.
Settings for the copy.
The PDFs to merge, and the combined PDF's settings.
The uploaded file to create the custom file from.
The folder to create.
The event to record.
The kind of link to make. Send no body for an api token.
The submissions to create, and the settings they share.
The submission's data and settings.
The data to render the template with.
The template to create.
The webhook to create.
A PDF you uploaded to merge with other PDFs (POST /combined_pdfs). Get an upload URL with GET /uploads/presign first.
A page of custom files, newest first.
A custom file to merge (POST /custom_files).
A machine-readable error code. New codes can be added.
One problem with the request, such as a missing or invalid property.
What went wrong.
The body of every error response.
A unit of time.
A field of a template: the name of a value in submission data, and how and where it prints. Fields with the same name share one value and the settings the descriptions say are shared. A PDF template's fields are placed on its pages: x, y, width and height are in units where every page is 2480 wide, measured from the top-left corner of the field's page. To convert from PDF points, multiply by 2480 and divide by the page's width in points (document.page_dimensions on the template). An HTML or Word template's fields are all on page 1, and their placement and style settings aren't used: its HTML or Word document places and styles each value.
A condition comparing a number field's value with a number.
The operators a FieldComparisonCondition takes.
A field's own conditional logic rule: when other fields' values meet its conditions, the field is shown, made required, or both.
A field's own conditional logic rule: when other fields' values meet its conditions, the field is shown, made required, or both.
How a field's value is drawn on the PDF: as text, a check mark, a QR code, a barcode, an image or a shape.
A condition on whether a field's value is (or isn't) a value.
The operators a FieldEqualsCondition takes.
A group of a template's fields: the fields whose names start with the group's name and a /. In submission data, a group is an object, or an array for a list.
A group of a template's fields: the fields whose names start with the group's name and a /. In submission data, a group is an object, or an array for a list.
Whether a field group is an object or a list (an array) in submission data.
A condition on whether a field's value is one of a list.
A field of a template: the name of a value in submission data, and how and where it prints. Fields with the same name share one value and the settings the descriptions say are shared. A PDF template's fields are placed on its pages: x, y, width and height are in units where every page is 2480 wide, measured from the top-left corner of the field's page. To convert from PDF points, multiply by 2480 and divide by the page's width in points (document.page_dimensions on the template). An HTML or Word template's fields are all on page 1, and their placement and style settings aren't used: its HTML or Word document places and styles each value.
Changes to one field's settings for this submission only. Settings left out keep the template's.
A condition on whether a field has a value.
The operators a FieldPresenceCondition takes.
A condition on whether a number field's value is in a range.
Whether a template's fields are being re-imported from its PDF.
Whether AI field setup sets up conditional logic and required fields.
How AI field setup names a PDF's fields.
Where AI field setup takes a PDF's fields from.
The data type of a field's value.
A folder of templates. Folders can contain other folders.
A page of folders, newest first.
A format DocSpring can add to a processed submission: pdf, docx or odt (a Word template's submission's PDF, Word document or OpenDocument file), or png (images of the PDF's pages).
The formats to make.
A file that DocSpring generated, such as a submission's PDF or Word document. A file made after its submission was processed is listed while it's being made: check its state before using its links.
Whether a generated file has been made.
How an HTML template's PDFs are printed.
How an HTML template's PDFs are printed.
A position inside a field, such as NorthWest for the top left corner.
How an image is resized to its field: scaled to fit inside it (fit), scaled to cover it and cropped (fill), or stretched to its shape (stretch).
A language that DocSpring generates typed code in.
Where to move the folder.
Where to move the template.
How a number field's value is compared with a check mark's or shape's condition.
A file format DocSpring makes: pdf, docx (a Word document), odt (an OpenDocument file), or png (images of a PDF's pages).
A paper size, or Custom.
An image of one page of a PDF, a PNG of a submission's page or a JPEG of a template's.
A PNG image of each page of the submission's PDF (the png output format), at 140 DPI: a US Letter page is 1190 x 1540 pixels.
A field name that people using the embedded template editor can choose from, with the data type and settings a field gets when it's given that name.
A field name that people using the embedded template editor can choose from, with the data type and settings a field gets when it's given that name.
The version to publish.
The fields to remove from the template's draft.
The folder's new name.
The new order of the fields in the template's draft.
The version to restore.
A shape a field can draw.
A request for someone to fill in their fields of a submission and sign it. Someone who only fills in fields for the people who sign later (such as an employer's section) has a signature request too. The submission's PDF is generated once every signature request is completed.
A second factor your app authenticated a person with.
How your app authenticated a person before it showed them a signature request.
Something that happened to a signature request outside DocSpring, for its audit trail: you sent the request to the person (send_request). The audit trail shows it as reported by your account.
Something that happened to a signature request.
A request for someone to fill in their fields of a submission and sign it. Someone who only fills in fields for the people who sign later (such as an employer's section) has a signature request too. The submission's PDF is generated once every signature request is completed.
How a signature request was sent to a person.
Whether a signature request is waiting for its signer, completed or declined.
A token that opens a signature request without signing in to DocSpring, in a form embedded in your app or from a link you send. Create a token each time you open the form or send a link, rather than storing one to reuse later: its link expires. A signing page that opened before then keeps working for 7 more days, so the person can finish the form later.
How long a signature request token's link opens the signature request.
How a string field's value is compared with a check mark's or shape's condition.
Data submitted to a template, and the files generated from it (a PDF, a Word document, an OpenDocument file, or more than one of them).
An upload of a PDF to your storage, such as an S3 bucket.
Where a submission action (an upload to your storage) is.
The kind of storage a submission action uploads the PDF to.
Submissions created together in one request. Their files are only generated when every submission in the batch is valid.
Where a submission batch is in its processing.
A submission's generated files. Each one is left out until it exists.
A submission to create in a batch, with its own template when it doesn't use the batch's.
A page of submissions, newest first.
What created a submission.
A submission's PDF to merge.
Where a submission is in its processing.
A submission in a list: its template, state, test or live, metadata and timestamps, with its data and files when you ask for them. Get a submission by its ID for its signature requests, uploads and page images.
Whether creating the submission would succeed, checked without saving it or making any files. error is the error that creating it would return (validation_failed, or invalid_data for data that doesn't match the template's fields), and is left out when valid is true.
A template that generates PDFs from submission data.
A user in your account, an API token, or someone using the embedded template editor.
Who changed a template (a user in your account, an API token, or someone using the embedded template editor).
The default style of the template's fields. Each field can override it.
The default style of the template's fields. Each field can override it.
What changed in a version of a template since the version before it: the draft since the latest published version, or a published version since the one before it. Fields are compared with all their settings, so y is measured from the top of each field's page.
How many changes of each kind a template diff has.
A PDF template's PDF, or a Word template's Word document.
Where a template's document is in its processing.
A PDF template's PDF or a Word template's Word document, as template lists show it.
A field whose settings changed between two versions of a template.
The fields that changed between two versions of a template.
A conditional logic rule: when other fields' values meet its conditions, it shows its target fields, makes them required, or both.
What a conditional logic rule does to the fields it applies to.
A condition on a field's value.
A condition on a field's value.
A conditional logic rule: when other fields' values meet its conditions, it shows its target fields, makes them required, or both.
Whether all of a rule's conditions or any of them must be met.
How a condition compares a field's value.
How AI field setup's logic step is going.
A field that moved in a template's field order.
A template's fields, page by page.
Which hosted form a template's form link opens.
Typed code for the template's submission data, for an app that creates submissions.
Why AI naming failed or was skipped on a page.
Why AI didn't name a page's fields.
How setting up a page's fields is going.
Whether a page's image has been rendered.
A JPEG image of each page of a PDF template's PDF, at 140 DPI (a US Letter page is 1190 x 1540 pixels), to see the pages that fields are placed on. The template's document.page_dimensions gives each page's size in PDF points. Fields are placed in units where every page is 2480 wide: to place a field at a point on an image, multiply the point's pixel coordinates by 2480 and divide them by the image's width.
How processing is going on one page of a PDF template's PDF.
PNG images of a template's pages filled in with data you send (not a PDF), to check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A preview makes no submission and uses no credits. Its pages are watermarked like a test submission's PDF, and it's deleted an hour after it's created.
Where a preview is in its rendering.
A template's PDF to merge.
A template in a list: its name, type, folder, latest published version and whether it's ready. Get a template by its ID for its settings, its PDF in full, its HTML, defaults, field dependency rules and published versions.
A page of templates (drafts), newest first.
The kind of template: pdf (fields placed on an uploaded PDF), html (a PDF rendered from HTML) or docx (a Word document with tags where the data goes).
A published version of a template.
Which part of a version number to increase.
A horizontal text alignment.
What happens to text that doesn't fit in its field.
A vertical text alignment.
One of the template editor's typefaces.
The settings to change. Properties left out keep their values.
The new PDF, or a Word template's new Word document, as one of cache_id, document_url and document_base64.
The fields to change in the template's draft.
The settings to change. Properties left out keep their values.
The settings to change. Properties left out keep their values.
The HTTP method to upload a file with.
A presigned S3 form for uploading a file. POST fields and the file (as file, last) to url as multipart/form-data. Then use fields.key as the cache_id when you create a custom file.
A PDF to download from a URL and merge.
The submission's data and settings.
An endpoint that DocSpring sends a POST request to when a subscribed event happens.
An event that a webhook can subscribe to.
A page of webhooks, newest first.
Which submissions a webhook sends events for, test or live.
Helper functions for building Tesla requests
Checks a request against API v2's request schemas (request_schemas.json, the schemas the API validates requests with) before it's sent, and says what the API would say about it. api_clients/validator_conformance checks that it agrees with the API.
A request the API would reject with a 422, found before it was sent. details are the API's error details
(Docspring.Model.ErrorDetail), each with a code, a message and a pointer into the body (or a parameter for a
query parameter).
Checks webhook requests' X-DocSpring-Signature header (https://docspring.com/docs/webhooks/verifying-signatures/).