REST API
Changes to the REST API’s responses, states and limits. Changes to the API clients are listed in each client’s own changelog.
Credits & Rate Limits
How to handle 402, 403 and 429 responses in your integration
Changelog
Section titled “Changelog”Signature requests for every template type
Section titled “Signature requests for every template type”- HTML templates, Word templates and page designs can have signature requests. See how they work.
- Creating or updating a template takes
sync_fields, which is on by default: an HTML template’s code, a Word template’s document and a page design’s layout add a field for each value they read for the first time. Sendsync_fields: falseto manage the fields yourself. An HTML template’s submissions now check their data against the fields that this adds, so a value the code reads is required unless you make its field optional. - Templates have
signer_roles, the people who sign their submissions, and a field’ssigner_rolesays which of them fills it in or signs it, orsenderfor a field thatdatafills in. Creating or updating a template takessigner_roles, and adding or updating fields takessigner_role. See Signer roles. - A signature request’s
fieldsis optional. A signature request with arolegets the fields the template gives that role, and a submission’s only signature request can leave out both: it gets every field without a role thatdatadoesn’t fill in. - Templates have
signature_request_cc, which creating or updating a template takes too: who gets a copy of the completed document when DocSpring emails a submission’s signers, with the submission’scc.
Numbers in comb fields, and option labels
Section titled “Numbers in comb fields, and option labels”- A Number field printed in comb fields (one character per box) is never cut
off. When the number has a digit that no box prints, because it has more
digits than the fields have boxes or because the fields’ offsets leave a gap
where a digit falls, API v2 returns
invalid_datawhen you create the submission, with an error that names the field, and an API v1 submission ends in theerrorstate when its PDF is generated. Before, the PDF printed the digits that fit and left out the rest. For a signature request created through API v1, the submission fails once every signer has finished, so check the numbers you send against the template’s boxes. See SSN and comb fields. - A Number field split across comb fields with offsets prints each field’s own digits. Before, every field printed the number from its first digit.
- A template’s JSON schema lists the labels of a field’s options as
x-option-labels, for options that have labels or that are all lowercase words joined by underscores (head_of_householdshows as Head of household).enumis unchanged, and so is the data a submission takes. A field or group without a title is titled from its name with a letter at the end capitalized (list_ais “List A”, where it was “List a”).
Rate limits per account on older plans
Section titled “Rate limits per account on older plans”- Accounts on a plan purchased before prepaid credits now have one API rate
limit for their live API tokens and one for their test API tokens, each
counted across all those tokens and IP addresses. The limit itself hasn’t
changed, but it used to be counted separately for each IP address. Requests
over it get
429 Too Many Requests. See Credits & Rate Limits.
Template settings when creating a template with API v1
Section titled “Template settings when creating a template with API v1”- Creating a template with API v1 now keeps a setting the request sends even
when its value equals the setting’s built-in default, such as
public_submissions: falseorexpire_after: 7. Your account’s Template defaults page used to replace it. API v2 already worked this way. Settings the request leaves out still get your account’s template defaults.
Signatures come only from signature requests
Section titled “Signatures come only from signature requests”- A value for a signature or initials field, in
dataor in a field override’sdefault, makes a submissioninvalid_datain both API versions, with or without signature requests, in test mode too. Before, only submissions with signature requests were checked. To print a signature image or a name you send, use an Image or Text field. See Create signature requests. DocSpring Enterprise installs keep accepting them. - Web forms (Web Forms JS 3.0.0 and the hosted web form) and visual forms (Visual Forms JS 2.22.0 and the hosted visual form) no longer create their submissions through the API. Earlier versions of the embeds still do.
Account expiry settings
Section titled “Account expiry settings”- Accounts have their own
expiry settings,
on the Account page’s Data retention tab: one for submissions without
signature requests, one for signed documents (submissions with signature
requests) and one for combined PDFs. The first two cover the submissions of
templates that don’t set their own expiry, and the third covers combined PDFs
created without
expires_in. New accounts delete submissions after 30 days and combined PDFs after 1 day, and keep signed documents until they’re deleted. Existing accounts have all three off, so their live submissions stay until they turn one on. Test submissions are deleted after 30 days on every account of the hosted service. An account whose template defaults expired new templates’ submissions has that length in the first two instead, so its new templates expire as they did. submission.expiredandcombined_submission.expiredwebhooks now arrive for records with a stored file. They weren’t being sent. A changed expiry setting that deletes older records sends one for each.- An OAuth app needs the
deletescope to shorten a template’s expiry through API v2, since that deletes stored submissions. API tokens are unaffected. - A signing page opened with a signature request ID that doesn’t exist answers
410
submission_expired, where it answered 404not_found. - Templates have a new setting,
override_account_expiry, in both API versions’ template responses and create and update requests. When it’strue, the template’sexpire_submissions,expire_afterandexpiration_intervaldecide when all its submissions expire, with or without signature requests, including never. When it’sfalse, the account’s settings do. Existing templates have it on whereexpire_submissionsis on, and in the accounts whose template defaults expired new templates’ submissions. Turningexpire_submissionson also turns it on, unless the same request sets it, so integrations that only setexpire_submissionskeep working. So does creating a template through either API version withexpire_submissionsset, on or off:falsekeeps its submissions until you delete them, as it did before. - An account deleted with Delete Account refuses every API request, reads
included, with a
403and"code": "account_suspended"until one of its users signs in to cancel the deletion. - A combined PDF created without
expires_infollows the account’s setting. Before, it was kept until you deleted it. A request’sexpires_instill overrides the template’s and the account’s settings. Anexpires_inof 0 or less counts as not sent, so the account’s setting decides. - Changing an expiry setting now applies to the submissions and combined PDFs
already stored. Turning it on or shortening it deletes the ones already older
than the new setting, starting 24 hours after we email the account’s owner
and whoever made the change. Turning it off or lengthening it moves their
expires_atlater, or clears it, at once. Before, a change applied only to new ones. - A processed submission’s
expires_atcounts from itsprocessed_at. Before, it counted from a save a few seconds later.
Expired signed documents
Section titled “Expired signed documents”- When a submission with signature requests expires, its signature requests, their events and its audit trail are deleted along with its data and PDFs, and the API no longer lists the signature requests. We keep a record of the signing’s hashes, described in Signing evidence and retention.
- API v2 and webhook version 4 list a signed submission’s hash manifest as
files.signing_manifest. It’s the audit data that the signing’s record holds hashes of, so keep it with the signed PDF. - A signing link for a signature request that no longer exists answers 410
with
submission_expired, as a link to an expired submission does. Before, an unknown signature request ID answered 404 withnot_found.
Signature request emails
Section titled “Signature request emails”- DocSpring emails the signers of an API v2 signature request a link to sign,
and the signed PDF once everyone has signed. Set
send_emailtofalse, for the submission or for one signature request, when your app sends the links or embeds the signing form. API v1 never emails signers. See Emails from DocSpring. - New parameters for creating a submission:
send_email,signing_order,email_subject,email_message,cc,reply_to,notification_emails,notify_when_signedandreminders, and each signature request’ssend_emailandsigning_step. A signature request that DocSpring emails needs anemail, and itsauth_typeisemail_linkby default. - Signature requests have
send_email,signing_step,sent_atandemail_status, and submissions havesigning_order. - With
signing_order: sequential, a signer can’t sign until everyone in the steps before theirs has: the signing page says so, and Signature Requests JS’sonErrorgetsnot_your_turn. - New webhook events:
signature_request.sentandsignature_request.email_bounced(submission_data_request.sentandsubmission_data_request.email_bouncedin version 3). New webhooks get them by default. - Creating a submission that DocSpring emails can return
402with"code": "insufficient_credits_to_send",429with"code": "daily_email_limit_reached"when it would go over your account’s daily email limit, and403while your account’s emails are paused. Nothing is saved. - Templates have settings for these emails:
signature_request_from_name,signature_request_from_address,signature_request_signing_url,signature_request_include_signing_token,signature_request_reply_to,signature_request_notification_emailsandsignature_request_email_attachments.
API v2
Section titled “API v2”- API v2 is the current version of the API, and the 4.x API clients call it. API v1 and the 3.x clients keep working.
- API v2 calls data requests signature requests. New data requests get IDs
that start with
srq_instead ofdrq_, in both API versions. Existing ones keep their IDs. - Signing links expire, in both API versions. A signature request token’s link
(
api, the default) opens the signing form for 24 hours, and anemailtoken’s for 7 days. A signing page that opened in time keeps working for 7 more days, so the signer can finish later. Before, links never expired, whatever API v1’sexpires_atsaid. Tokens created before this change get the same lifetimes, counted from when they were created: an older link no longer opens the form, but a page the signer opened in the last 7 days still works. - Live signature requests (data requests in API v1) work on every plan,
including the free Developer plan, once your account has made a payment: a
credit pack or a paid plan. Before that, creating one returns
403 Forbiddenwith"code": "upgrade_required". Test signature requests are free on every plan. - A webhook with Include submission data turned off no longer sends any
form values: each data request’s (signature request’s)
data,ip_addressanduser_agent, and the submission’struncated_text, arenull. - The events of a test submission created with a live API token go to “Test only” webhooks, not “Live only” ones.
- API v1 changes for signature requests (data requests):
- A signature or initials value in the data of a submission with data
requests makes it an
invalid_datasubmission: only the signer signs. A signed PDF is always static, whatevereditablesays. - On a public template, only the template’s own account can send
data_requests,html,css,password,expires_inoreditable: other callers get a422. Theirfield_overridesonly keephidden,backgroundColorandrequired. - The data request events API only takes
send_requestevents, and a completed, declined or expired data request takes no more updates, tokens or events (422). - A test API token gets a
403when it creates a token or an event for a live data request, or updates one. - A submission with data requests can’t be reprocessed, and a published template version’s PDF can’t be replaced.
- A signature or initials value in the data of a submission with data
requests makes it an
- Other API v1 fixes:
POST /templateswithhtmland notemplate_typecreates an HTML template.POST /custom_fileswithout acache_id, and downloading a combined submission that has no PDF, are422s.- EAN-13, EAN-8 and UPC-A barcode fields take the code with its check digit, and a wrong check digit is a data error when you create the submission.
October 2026
Section titled “October 2026”These changes apply to accounts on the current plans (Developer, Starter,
Growth and Scale), except the account_suspended change, which applies to
every account. Accounts on a plan purchased before prepaid credits keep their
existing pricing and API rate limits.
- Submissions and combined submissions have a new state,
insufficient_credits: a live PDF your credit balance can’t cover is saved and resumes automatically when you add credits. Work that is still waiting after 30 days, or that you discard, moves toerror, and DocSpring sends thesubmission.failedorcombined_submission.failedwebhook. No webhook is sent when work starts waiting. - Creating a submission, batch or combined submission that your balance can’t
cover returns
402 Payment Requiredwith"code": "insufficient_credits"and the saved submission in the body. Synchronous requests return402too. - Requests that need a higher plan (adding templates over your plan’s limit,
live data requests, the embedded template editor) return
403 Forbiddenwith"code": "upgrade_required". Nothing is saved. - On the Developer plan, creating or turning on a webhook when the account
already has 2 active integrations (storage destinations, webhooks and Slack
notifications) returns
403 Forbiddenwith"code": "upgrade_required". Editing, turning off and deleting webhooks keep working. Setting a template’sslack_webhook_url(or, in API v1,webhook_url) to a new URL over the limit returns422with the same message. - Creating submissions, batches or combined PDFs on a suspended account returns
403 Forbiddenwith"code": "account_suspended". Nothing is saved. - Submissions and combined submissions that were already saved when an account
was suspended wait in the
account_suspendedstate instead of moving toerror, and are generated when the account is reactivated. As withinsufficient_credits, work still waiting after 30 days, or that you discard, moves toerror. - API requests are limited per account by plan, with separate limits for live
and test API tokens. Responses include
RateLimit-Limit,RateLimit-RemainingandRateLimit-Reset, and requests over the limit get429 Too Many RequestswithRetry-After. - If you use a DocSpring API client,
upgrade it to the latest version. Older versions of the Ruby, Python, PHP,
Java and C# clients raise an error when they read the
insufficient_creditsstate.
These expiry changes apply to every account:
- Expiring a submission also clears its metadata, schema errors, overflow text,
PDF password, error message, rendered HTML, and the submitter’s IP address,
browser and location. An expired submission returns
metadataandtruncated_textas{},json_schema_errorsas[], andpasswordanderror_messageasnull. A request that was waiting for credits keeps its “Not processed” error message. Thesubmission.expiredwebhook has the cleared values too, so match it to your records by itsid. - Expiring a combined submission also clears its metadata, password and error
message, and removes the URLs from
source_pdfs. - The
actionsof an expired submission or combined submission keep their state, withresult_dataas{}anderror_messageasnull. - A submission that doesn’t process (any state other than
processed, such aserrororinvalid_data) is kept for at least 48 hours before it expires, even whenexpires_inor the template’s expiry is shorter, so you can debug it and a retry still has its data. Itsexpires_atshows when. A processed submission keeps your expiry setting, and a failed submission that is later processed expires that long after processing. - Submissions saved with invalid data now expire like any other. Before, they were never deleted.
- A combined submission with
expires_inthat fails now expires too, after at least 48 hours. Before, failed combined submissions were never deleted.
This processing change applies to every account:
- A submission or combined submission that hits an unexpected error on our
side is retried for about a minute while it stays
pending, then moves toerrorand stays there, with a message saying what happened. Before, it moved toerrorand could still be retried and reachprocessedhours or days later.