{"components":{"schemas":{"DocumentRequest":{"properties":{"accent_color":{"description":"Custom accent hex color","type":"string"},"amount_paid":{"type":"number"},"compliance_mode":{"enum":["none","eu_vat","factur-x","peppol_bis","hipaa_baa","zatca","irs_w9","pci_dss","soc2_badge","statutory_sworn"],"type":"string"},"county":{"description":"County name for notarial jurat and deed recording headers","type":"string"},"currency":{"default":"USD","type":"string"},"currency_placement":{"enum":["prefix","suffix"],"type":"string"},"currency_separators":{"enum":["comma_dot","dot_comma","space_comma","apostrophe_dot","plain"],"type":"string"},"currency_symbol_mode":{"enum":["symbol","code"],"type":"string"},"custom_fields":{"items":{"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"type":"object"},"type":"array"},"date_format":{"enum":["iso","us_slash","euro","formal_prose","short_abbrev","short_dot"],"type":"string"},"discount_amount":{"type":"number"},"doc_number":{"description":"Unique document or invoice number","type":"string"},"doc_type":{"description":"The type of document to create","enum":["invoice","invoice_standard","invoice_freelance","invoice_construction","invoice_medical","invoice_saas","invoice_minimal","proforma_invoice","estimate","receipt","purchase_order","packing_slip","credit_note","work_order","expense_report","delivery_receipt","commercial_lease","quotation_tender","agreement","agreement_sow","contractor_agreement","retainer_agreement","nda","bill_of_sale","certificate","certificate_insurance","certificate_completion","inspection_report","residential_lease","commercial_nnn_lease","property_management_statement","rent_roll","closing_settlement_statement","notice_to_vacate","security_deposit_disposition","real_estate_commission","property_inspection_checklist","letter_of_intent_cre","tenant_estoppel","room_rental_lease","lease_renewal_agreement","lease_amendment","rental_application","adverse_action_notice","notice_of_entry","rent_increase_notice","mutual_lease_termination","tenant_rent_ledger","schedule_of_real_estate_owned","schedule_e_tax_worksheet","real_estate_deal_analysis","sublease_agreement","rent_to_own_agreement","property_management_agreement","real_estate_purchase_agreement","property_deed","mechanics_lien_waiver"],"type":"string"},"due_date":{"description":"Payment due date (YYYY-MM-DD)","type":"string"},"execution_mode":{"enum":["esign","wet_ink","wet-ink","notarized_wet","ron","notarized_ron"],"type":"string"},"font_family":{"enum":["sans","serif","mono"],"type":"string"},"font_scale":{"enum":["compact","standard","large"],"type":"string"},"from":{"properties":{"address":{"type":"string"},"company":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"tax_id":{"type":"string"}},"required":["name"],"type":"object"},"include_clerk_stamp":{"type":"boolean"},"is_paid":{"type":"boolean"},"issue_date":{"description":"Document issue date (YYYY-MM-DD)","type":"string"},"items":{"items":{"properties":{"description":{"type":"string"},"discount":{"type":"number"},"quantity":{"type":"number"},"unit_price":{"type":"number"}},"required":["description","quantity","unit_price"],"type":"object"},"type":"array"},"lease_package_mode":{"description":"Append mandatory standalone state attachment sheets and move-in checklists","type":"boolean"},"municipality":{"description":"Municipal sub-profile override (Chicago, Cook County, New York City, San Francisco, Seattle, Portland)","type":"string"},"notary_required":{"description":"Render state-specific Notarial Acknowledgment & Jurat block","type":"boolean"},"notes":{"type":"string"},"number_decimals":{"default":2,"type":"integer"},"paper_size":{"enum":["us-letter","a4","us-legal"],"type":"string"},"payment_link":{"description":"Stripe checkout URL or custom payment link","type":"string"},"payment_method":{"type":"string"},"payment_qr_code":{"description":"Render embedded vector QR code for mobile payments","type":"boolean"},"payment_status":{"enum":["unpaid","pending","partial","paid","refunded"],"type":"string"},"primary_color":{"description":"Custom primary hex color (e.g. #4f46e5)","type":"string"},"recordable":{"description":"Enable 3.0-inch County Register of Deeds recording cover header","type":"boolean"},"sections":{"items":{"properties":{"content":{"type":"string"},"title":{"type":"string"}},"required":["title","content"],"type":"object"},"type":"array"},"signatures":{"items":{"properties":{"date":{"type":"string"},"signer_name":{"type":"string"},"signer_title":{"type":"string"}},"required":["signer_name"],"type":"object"},"type":"array"},"signer_name":{"description":"Name of authorized signatory","type":"string"},"signer_title":{"description":"Title of authorized signatory","type":"string"},"state_code":{"description":"2-letter US state or DC jurisdiction code (e.g. TN, CA, NY, FL, TX, VA, MN, WI)","type":"string"},"tax_rate":{"description":"Percentage tax rate (e.g. 8.5 for 8.5%)","type":"number"},"terms":{"type":"string"},"theme":{"description":"Preset visual styling theme","enum":["modern_slate","executive_navy","emerald","crimson_legal","warm_sand","obsidian"],"type":"string"},"title":{"description":"Custom document title (e.g. 'INVOICE')","type":"string"},"to":{"properties":{"address":{"type":"string"},"company":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"tax_id":{"type":"string"}},"required":["name"],"type":"object"},"unit_measure":{"type":"string"},"watermark":{"type":"string"},"year_built":{"description":"Property construction year (<1978 triggers Federal Lead-Based Paint disclosure)","type":"integer"}},"required":["doc_type","from","to"],"type":"object"},"GenerateResponse":{"properties":{"compile_time_ms":{"type":"integer"},"doc_number":{"type":"string"},"grand_total":{"type":"number"},"pdf_base64":{"description":"Raw Base64-encoded PDF bytes","type":"string"},"preview_data_uri":{"description":"Base64 PNG Data URI for visual rendering","type":"string"},"success":{"type":"boolean"}},"type":"object"},"LifecycleConvertRequest":{"properties":{"credit_reason":{"description":"Reason for issuing credit note or refund","type":"string"},"document":{"$ref":"#/components/schemas/DocumentRequest"},"due_days":{"description":"Number of days until payment is due (for invoice conversion)","type":"integer"},"payment_link":{"description":"Stripe checkout URL for online payments","type":"string"},"payment_qr_code":{"description":"Whether to include a QR code for the payment link","type":"boolean"},"target_type":{"description":"Target lifecycle document type","enum":["invoice","receipt","estimate","credit_note","refund"],"type":"string"},"valid_days":{"description":"Number of days proposal is valid (for estimate conversion)","type":"integer"}},"required":["document","target_type"],"type":"object"},"LifecyclePayRequest":{"properties":{"amount_paid":{"description":"Amount received (if less than total, records partial payment)","type":"number"},"document":{"$ref":"#/components/schemas/DocumentRequest"},"paid_date":{"description":"Payment date (YYYY-MM-DD)","type":"string"},"payment_method":{"description":"Payment method (e.g. Stripe, Apple Pay, Bank Wire)","type":"string"},"transaction_reference":{"description":"Transaction reference or checkout ID","type":"string"}},"required":["document"],"type":"object"},"PreviewResponse":{"properties":{"compile_time_ms":{"type":"integer"},"image_data_uri":{"type":"string"},"success":{"type":"boolean"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"ChatGPT user delegation session token","scheme":"bearer","type":"http"},"chatgpt_oauth":{"description":"Sign in with ChatGPT to delegate AI Copilot generation and OCR to your ChatGPT Plus/Pro/Team subscription quota.","flows":{"authorizationCode":{"authorizationUrl":"https://auth.openai.com/api/accounts/authorize","scopes":{"email":"User email address","model.request":"Pass-through ChatGPT subscription compute allowance","openid":"OpenID Connect user profile","profile":"User profile information"},"tokenUrl":"https://auth.openai.com/api/accounts/oauth/token"}},"type":"oauth2"}}},"info":{"description":"Creates PDF invoices, estimates, receipts, contracts, non-disclosure agreements, and certificates, with PNG previews.","title":"Pressmark Vector Document Engine API","version":"1.3.0"},"openapi":"3.1.0","paths":{"/api/v1/auth/chatgpt/session":{"get":{"description":"Verifies whether the caller has authenticated via Sign in with ChatGPT and returns active subscription plan (Plus, Pro, Team, Enterprise) and compute allowance.","operationId":"getChatGptSession","responses":{"200":{"description":"Session status, user identity, and plan details"}},"summary":"Check ChatGPT login session and subscription plan"}},"/api/v1/copilot":{"post":{"description":"Applies supported edits to document details from written instructions.","operationId":"runCopilot","responses":{"200":{"description":"Modified document state and AI explanation"}},"summary":"AI Copilot document editing"}},"/api/v1/feedback":{"post":{"description":"Send a bug report, feature request, or general feedback to the private Pressmark inbox when the user asks. Include only details they choose to share; omit documents, passwords, and tokens.","operationId":"submitFeedback","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"actual":{"maxLength":1500,"type":"string"},"description":{"maxLength":6000,"minLength":1,"type":"string"},"expected":{"maxLength":1500,"type":"string"},"kind":{"enum":["bug","feature","general"],"type":"string"},"reply_email":{"description":"Optional email supplied by the user for feedback follow-up.","maxLength":254,"type":"string"},"request_id":{"description":"A new UUID for this report. Reuse it when retrying unchanged feedback.","format":"uuid","type":"string"},"steps":{"maxLength":3000,"type":"string"},"summary":{"maxLength":160,"minLength":1,"type":"string"},"version":{"maxLength":80,"type":"string"}},"required":["request_id","kind","summary","description"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Feedback receipt or review status. Keep the access key private."},"400":{"description":"Check the supplied feedback."},"404":{"description":"Report not found."},"409":{"description":"Request ID was reused with different feedback."},"429":{"description":"Please try again later."},"503":{"description":"Feedback could not be confirmed. Retry with the same request ID."}},"security":[],"summary":"Send Pressmark feedback"}},"/api/v1/feedback/status":{"post":{"description":"Check one Pressmark report using its report ID and private access key. Returns its review status without exposing the report text or contact details.","operationId":"getFeedbackStatus","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"access_key":{"maxLength":64,"minLength":64,"type":"string"},"report_id":{"format":"uuid","type":"string"}},"required":["report_id","access_key"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Feedback receipt or review status. Keep the access key private."},"400":{"description":"Check the supplied feedback."},"404":{"description":"Report not found."},"409":{"description":"Request ID was reused with different feedback."},"429":{"description":"Please try again later."},"503":{"description":"Feedback could not be confirmed. Retry with the same request ID."}},"security":[],"summary":"Check feedback status"}},"/api/v1/generate":{"post":{"description":"Creates a PDF and returns Base64 PDF data. Configured customer sync can save contact details and a document summary and start follow-up. See https://pressmark.dev/privacy.","operationId":"generateDocument","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}},"description":"Generated PDF document"}},"security":[],"summary":"Generate a PDF document"}},"/api/v1/lifecycle/convert":{"post":{"description":"Transforms an estimate or quote into an invoice, receipt, or credit note, updating document numbering, issue/due dates, and payment states.","operationId":"convertDocument","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleConvertRequest"}}},"required":true},"responses":{"200":{"description":"Converted document object"}},"security":[],"summary":"Convert document lifecycle state"}},"/api/v1/lifecycle/pay":{"post":{"description":"Records full or partial payment against an invoice, recalculating remaining balance due, updating payment status, and issuing an official payment receipt.","operationId":"recordPayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecyclePayRequest"}}},"required":true},"responses":{"200":{"description":"Updated document with calculated balance_due"}},"security":[],"summary":"Record document payment"}},"/api/v1/preview":{"post":{"description":"Returns a PNG preview that can be displayed in chat.","operationId":"previewDocument","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResponse"}}},"description":"Preview PNG image Base64 Data URI"}},"security":[],"summary":"Preview a document as PNG image"}},"/api/v1/pricing":{"get":{"description":"Returns plans, prices, document limits, and checkout links.","operationId":"getPricing","responses":{"200":{"description":"Plans and prices"}},"security":[],"summary":"Get subscription tiers and single pass prices"}}},"security":[{"chatgpt_oauth":["openid","profile","email","model.request"]},{"bearerAuth":[]},{}],"servers":[{"description":"Production Pressmark Server","url":"https://pressmark.dev"}]}