{"components":{"responses":{"Error":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Content-free error"},"Limited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not admitted; no paid work queued. Retry no sooner than Retry-After; daily limits may last 24 hours.","headers":{"Retry-After":{"schema":{"type":"string"}}}}},"schemas":{"Discovery":{"additionalProperties":false,"properties":{"amendments":{"const":"reply_to_email"},"company_context_options":{"items":{"additionalProperties":false,"properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["value","label"],"type":"object"},"type":"array"},"delivery":{"const":"email"},"draft_types":{"items":{"additionalProperties":false,"properties":{"id":{"type":"string"},"label":{"type":"string"},"paired":{"type":"boolean"},"requires_context_document":{"type":"boolean"}},"required":["id","label","requires_context_document","paired"],"type":"object"},"type":"array"},"limits":{"additionalProperties":false,"properties":{"files":{"type":"integer"},"ip_daily":{"type":"integer"},"mailbox_daily":{"type":"integer"},"request_bytes":{"type":"integer"},"text_characters":{"const":48000}},"required":["mailbox_daily","ip_daily","request_bytes","files","text_characters"],"type":"object"},"review_types":{"items":{"additionalProperties":false,"properties":{"additional_context_fields":{"items":{"type":"object"},"type":"array"},"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label","additional_context_fields"],"type":"object"},"type":"array"},"schema_url":{"type":"string"},"version":{"const":"v1"},"workflows":{"items":{"enum":["standard_draft","review"]},"type":"array"}},"required":["version","delivery","amendments","workflows","draft_types","review_types","limits","schema_url"],"type":"object"},"Error":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"],"type":"object"}},"required":["error"],"type":"object"},"Intake":{"additionalProperties":false,"allOf":[{"if":{"properties":{"workflow":{"const":"standard_draft"}}},"then":{"not":{"anyOf":[{"required":["url"]},{"required":["target_files"]}]},"properties":{"options":{"additionalProperties":false,"properties":{"doc_type":{"description":"An ID from public discovery.","type":"string"}},"required":["doc_type"],"type":"object"}},"required":["options"]}},{"if":{"properties":{"workflow":{"const":"review"}}},"then":{"properties":{"company_context":{"enum":["startup_growth","stable_service_provider","corporate_group"],"type":"string"},"options":{"additionalProperties":false,"properties":{"additional_context":{"additionalProperties":{"maxLength":12000,"type":"string"},"description":"Structured answers to the additional_context_fields listed for each review type in public discovery. Supply applicable required answers before submitting; review_context is the separate free-text field.","type":"object"},"leverage_rating":{"description":"Optional negotiating leverage rating. If omitted, the app's normal document and company-context defaults apply. Can be supplied independently of risk_rating.","enum":["low","medium","high"],"type":"string"},"review_context":{"description":"Optional free-text background, commercial context, priorities and specific questions to consider during the review. This is passed to the reviewing agents.","maxLength":12000,"type":"string"},"review_direction":{"enum":[null,"buying","selling"]},"risk_rating":{"description":"Optional review risk rating. If omitted, the app's normal document and company-context defaults apply.","enum":["low","medium","high"],"type":"string"}},"type":"object"}},"required":["company_context"]}}],"properties":{"company_context":{"description":"Required for reviews. startup_growth = startup/growing business; stable_service_provider = established independent business; corporate_group = corporate group.","enum":[null,"startup_growth","stable_service_provider","corporate_group"]},"company_profile":{"$ref":"#/components/schemas/Profile"},"counterparty_profile":{"$ref":"#/components/schemas/Profile"},"first_name":{"description":"Required for both drafts and reviews. The user's first name, used to personalize their email. Must not be blank.","maxLength":80,"minLength":1,"pattern":"^(?=[\\s\\S]*\\S)(?![\\s\\S]*[\\u0000-\\u001f])","type":"string"},"instructions":{"maxLength":48000,"minLength":8,"type":"string"},"options":{"type":"object"},"recipient_authority_acknowledged":{"const":true},"recipient_email":{"format":"email","maxLength":254,"type":"string"},"target_files":{"description":"Review only: zero-based indexes into ordered multipart files.","items":{"maximum":5,"minimum":0,"type":"integer"},"maxItems":2,"type":"array","uniqueItems":true},"url":{"description":"Review only: selected public HTTPS HTML terms page; counts as a target. No crawling.","format":"uri","maxLength":2048,"pattern":"^https://","type":"string"},"workflow":{"enum":["standard_draft","review"]}},"required":["workflow","recipient_email","recipient_authority_acknowledged","first_name","instructions"],"type":"object"},"Profile":{"additionalProperties":false,"properties":{"companyNumber":{"maxLength":1000,"type":"string"},"directors":{"items":{"maxLength":300,"type":"string"},"maxItems":30,"type":"array"},"entityName":{"maxLength":300,"minLength":1,"type":"string"},"entityType":{"maxLength":1000,"type":"string"},"industryClassifications":{"items":{"maxLength":1000,"type":"string"},"maxItems":100,"type":"array"},"nzbn":{"maxLength":1000,"type":"string"},"registeredOffice":{"maxLength":1000,"type":"string"},"shareholders":{"items":{"maxLength":1000,"type":"string"},"maxItems":100,"type":"array"},"websites":{"items":{"maxLength":1000,"type":"string"},"maxItems":100,"type":"array"}},"required":["entityName"],"type":["object","null"]},"Receipt":{"additionalProperties":false,"properties":{"expires_at":{"format":"date-time","type":"string"},"message":{"type":"string"},"receipt":{"type":"string"},"status_url":{"type":"string"}},"required":["receipt","status_url","expires_at","message"],"type":"object"},"Status":{"additionalProperties":false,"properties":{"delivery":{"enum":["not_scheduled","queued","preparing","sending","provider_accepted","failed","uncertain","superseded"]},"processing":{"enum":["queued","running","completed","failed","interrupted","cancelled","expired"]}},"required":["processing","delivery"],"type":"object"}}},"info":{"description":"New work only. No credentials, cookies or account lookup. Documents and questions arrive by email; reply there for amendments. Receipts convey no editing or document access authority. Rollout is gated.","title":"Piwakawaka anonymous email handoff","version":"1.0.0"},"openapi":"3.1.0","paths":{"/discovery":{"get":{"operationId":"discoverPublicCapabilities","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discovery"}}},"description":"Public website coverage and admission limits"},"503":{"$ref":"#/components/responses/Error"}}}},"/openapi.json":{"get":{"operationId":"publicSchema","responses":{"200":{"description":"This OpenAPI document"},"503":{"$ref":"#/components/responses/Error"}}}},"/receipts/{receipt}":{"get":{"operationId":"publicReceiptStatus","parameters":[{"in":"path","name":"receipt","required":true,"schema":{"maxLength":64,"minLength":40,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}},"description":"Coarse processing and provider status only. Keep this opaque receipt private."},"404":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/requests":{"post":{"description":"Accept a NEW draft or review and automatically email the result. Inline multipart uploads are consumed atomically with intake; there are no reusable public upload IDs. Omitted required sources produce a replyable clarification. No public follow-up, export, finalize or resend operation exists.","operationId":"startPublicDocumentRequest","parameters":[{"description":"Random key per new submission. Reuse identical key and input after network failure, including recipient and ordered files. Different input returns 409.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":128,"minLength":32,"pattern":"^[!-~]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Intake"}},"multipart/form-data":{"encoding":{"files":{"contentType":"application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/pdf, application/msword"}},"schema":{"additionalProperties":false,"properties":{"files":{"description":"DOCX, PDF or DOC. Repeat files parts. Default entire request limit 10 MiB.","items":{"format":"binary","type":"string"},"maxItems":6,"type":"array"},"request":{"contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/Intake"},"maxLength":131072,"type":"string"}},"required":["request"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Durable asynchronous receipt, not evidence of inbox delivery"},"400":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Limited"},"503":{"$ref":"#/components/responses/Error"}}}}},"security":[],"servers":[{"url":"/api/public/v1"}]}
