All updates

API v2

API v2 is live at /api/v2. It checks every request strictly and says exactly what's wrong, returns one error format everywhere, and makes every resource consistent. API v1 keeps working, with the e-signature changes in Safer E-Signatures.

  • Strict requests. An unknown property or query parameter, a value of the wrong type or a value outside a list is a 422 that points at the value and says how to fix it. Submission data is checked when you create the submission, including barcode values, email addresses and field overrides, instead of failing later when the PDF is generated.
  • One error format, {"error": {"code", "message", "details", "request_id"}}, for every error.
  • Consistent resources. Responses are the resource itself, every list is cursor-paginated, creates return 201, and every name is snake_case.
  • Signature requests. Data requests are now called signature requests, and a signer's role replaces v1's skipped placeholders.
  • Webhooks created with v2 send each event's resource as v2 returns it.

API v2 also has endpoints that API v1 doesn't:

  • Check before you create. validateSubmission checks a submission's data and settings as creating it would, without creating it or using credits.
  • Images of the pages. Add png to a submission's output_formats for an image of each page of its PDF, or add the images to a processed submission with generateSubmissionFiles. getTemplatePageImages returns an image of each page of a template.
  • Templates from a URL. Create a template, or replace its PDF, from a document_url that DocSpring downloads, or send the PDF as document_base64.
  • Template diffs. getTemplateDiff shows what changed in a template's draft since its last published version.

Our SDKs use API v2 from version 4.0.0, and 4.1.0 adds the endpoints above. Each SDK checks a request against the API's own rules before sending it, so most mistakes show up in your code before they reach DocSpring.

Migrating to API v2 lists every difference from v1.

Fill your first document today

Test PDFs are free and unlimited. No credit card needed.

Product news by email

New features and changes, once a month.