{"openapi":"3.1.0","info":{"title":"BoltPDF API","version":"1.0.0","description":"Fill PDF forms, keep client records and run bulk jobs from your own systems. Every request needs an API key from Settings → API Keys, sent as `Authorization: Bearer bpk_…`. Keys act as the user who made them, with the same access, subscription and limits as the web app.\n\nEach operation's ID is the name of the matching MCP tool, and descriptions refer to other operations by those names. Errors come back as `{\"error\": {\"code\", \"message\"}}` with a 4xx or 5xx status. Each account can make 120 requests a minute; past that you get 429 with a Retry-After header."},"servers":[{"url":"https://app.boltpdf.com/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"The account an API key acts as, and its subscription"},{"name":"Templates","description":"PDF forms, their fields, field detection and standard field mappings"},{"name":"Share links","description":"Links anyone can open to fill in a form; each submission becomes a record"},{"name":"Records","description":"Saved sets of values (prefill records) and their groups. Any form fills from a record."},{"name":"Packets","description":"Ordered sets of forms filled together into one PDF"},{"name":"Documents","description":"Letters written in BoltPDF whose merge fields fill from a record"},{"name":"Questionnaires","description":"Intakes whose answers save to a record, so one answer fills every form asking for it"},{"name":"Automations","description":"Steps that run on a record when something happens to it, or when you run them"},{"name":"Jobs","description":"Bulk PDF generation and CSV imports, which run in the background"},{"name":"Webhooks","description":"URLs BoltPDF posts events to, such as a new share link submission or a finished job"}],"paths":{"/account":{"get":{"operationId":"get_account_info","summary":"Get Account Info","description":"Show which BoltPDF account and organization this API key acts as, the subscription status, and the AI page allowance. Works even when the subscription has lapsed — call this first when other tools report subscription errors.","tags":["Account"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates":{"get":{"operationId":"list_templates","summary":"List Templates","description":"List accessible PDF templates (global, personal, and current-organization) with search and pagination. Use get_template for a template's fields.","tags":["Templates"],"parameters":[{"name":"search","in":"query","required":false,"description":"Search by name or description","schema":{"description":"Search by name or description","type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"description":"Page number","default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"description":"Items per page","schema":{"description":"Items per page","default":12,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upload_pdf","summary":"Upload PDF","description":"Upload a PDF as a new template and start AI field detection. Provide either pdfUrl (preferred — any size up to 50 MB) or pdfBase64 (only for small files that fit in one tool call). Then poll get_field_detection_status.","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Template name","type":"string","minLength":1,"maxLength":200},"description":{"description":"Template description","type":"string"},"pdfBase64":{"description":"Base64-encoded PDF content. Suitable for small files (under ~50KB) that fit in a single tool call. For larger files, use pdfUrl instead.","type":"string"},"pdfUrl":{"description":"HTTPS URL to a PDF file. The server downloads it directly — preferred for files of any meaningful size. Max 50MB, 30s fetch timeout.","type":"string","format":"uri"}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}":{"get":{"operationId":"get_template","summary":"Get Template","description":"Get a template with its full field hierarchy (sections → field groups → fields). Each field's `fieldId` is the key to use in generate_pdf formData; `id` is the UUID used by save_prefill_record_data and update_field.","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_template","summary":"Update Template","description":"Rename a template or change its description.","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New name","type":"string","minLength":1,"maxLength":200},"description":{"description":"New description (null clears it)","anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_template","summary":"Delete Template","description":"Permanently delete a template and all of its sections, fields and share links. Prefill records are kept but lose their binding to this template's fields. This cannot be undone.","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{templateId}/fields":{"get":{"operationId":"list_fields","summary":"List Fields","description":"List all fields of a template as a flat array ordered by page, without the section/group hierarchy.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{templateId}/detection":{"get":{"operationId":"get_field_detection_status","summary":"Get Field Detection Status","description":"Check whether AI field detection has finished for a template. Poll this after upload_pdf or detect_fields until status is 'ready' (or 'skipped'/'failed').","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"detect_fields","summary":"Detect Fields","description":"Re-run AI field detection on a template (all pages, or one page). Existing fields on the affected pages are removed first; detected fields come back mapped to standard keys where they clearly hold one. Counts against the AI page allowance. Poll get_field_detection_status afterwards.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"description":"1-based page to re-detect. Omit to re-detect the whole template.","type":"integer","minimum":1,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{templateId}/standard-fields":{"post":{"operationId":"map_standard_fields","summary":"Map Standard Fields","description":"Map many of a template's fields to standard keys at once (see list_standard_fields). Pass mappings to set or clear (null) specific fields' keys; leave them out to apply the suggested key to every unmapped field. Returns the fields that changed.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mappings":{"description":"Omit to apply list_standard_fields' suggestions","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"fieldId":{"description":"The field's `id` (UUID)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"standardKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["fieldId","standardKey"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{templateId}/pdf":{"post":{"operationId":"generate_pdf","summary":"Generate PDF","description":"Fill a template with ad-hoc values and return the PDF as an embedded application/pdf resource. formData is keyed by each field's `fieldId` (from get_template). Dates, times, numbers and currency are strings in the field's configured format; checkboxes are booleans.\n\nThe response body is the PDF itself.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"formData":{"description":"Values keyed by fieldId","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"finish":{"description":"Optional finishing: page or Bates numbers, a watermark such as DRAFT, and a password to open the PDF","type":"object","properties":{"pageNumbers":{"description":"\"page\" prints \"Page 2 of 7\" at the bottom center of each page; \"bates\" prints a Bates number (prefix + 6 digits, e.g. ABC000001) at the bottom right","type":"string","enum":["page","bates"]},"batesPrefix":{"description":"Text before each Bates number (Bates only)","type":"string","maxLength":20,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"batesStart":{"description":"The first page's Bates number (Bates only, default 1)","type":"integer","minimum":1,"maximum":999999999},"watermark":{"description":"Text stamped faintly across each page, e.g. \"DRAFT\"","type":"string","minLength":1,"maxLength":40,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"password":{"description":"Password needed to open the PDF (AES-256 encrypted)","type":"string","minLength":4,"maxLength":64}}}},"required":["formData"]}}}},"responses":{"200":{"description":"The filled PDF. BoltPDF-Fields-Filled and BoltPDF-Total-Fields say how many fields got a value; BoltPDF-Ignored-Keys lists formData keys that matched no field; BoltPDF-Missing-Fields lists a document's merge fields the record has no value for (URL-encoded, comma-separated).","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{templateId}/share-links":{"get":{"operationId":"list_share_links","summary":"List Share Links","description":"List share links for a template with their URL, status and submission counts.","tags":["Share links"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_share_link","summary":"Create Share Link","description":"Create a public link where anyone can fill in the template without an account. Each submission is saved as a prefill record owned by the caller. With requireSignature, the person verifies their email with a one-time code, consents to sign electronically, and e-signs; they and you get the signed PDF with a certificate page. Returns the URL to send out.","tags":["Share links"],"parameters":[{"name":"templateId","in":"path","required":true,"description":"Template UUID","schema":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"description":"ISO 8601 date/time after which the link stops accepting submissions. Omit for no expiry.","type":"string"},"maxSubmissions":{"description":"Maximum number of submissions. Omit for unlimited.","type":"integer","minimum":1,"maximum":10000},"requireSignature":{"description":"Collect a legally binding e-signature: email verification, consent, and a signed PDF with an audit trail. The template needs a SIGNATURE field.","type":"boolean"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/fields/{id}":{"patch":{"operationId":"update_field","summary":"Update Field","description":"Change a field's label, type, standard key, validation or formatting. Position and size are edited in the web editor, not here. Changing the label regenerates the field's `fieldId`; changing to an incompatible type discards prefill data saved for the field, and unmaps a standard key the new type can't hold.","tags":["Templates"],"parameters":[{"name":"id","in":"path","required":true,"description":"Field UUID (the `id` from get_template, not `fieldId`)","schema":{"description":"Field UUID (the `id` from get_template, not `fieldId`)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["TEXT","NUMBER","CHECKBOX","EMAIL","PHONE","DATE","CURRENCY","TIME","TEXTAREA"]},"isRequired":{"type":"boolean"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultValue":{"anyOf":[{"type":"string"},{"type":"null"}]},"minLength":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"maxLength":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"minValue":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxValue":{"anyOf":[{"type":"number"},{"type":"null"}]},"dateFormat":{"description":"date-fns format string, e.g. MM/dd/yyyy","anyOf":[{"type":"string"},{"type":"null"}]},"timeFormat":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneFormat":{"anyOf":[{"type":"string"},{"type":"null"}]},"phoneDefaultCountry":{"description":"ISO 3166-1 alpha-2, e.g. US","anyOf":[{"type":"string"},{"type":"null"}]},"currencyCode":{"description":"ISO 4217, e.g. USD","anyOf":[{"type":"string"},{"type":"null"}]},"textTransform":{"type":"string","enum":["none","uppercase","lowercase"]},"fontSize":{"type":"number","minimum":6,"maximum":72},"fontColor":{"description":"Hex color, e.g. #000000","type":"string"},"fontFamily":{"type":"string"},"bold":{"type":"boolean"},"italic":{"type":"boolean"},"letterSpacing":{"type":"number"},"combCells":{"description":"Box widths for a comb whose boxes vary, as count x width in points from the field x, e.g. \"20x14.2, 20x15.1\". Null clears it.","anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"standardKey":{"description":"Standard key from list_standard_fields, e.g. 'taxpayer.ssn'. Fields mapped to the same key share one value in every record, across templates. Null unmaps it.","anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/standard-fields":{"get":{"operationId":"list_standard_fields","summary":"List Standard Fields","description":"List the standard field keys (e.g. 'taxpayer.ssn', 'spouse.first_name', 'business.ein'). Map a template field to a key with update_field's standardKey: every field mapped to the same key, on any template, shares one value in each prefill record, so one record fills a whole packet of forms. Pass templateId to also get a suggested key for each of that template's unmapped fields, from its label.","tags":["Templates"],"parameters":[{"name":"type","in":"query","required":false,"description":"Only keys a field of this type can hold","schema":{"description":"Only keys a field of this type can hold","type":"string","enum":["TEXT","NUMBER","CHECKBOX","EMAIL","PHONE","DATE","CURRENCY","TIME","TEXTAREA"]}},{"name":"templateId","in":"query","required":false,"description":"Suggest keys for this template's unmapped fields","schema":{"description":"Suggest keys for this template's unmapped fields","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories":{"get":{"operationId":"list_categories","summary":"List Categories","description":"List template categories available to the caller.","tags":["Templates"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/share-links/{id}":{"delete":{"operationId":"revoke_share_link","summary":"Revoke Share Link","description":"Permanently disable a share link. Submissions already received are kept.","tags":["Share links"],"parameters":[{"name":"id","in":"path","required":true,"description":"Share link UUID","schema":{"description":"Share link UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/records":{"get":{"operationId":"list_prefill_records","summary":"List Prefill Records","description":"List accessible prefill records (saved sets of field values) with search, optional group filter, and pagination.","tags":["Records"],"parameters":[{"name":"search","in":"query","required":false,"description":"Search by name","schema":{"description":"Search by name","type":"string"}},{"name":"groupId","in":"query","required":false,"description":"Only records in this record group","schema":{"description":"Only records in this record group","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"description":"Page number","default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"description":"Items per page","schema":{"description":"Items per page","default":10,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_prefill_record","summary":"Create Prefill Record","description":"Create an empty prefill record, then fill it with save_prefill_record_data.","tags":["Records"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Record name","type":"string","minLength":1,"maxLength":200},"groupId":{"description":"Record group UUID (see list_record_groups)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/records/{id}":{"get":{"operationId":"get_prefill_record","summary":"Get Prefill Record","description":"Get a prefill record with all of its saved field data. Entries with a pdfFieldId are bound to a specific template field; entries with a standardKey fill every template field mapped to that key; entries with only a fieldKey match any template field whose normalized label equals the key.","tags":["Records"],"parameters":[{"name":"id","in":"path","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_prefill_record","summary":"Update Prefill Record","description":"Rename a prefill record or move it to a different record group (groupId: null removes it from its group).","tags":["Records"],"parameters":[{"name":"id","in":"path","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New name","type":"string","minLength":1,"maxLength":200},"groupId":{"description":"New record group UUID, or null to ungroup","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_prefill_record","summary":"Delete Prefill Record","description":"Permanently delete a prefill record and all of its saved field data. This cannot be undone.","tags":["Records"],"parameters":[{"name":"id","in":"path","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/records/{prefillRecordId}/values":{"post":{"operationId":"save_prefill_record_data","summary":"Save Prefill Record Data","description":"Upsert field values on a prefill record. Pass pdfFieldId (the field's `id` from get_template) to bind a value to a specific template field; when that field has a standardKey, the value is also saved under the key so it fills every template's fields mapped to it. To save a value for a standard key without naming a field, pass standardKey (see list_standard_fields). fieldKey is the normalized label (e.g. 'first-name') used for cross-template matching. Checkbox/radio values are the strings 'true'/'false'.","tags":["Records"],"parameters":[{"name":"prefillRecordId","in":"path","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fieldData":{"description":"Field values to save","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"fieldKey":{"description":"Normalized field label","type":"string","minLength":1},"value":{"description":"Field value","type":"string"},"pdfFieldId":{"description":"Template field UUID to bind this value to","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"standardKey":{"description":"Standard key to save the value under, e.g. 'taxpayer.ssn'","type":"string"}},"required":["fieldKey","value"]}}},"required":["fieldData"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/records/{id}/coverage":{"get":{"operationId":"get_record_coverage","summary":"Get Record Coverage","description":"List the templates a prefill record fills at least part of, best covered first: how many of each template's items it fills (`filled` of `total`; a radio group counts once; signatures and unsaved fields don't count) and the labels of required items it still lacks. Use it to see which forms a record can generate in full.","tags":["Records"],"parameters":[{"name":"id","in":"path","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/records/{prefillRecordId}/pdf":{"post":{"operationId":"generate_pdf_from_prefill_record","summary":"Generate PDF from Prefill Record","description":"Fill a template from a saved prefill record and return the PDF as an embedded application/pdf resource. Values bound to the template's fields (pdfFieldId) win; otherwise a value whose fieldKey matches the field's normalized label is used, as in the web app.\n\nThe response body is the PDF itself.","tags":["Records"],"parameters":[{"name":"prefillRecordId","in":"path","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"finish":{"description":"Optional finishing: page or Bates numbers, a watermark such as DRAFT, and a password to open the PDF","type":"object","properties":{"pageNumbers":{"description":"\"page\" prints \"Page 2 of 7\" at the bottom center of each page; \"bates\" prints a Bates number (prefix + 6 digits, e.g. ABC000001) at the bottom right","type":"string","enum":["page","bates"]},"batesPrefix":{"description":"Text before each Bates number (Bates only)","type":"string","maxLength":20,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"batesStart":{"description":"The first page's Bates number (Bates only, default 1)","type":"integer","minimum":1,"maximum":999999999},"watermark":{"description":"Text stamped faintly across each page, e.g. \"DRAFT\"","type":"string","minLength":1,"maxLength":40,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"password":{"description":"Password needed to open the PDF (AES-256 encrypted)","type":"string","minLength":4,"maxLength":64}}}},"required":["templateId"]}}}},"responses":{"200":{"description":"The filled PDF. BoltPDF-Fields-Filled and BoltPDF-Total-Fields say how many fields got a value; BoltPDF-Ignored-Keys lists formData keys that matched no field; BoltPDF-Missing-Fields lists a document's merge fields the record has no value for (URL-encoded, comma-separated).","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/record-groups":{"get":{"operationId":"list_record_groups","summary":"List Record Groups","description":"List record groups (folders for prefill records) accessible to the caller.","tags":["Records"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_record_group","summary":"Create Record Group","description":"Create a record group to organise prefill records.","tags":["Records"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Group name","type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/packets":{"get":{"operationId":"list_packets","summary":"List Packets","description":"List the caller's packets (and their organization's), most recently changed first. A packet is an ordered set of templates, and optionally documents (letters), filled from one record into one merged PDF. Each packet has `templates` (its forms) and `items` (its forms and documents, in page order, each with a kind of 'form' or 'document').","tags":["Packets"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_packet","summary":"Create Packet","description":"Create a packet: templates (and documents, such as an engagement letter) that are filled together from one prefill record and merged into one PDF, in the given order. Give templateIds for forms only, or items to include documents. Owned by the caller's organization when the key belongs to one.","tags":["Packets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Packet name, e.g. New client onboarding","type":"string","minLength":1,"maxLength":120},"templateIds":{"description":"Template UUIDs in the order their pages should appear (1 to 20, each once). For a packet with documents too, use items instead.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"items":{"description":"Templates ({ \"templateId\": \"...\" }) and documents ({ \"documentId\": \"...\" }, from list_documents) in the order their pages should appear (1 to 20, each once). Use this or templateIds.","minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"templateId":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["templateId"]},{"type":"object","properties":{"documentId":{"description":"Document UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["documentId"]}]}}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/packets/{packetId}":{"get":{"operationId":"get_packet","summary":"Get Packet","description":"Get a packet with its templates in page order, including each template's field detection status (all must be 'ready' or 'skipped' to generate), and `items`: its templates and documents in page order.","tags":["Packets"],"parameters":[{"name":"packetId","in":"path","required":true,"description":"Packet UUID","schema":{"description":"Packet UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_packet","summary":"Update Packet","description":"Rename a packet, or replace what's in it. items (or templateIds, for forms only) is the whole new list in page order, not an addition, so templateIds drops the packet's documents; call get_packet first to keep the current ones.","tags":["Packets"],"parameters":[{"name":"packetId","in":"path","required":true,"description":"Packet UUID","schema":{"description":"Packet UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New name","type":"string","minLength":1,"maxLength":120},"templateIds":{"description":"Template UUIDs in the order their pages should appear (1 to 20, each once). For a packet with documents too, use items instead.","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"items":{"description":"Templates ({ \"templateId\": \"...\" }) and documents ({ \"documentId\": \"...\" }, from list_documents) in the order their pages should appear (1 to 20, each once). Use this or templateIds.","minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"templateId":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["templateId"]},{"type":"object","properties":{"documentId":{"description":"Document UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["documentId"]}]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete_packet","summary":"Delete Packet","description":"Delete a packet. Its templates and records stay, and bulk jobs made from it keep their files.","tags":["Packets"],"parameters":[{"name":"packetId","in":"path","required":true,"description":"Packet UUID","schema":{"description":"Packet UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/packets/{packetId}/pdf":{"post":{"operationId":"generate_packet","summary":"Generate Packet","description":"Fill every template and document in a packet from one saved prefill record and return them merged into one PDF, as an embedded application/pdf resource. Values match fields the same way as generate_pdf_from_prefill_record, and documents fill as generate_document does. finish options (page or Bates numbers, a watermark, a password) apply to the merged PDF, so page numbers run across all its forms.\n\nThe response body is the PDF itself.","tags":["Packets"],"parameters":[{"name":"packetId","in":"path","required":true,"description":"Packet UUID","schema":{"description":"Packet UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prefillRecordId":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"finish":{"description":"Optional finishing: page or Bates numbers, a watermark such as DRAFT, and a password to open the PDF","type":"object","properties":{"pageNumbers":{"description":"\"page\" prints \"Page 2 of 7\" at the bottom center of each page; \"bates\" prints a Bates number (prefix + 6 digits, e.g. ABC000001) at the bottom right","type":"string","enum":["page","bates"]},"batesPrefix":{"description":"Text before each Bates number (Bates only)","type":"string","maxLength":20,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"batesStart":{"description":"The first page's Bates number (Bates only, default 1)","type":"integer","minimum":1,"maximum":999999999},"watermark":{"description":"Text stamped faintly across each page, e.g. \"DRAFT\"","type":"string","minLength":1,"maxLength":40,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"password":{"description":"Password needed to open the PDF (AES-256 encrypted)","type":"string","minLength":4,"maxLength":64}}}},"required":["prefillRecordId"]}}}},"responses":{"200":{"description":"The filled PDF. BoltPDF-Fields-Filled and BoltPDF-Total-Fields say how many fields got a value; BoltPDF-Ignored-Keys lists formData keys that matched no field; BoltPDF-Missing-Fields lists a document's merge fields the record has no value for (URL-encoded, comma-separated).","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents":{"get":{"operationId":"list_documents","summary":"List Documents","description":"List the caller's documents (and their organization's), most recently changed first. A document is a letter written in BoltPDF, such as an engagement letter, whose merge fields fill from a prefill record. Each one lists its merge fields: a standard key (e.g. taxpayer.first_name), label:<normalized field label> for a value saved under that label on any form, record.name, or date.today.","tags":["Documents"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{documentId}/pdf":{"post":{"operationId":"generate_document","summary":"Generate Document","description":"Fill a document's merge fields from a saved prefill record and return it as a PDF, as an embedded application/pdf resource. Merge fields the record has no value for print as a blank line and are listed in `missing`; save those values to the record first (save_prefill_record_data, by standard key or label) for a complete letter.\n\nThe response body is the PDF itself.","tags":["Documents"],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Document UUID","schema":{"description":"Document UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prefillRecordId":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"date":{"description":"The date the document shows for today's date, YYYY-MM-DD. Defaults to today in UTC.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"finish":{"description":"Optional finishing: page or Bates numbers, a watermark such as DRAFT, and a password to open the PDF","type":"object","properties":{"pageNumbers":{"description":"\"page\" prints \"Page 2 of 7\" at the bottom center of each page; \"bates\" prints a Bates number (prefix + 6 digits, e.g. ABC000001) at the bottom right","type":"string","enum":["page","bates"]},"batesPrefix":{"description":"Text before each Bates number (Bates only)","type":"string","maxLength":20,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"batesStart":{"description":"The first page's Bates number (Bates only, default 1)","type":"integer","minimum":1,"maximum":999999999},"watermark":{"description":"Text stamped faintly across each page, e.g. \"DRAFT\"","type":"string","minLength":1,"maxLength":40,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"password":{"description":"Password needed to open the PDF (AES-256 encrypted)","type":"string","minLength":4,"maxLength":64}}}},"required":["prefillRecordId"]}}}},"responses":{"200":{"description":"The filled PDF. BoltPDF-Fields-Filled and BoltPDF-Total-Fields say how many fields got a value; BoltPDF-Ignored-Keys lists formData keys that matched no field; BoltPDF-Missing-Fields lists a document's merge fields the record has no value for (URL-encoded, comma-separated).","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questionnaires":{"get":{"operationId":"list_questionnaires","summary":"List Questionnaires","description":"List the caller's questionnaires (and their organization's), most recently changed first. A questionnaire is an intake: each question saves its answer to a prefill record under a standard key (e.g. taxpayer.first_name) or label:<normalized field label>, so one answer fills every form asking for it. Sections and questions can have showIf: shown only when an earlier yes-or-no question (answers 'true'/'false') or choice question has one of the listed answers. Pass withItems to get each questionnaire's sections and questions.","tags":["Questionnaires"],"parameters":[{"name":"withItems","in":"query","required":false,"description":"Include each questionnaire's sections and questions","schema":{"description":"Include each questionnaire's sections and questions","type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/questionnaires/{questionnaireId}/answers":{"get":{"operationId":"get_questionnaire_answers","summary":"Get Questionnaire Answers","description":"A prefill record's answers to a questionnaire, keyed by question id, from the values the record already has. `shownQuestionIds` are the questions shown for those answers (the others are hidden by a showIf), and `missing` lists required questions that are shown and unanswered.","tags":["Questionnaires"],"parameters":[{"name":"questionnaireId","in":"path","required":true,"description":"Questionnaire UUID","schema":{"description":"Questionnaire UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"prefillRecordId","in":"query","required":true,"description":"Prefill record UUID","schema":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"answer_questionnaire","summary":"Answer Questionnaire","description":"Save answers to a questionnaire on a prefill record, keyed by question id (see list_questionnaires with withItems). Each answer is checked against its question's type and saved under the question's standard key or label, so every form asking for it fills from it. Yes-or-no answers are 'true' or 'false' (yes/no also work), dates YYYY-MM-DD, choices one of the question's options; an empty string clears an answer. Answers to questions hidden by a showIf aren't saved and come back in `ignored`; `missing` lists required questions still unanswered.","tags":["Questionnaires"],"parameters":[{"name":"questionnaireId","in":"path","required":true,"description":"Questionnaire UUID","schema":{"description":"Questionnaire UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prefillRecordId":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"answers":{"description":"Answers keyed by question id, e.g. {\"a1b2c3\": \"Ann\"}","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":10000}}},"required":["prefillRecordId","answers"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/automations":{"get":{"operationId":"list_automations","summary":"List Automations","description":"List the caller's automations (and their organization's), most recently changed first. An automation runs its steps in order on a prefill record when its trigger happens: a share link submission (trigger.event share_link.submitted), a client sending back a request (client_request.submitted), the owner approving a client's answers (client_request.approved), someone putting a record in a group (record.added_to_group; not automations or CSV imports), someone finishing a questionnaire (questionnaire.completed: answers saved with every required question answered), on a schedule (schedule: it runs on every record in the group trigger.filter.groupId at the times trigger.schedule sets, by frequency daily, weekly, monthly or yearly, an hour from 0 to 23 and an IANA timeZone; nextRunAt is when it runs next), or only when run by hand (manual); trigger.filter limits it to one form, packet or questionnaire (templateId, packetId, questionnaireId) or group (groupId). Steps: fill_pdf (a form or packet, filled from the record), fill_document (a letter from Documents, filled from the record; with requireAllValues it stops when the record lacks a value the letter uses), send_email (to the record's client or given addresses, optionally attaching the PDFs and letters filled before it), send_client_request (asks the record's client to complete, and maybe sign, a form or packet) and move_to_group. `summary` describes each in words; `lastRun` is its latest run. Automations are made and edited in the web app.","tags":["Automations"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/automations/{automationId}/runs":{"post":{"operationId":"run_automation","summary":"Run Automation","description":"Run an automation's steps on a prefill record now, whatever its trigger and even when it's turned off. The record must belong to the same account as the automation (the organization's records for an organization's automation). The run happens in the background and can email the client, send them a request or move the record, so only run it when that's wanted. Returns the run; poll get_automation_run until status is \"succeeded\" or \"failed\" (each step's result says what it did or why it failed).","tags":["Automations"],"parameters":[{"name":"automationId","in":"path","required":true,"description":"Automation UUID","schema":{"description":"Automation UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prefillRecordId":{"description":"Prefill record UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["prefillRecordId"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/automation-runs":{"get":{"operationId":"list_automation_runs","summary":"List Automation Runs","description":"The latest automation runs, newest first: of one automation, on one record, or all of the caller's. Each run has its status, the error that stopped it and each step's result, as in get_automation_run.","tags":["Automations"],"parameters":[{"name":"automationId","in":"query","required":false,"description":"Only this automation's runs","schema":{"description":"Only this automation's runs","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"prefillRecordId","in":"query","required":false,"description":"Only runs on this record","schema":{"description":"Only runs on this record","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"limit","in":"query","required":false,"description":"Most runs to return (default 25)","schema":{"description":"Most runs to return (default 25)","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/automation-runs/{runId}":{"get":{"operationId":"get_automation_run","summary":"Get Automation Run","description":"One automation run: its status (\"queued\", \"running\", \"succeeded\" or \"failed\"), the error that stopped it, and each step with its result (what it did, or why it failed).","tags":["Automations"],"parameters":[{"name":"runId","in":"path","required":true,"description":"Automation run UUID","schema":{"description":"Automation run UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bulk-generations":{"get":{"operationId":"list_bulk_generation_jobs","summary":"List Bulk Generation Jobs","description":"List bulk PDF generation jobs created by the caller or their organization, newest first.","tags":["Jobs"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max jobs to return (newest first)","schema":{"description":"Max jobs to return (newest first)","default":20,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"start_bulk_generation","summary":"Start Bulk Generation","description":"Generate one PDF per prefill record in the background, from a template, from a packet (each record's PDF then holds every template and document in the packet, merged) or from a document (a letter per record), optionally with page or Bates numbers, a watermark, a password and a file name pattern. Pass one of templateId, packetId or documentId. Returns the job; poll get_bulk_generation_job for progress and download URLs.","tags":["Jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Job name","type":"string","minLength":1,"maxLength":200},"templateId":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"packetId":{"description":"Packet UUID, instead of templateId (see list_packets)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"documentId":{"description":"Document UUID, instead of templateId (see list_documents)","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"prefillRecordIds":{"description":"Prefill record UUIDs to generate PDFs for","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"options":{"description":"Finishing for every PDF (page or Bates numbers, a watermark, a password to open it) and how files are named. Bates numbers run on from file to file in record-name order.","type":"object","properties":{"pageNumbers":{"description":"\"page\" prints \"Page 2 of 7\" at the bottom center of each page; \"bates\" prints a Bates number (prefix + 6 digits, e.g. ABC000001) at the bottom right","type":"string","enum":["page","bates"]},"batesPrefix":{"description":"Text before each Bates number (Bates only)","type":"string","maxLength":20,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"batesStart":{"description":"The first page's Bates number (Bates only, default 1)","type":"integer","minimum":1,"maximum":999999999},"watermark":{"description":"Text stamped faintly across each page, e.g. \"DRAFT\"","type":"string","minLength":1,"maxLength":40,"pattern":"^[\\x20-\\x7E\\xA0-\\xFF]*$"},"password":{"description":"Password needed to open the PDF (AES-256 encrypted)","type":"string","minLength":4,"maxLength":64},"fileNamePattern":{"description":"File name for each PDF, without .pdf. Placeholders: {record} the record's name, {template} the form's (or packet's) name, {date} the job's date, as YYYY-MM-DD, {n} the file's number in the job (1, 2, 3...). Default {template}_{record}","type":"string","minLength":1,"maxLength":120}}}},"required":["name","prefillRecordIds"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bulk-generations/{id}":{"get":{"operationId":"get_bulk_generation_job","summary":"Get Bulk Generation Job","description":"Get a bulk generation job with its items. Completed items carry an outputUrl to download the PDF and the fileName to save it as (the file is removed after it has been downloaded in the web app).","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"Bulk generation job UUID","schema":{"description":"Bulk generation job UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/csv-imports":{"get":{"operationId":"list_csv_import_jobs","summary":"List CSV Import Jobs","description":"List CSV import jobs created by the caller or their organization, newest first.","tags":["Jobs"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Max jobs to return (newest first)","schema":{"description":"Max jobs to return (newest first)","default":20,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"start_csv_import","summary":"Start CSV Import","description":"Create prefill records in bulk from tabular data. Read the CSV yourself, map each column to a template field's `fieldId` (from get_template) or to a standard key (list_standard_fields), and pass the mapped rows. A standard key's value fills every field mapped to it, on this and other templates. Optionally generate a PDF per row when the import finishes.","tags":["Jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"description":"Template UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"name":{"description":"Import job name","type":"string","minLength":1,"maxLength":200},"rows":{"description":"Mapped rows (max 500 per import)","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"rowIndex":{"description":"0-based source row","type":"integer","minimum":0,"maximum":9007199254740991},"recordName":{"description":"Name for the created prefill record","type":"string","minLength":1},"fieldData":{"description":"Values keyed by fieldId or standard key","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["rowIndex","recordName","fieldData"]}},"groupId":{"description":"Record group to file the new records under","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"generateAfterImport":{"description":"Start a bulk generation job for the imported records","default":false,"type":"boolean"}},"required":["templateId","name","rows"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/csv-imports/{id}":{"get":{"operationId":"get_csv_import_job","summary":"Get CSV Import Job","description":"Get a CSV import job with its per-row items (status, created prefill record id, error).","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"CSV import job UUID","schema":{"description":"CSV import job UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"list_webhooks","summary":"List Webhooks","description":"List the URLs BoltPDF posts events to, for the caller and their organization, with the events each listens for and whether it's turned on. Secrets aren't included.","tags":["Webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_webhook","summary":"Create Webhook","description":"Subscribe a URL to events. BoltPDF POSTs each event as JSON ({ id, type, createdAt, data }) signed with the returned secret in the BoltPDF-Signature header, and retries failures for about 9 hours. Owned by the caller's organization when the key belongs to one. Events: share_link.submitted (Someone filled in a share link, and their answers became a new record); client_request.submitted (A client sent their answers (signed by everyone, when the request needs signing)); client_request.approved (You approved a client's answers, and they were saved to the record); client_request.declined (A client, or someone asked to sign after them, declined a request); bulk_generation.finished (A bulk generation job finished: completed, partly failed or failed); csv_import.finished (A CSV import finished).","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"Public https URL to post events to (no redirects are followed)","type":"string","maxLength":2000},"events":{"description":"Event types to send","minItems":1,"maxItems":12,"type":"array","items":{"type":"string","enum":["share_link.submitted","client_request.submitted","client_request.approved","client_request.declined","bulk_generation.finished","csv_import.finished"]}},"description":{"description":"A note on what it's for, e.g. Zapier: new submissions","type":"string","maxLength":200}},"required":["url","events"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"delete":{"operationId":"delete_webhook","summary":"Delete Webhook","description":"Delete a webhook and its delivery log. Events stop being sent to its URL, including ones waiting to be retried.","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook UUID","schema":{"description":"Webhook UUID","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{}}}},"400":{"description":"The input is invalid; `message` says what to fix","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, wrong or revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account has no active subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not something this key can see","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A bpk_ API key from Settings → API Keys"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["not_found"]},"message":{"type":"string"},"details":{}}}}}}}}