{"openapi":"3.1.0","info":{"title":"Final Notice API","version":"1.0.0","description":"Free, no-auth generator for professional debt-collection demand letters (PDF: letter + envelope), localized for 100 jurisdictions and 33 languages. Also available as an MCP server at /mcp."},"servers":[{"url":"https://finalnotice.io"}],"paths":{"/api/meta":{"get":{"operationId":"listJurisdictions","summary":"Supported jurisdictions, languages, tones, and bank-field schemas.","responses":{"200":{"description":"Metadata","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/preview":{"post":{"operationId":"previewDemandLetter","summary":"Render the demand letter's text content as JSON (no PDF).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jurisdiction":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the debtor (e.g. US, GB, DE, BR, AE). Use list_jurisdictions for the full set; XX = generic/international."},"language":{"type":"string","description":"Letter language code (e.g. en, es, fr, de, pt, ar, zh, ja). Must be offered for the jurisdiction; defaults to en."},"tone":{"type":"string","enum":["reminder","final","prelitigation"],"description":"Escalation level. Default: final."},"senderName":{"type":"string","description":"Creditor name (person or business). Required."},"senderType":{"type":"string","enum":["individual","business","firm"],"description":"Creditor type. Business/firm requires attested=true."},"senderAddress":{"type":"string","description":"Creditor postal address, multi-line (\\n separated). Required."},"senderContact":{"type":"string","description":"Creditor email/phone (optional)."},"senderRef":{"type":"string","description":"Creditor's own reference number (optional)."},"senderTitle":{"type":"string","description":"Signer's job title (optional)."},"signerName":{"type":"string","description":"Name of the person signing (optional; defaults to senderName)."},"debtorName":{"type":"string","description":"Debtor name. Required."},"debtorAddress":{"type":"string","description":"Debtor postal address, multi-line. Required."},"debtorType":{"type":"string","enum":["individual","business"],"description":"Whether the debtor is a private individual (consumer) or a business. 'individual' activates jurisdiction consumer rules (e.g. GB Pre-Action Protocol 30-day floor, NL WIK wording). Default: business."},"amount":{"type":"number","description":"Amount owed, as a number (no separators). Required, > 0."},"currency":{"type":"string","description":"ISO 4217 currency (optional; defaults to the jurisdiction's)."},"invoiceNumber":{"type":"string","description":"Invoice/account number (optional)."},"originalDate":{"type":"string","description":"ISO date the debt was incurred/invoiced (optional)."},"description":{"type":"string","description":"What the debt is for (optional)."},"deadlineDays":{"type":"number","description":"Days from issue to pay (optional; default 14)."},"bank":{"type":"object","description":"Payment/bank details keyed by field (e.g. {bankName, iban, accountNumber}). Optional.","additionalProperties":{"type":"string"}},"deliveryMethod":{"type":"string","enum":["registered","email","both"],"description":"How the letter is sent; printed as a notation above the recipient (e.g. 'By registered post and email'). Optional."},"enclosures":{"type":"string","description":"Enclosed documents, printed as 'Encl.: …' under the signature (e.g. 'Copy of invoice INV-123'). Optional."},"attested":{"type":"boolean","description":"Confirms authorization to send under the sender name. Required when senderType is business/firm."}},"required":["senderName","senderAddress","debtorName","debtorAddress","amount"]}}}},"responses":{"200":{"description":"Rendered letter"},"400":{"description":"Validation error"},"429":{"description":"Rate limited"}}}},"/api/generate":{"post":{"operationId":"generateDemandLetter","summary":"Generate the finished demand-letter PDF (letter + matching envelope).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jurisdiction":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the debtor (e.g. US, GB, DE, BR, AE). Use list_jurisdictions for the full set; XX = generic/international."},"language":{"type":"string","description":"Letter language code (e.g. en, es, fr, de, pt, ar, zh, ja). Must be offered for the jurisdiction; defaults to en."},"tone":{"type":"string","enum":["reminder","final","prelitigation"],"description":"Escalation level. Default: final."},"senderName":{"type":"string","description":"Creditor name (person or business). Required."},"senderType":{"type":"string","enum":["individual","business","firm"],"description":"Creditor type. Business/firm requires attested=true."},"senderAddress":{"type":"string","description":"Creditor postal address, multi-line (\\n separated). Required."},"senderContact":{"type":"string","description":"Creditor email/phone (optional)."},"senderRef":{"type":"string","description":"Creditor's own reference number (optional)."},"senderTitle":{"type":"string","description":"Signer's job title (optional)."},"signerName":{"type":"string","description":"Name of the person signing (optional; defaults to senderName)."},"debtorName":{"type":"string","description":"Debtor name. Required."},"debtorAddress":{"type":"string","description":"Debtor postal address, multi-line. Required."},"debtorType":{"type":"string","enum":["individual","business"],"description":"Whether the debtor is a private individual (consumer) or a business. 'individual' activates jurisdiction consumer rules (e.g. GB Pre-Action Protocol 30-day floor, NL WIK wording). Default: business."},"amount":{"type":"number","description":"Amount owed, as a number (no separators). Required, > 0."},"currency":{"type":"string","description":"ISO 4217 currency (optional; defaults to the jurisdiction's)."},"invoiceNumber":{"type":"string","description":"Invoice/account number (optional)."},"originalDate":{"type":"string","description":"ISO date the debt was incurred/invoiced (optional)."},"description":{"type":"string","description":"What the debt is for (optional)."},"deadlineDays":{"type":"number","description":"Days from issue to pay (optional; default 14)."},"bank":{"type":"object","description":"Payment/bank details keyed by field (e.g. {bankName, iban, accountNumber}). Optional.","additionalProperties":{"type":"string"}},"deliveryMethod":{"type":"string","enum":["registered","email","both"],"description":"How the letter is sent; printed as a notation above the recipient (e.g. 'By registered post and email'). Optional."},"enclosures":{"type":"string","description":"Enclosed documents, printed as 'Encl.: …' under the signature (e.g. 'Copy of invoice INV-123'). Optional."},"attested":{"type":"boolean","description":"Confirms authorization to send under the sender name. Required when senderType is business/firm."}},"required":["senderName","senderAddress","debtorName","debtorAddress","amount"]}}}},"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Validation error"},"429":{"description":"Rate limited"}}}}}}