{"openapi":"3.0.3","info":{"title":"HONEWA Quality API","version":"2026-12-01.v9","description":"HONEWA Ventures quality infrastructure experiment, verified in private staging before public launch. Deterministic checks for supported PNG/JPEG, PDF and static HTTPS HTML inputs. PASS means no critical findings in executed rules; production_ready is always false because this MVP does not establish complete production readiness. Agents can request a limited free one-hour, three-attempt machine trial at POST /v1/agent/trial without login. Sign in at /access for a full account and account API keys. Free accounts share 100 completed checks per UTC calendar month across all their keys. Public URL mode requires enforced public-only egress. Isolated PDF processing and Stripe test billing passed external staging checks and remain configuration-gated. This does not establish production readiness or live billing. Read /ready for deployed modes. Agents can read their own allowance through GET /v1/usage with the same API key used for checks. No uploads, fetched content or full QA responses are retained. Application logs exclude request bodies and credentials. Content-free operational and usage metadata is retained for accounting and maintenance; hosting logs have a separate retention policy. Restricted hosting access is separate from application authentication; see x-private-hosting-boundary. Its operator credential must never be distributed to customers."},"servers":[{"url":"/","description":"This deployment; read /ready for its actual modes"}],"x-private-hosting-boundary":{"required_for_public_api":false,"operator_only":true,"header":"OAI-Sites-Authorization","description":"A restricted deployment can impose a separate hosting access boundary before requests reach this API. Only an authorized operator may use its platform service-access token with the Bearer prefix. This is not a customer credential or an alternative to application authentication. Do not distribute an owner platform token; arrange restricted staging access separately. Public API clients send their own Quality API key only."},"tags":[{"name":"Checks","description":"Bounded, deterministic asset checks."},{"name":"Usage","description":"Read-only allowance and price visibility for an authenticated API client."},{"name":"Operations","description":"Health and readiness."},{"name":"Account","description":"Self-service access through the signed-in /access page. Account mutations require the site Origin; do not supply platform identity headers yourself."},{"name":"Billing","description":"Configuration-gated Checkout and customer portal, with independently configured signed-event verification. Event processing does not enable live sales."},{"name":"Administration","description":"Owner-only key provisioning and audited consumer-remedy operations. Administrator credentials required."}],"paths":{"/v1/agent/trial":{"post":{"tags":["Account"],"operationId":"createAgentTrial","summary":"Obtain free machine access without login or payment","security":[],"description":"Send {} without Authorization, Origin or query parameters. One-hour trial, three execution attempts and 20 total check/usage requests including retries. Failed processing attempts count. Global100/day and1000/month execution ceilings; availability is not guaranteed. Cannot create accounts, payments, orders or spending budgets. Do not evade limits by repeated issuance.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"responses":{"201":{"description":"Free limited credential shown once. Use trial_api_key as Bearer at /v1/check and /v1/usage.","content":{"application/json":{"schema":{"type":"object","required":["trial_api_key","expires_at","trial"],"properties":{"trial_api_key":{"type":"string","pattern":"^hq_trial_[a-f0-9]{64}$"},"expires_at":{"type":"string","format":"date-time"},"trial":{"type":"object"}}}}}},"400":{"description":"Invalid request or supplied Authorization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Browser Origin rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Shared trial issuance limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine trials disabled or unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/mcp":{"post":{"tags":["Checks"],"operationId":"remoteMcp","summary":"Remote MCP with anonymous discovery and trial access","security":[],"description":"Streamable HTTP JSON-RPC. Accept application/json,text/event-stream. Supports2026-07-28 with per-request metadata and matching protocol/method/name headers; legacy2025-11-25,2025-06-18,2025-03-26 initialize. Tools get_service_info,get_trial_access,prepare_check,get_usage,check_asset. Checks and usage require returned trial_token argument or customer Bearer in connection Authorization. Paid keys never belong in arguments. No purchasing, account-management or budget-changing tools. No sessions or standalone SSE streams.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string"},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"JSON-RPC result. Inspect result.isError and http_status for tool failures."},"202":{"description":"Accepted legacy lifecycle notification; no body."},"400":{"description":"Invalid MCP request or metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use POST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"406":{"description":"Accept JSON and SSE.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Message exceeds2900000bytes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customer-email/events":{"post":{"tags":["Operations"],"operationId":"receiveCustomerEmailEvent","summary":"Verify signed Resend delivery events","security":[{"ResendSignature":[]}],"description":"Provider-only fixed route; no browser Origin or customer API credential. When webhook delivery mode is enabled, verifies Svix raw-body HMAC, message ID and timestamp within five minutes. Maximum256KiB. Known mail must match the immutable destination/sender/subject/tag and provider ID. Unknown mail is ignored without retaining its body; stored metadata is deduplicated and delivery state is monotonic. HTTP success acknowledges receipt, not customer reading. Private staging receives this through its existing signed Railway relay.","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"svix-signature","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"received=true; known validated metadata accepted or unknown message ignored."},"400":{"description":"Invalid signature, timestamp or payload."},"403":{"description":"Browser Origin rejected."},"503":{"description":"Delivery-event mode disabled or service unavailable."}}}},"/v1/account/contact":{"get":{"tags":["Account"],"operationId":"readDocumentContact","summary":"Read masked document-contact verification status","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"description":"Requires the Sites-authenticated account owner and matching Origin for writes. A check API key or archive session cannot authenticate this action. Available for retained records while the account is closing or closed.","responses":{"200":{"description":"Enabled, verified, masked_email, verified_at and pending. No raw address or secret is returned."}}},"post":{"tags":["Account"],"operationId":"requestDocumentContactVerification","summary":"Request a short-lived verification message","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"description":"Requires the Sites-authenticated account owner and matching Origin for writes. A check API key or archive session cannot authenticate this action. Available for retained records while the account is closing or closed. Disabled by default; requires delivery configured for the matching staging or production environment. Sends a new one-use 15-minute challenge; receiving a 202 does not prove delivery or verification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email","maxLength":254}},"required":["email"]}}}},"responses":{"202":{"description":"Verification requested; submission is accepted or unknown."},"429":{"description":"Message limit reached."},"503":{"description":"Delivery is disabled or not configured."}}}},"/v1/account/contact/verify":{"post":{"tags":["Account"],"operationId":"verifyDocumentContact","summary":"Verify a contact for the authenticated owner","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"description":"Requires the Sites-authenticated account owner and matching Origin for writes. A check API key or archive session cannot authenticate this action. Available for retained records while the account is closing or closed. Consumes the exact emailed challenge once. Replacing a verified contact revokes access through the old contact.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["token"]}}}},"responses":{"200":{"description":"Verified masked contact."},"400":{"description":"Invalid, expired or consumed challenge."}}}},"/v1/archive/request":{"post":{"tags":["Account"],"operationId":"requestDocumentRecovery","summary":"Request read-only document recovery","security":[],"description":"Independent of Sites user identity at the application layer. A restricted deployment may separately require hosting access; never use an owner platform token as a customer credential. Requires matching Origin, an account reference and a previously verified email. The same generic response is returned for matching and nonmatching details. No key, budget, billing or service access is granted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"account_id":{"type":"string","pattern":"^acct_[0-9a-f-]{36}$"},"email":{"type":"string","format":"email"}},"required":["account_id","email"]}}}},"responses":{"202":{"description":"Generic recovery request acknowledgement."},"429":{"description":"Request limit reached."},"503":{"description":"Recovery is disabled."}}}},"/v1/archive/exchange":{"post":{"tags":["Account"],"operationId":"exchangeDocumentRecovery","summary":"Consume a one-use recovery code","security":[],"description":"Explicit POST with matching Origin; email previews and GET never consume the challenge. Returns a Secure, HttpOnly, SameSite=Strict cookie scoped to /v1/archive for one hour. Never submit the token in a query string.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["token"]}}}},"responses":{"200":{"description":"Archive-read cookie set; scope archive_read, expires_in_seconds 3600."},"400":{"description":"Invalid, expired or already used token."}}}},"/v1/archive/documents":{"get":{"tags":["Account"],"operationId":"listRecoveredDocuments","summary":"List immutable documents belonging to the archive session","security":[{"ArchiveCookie":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Copy next_cursor from the previous response unchanged."}],"responses":{"200":{"description":"documents with id, kind, created_at, sha256, download_url; next_cursor or null. Twenty documents per page."},"401":{"description":"Archive session is invalid or expired."}}}},"/v1/archive/documents/{id}":{"get":{"tags":["Account"],"operationId":"downloadRecoveredDocument","summary":"Download an owned immutable document","security":[{"ArchiveCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"UTF-8 attachment with X-Receipt-SHA256."},"404":{"description":"Document does not belong to this archive session."}}}},"/v1/archive/logout":{"post":{"tags":["Account"],"operationId":"closeDocumentRecovery","summary":"Close sessions for this verified archive contact","security":[{"ArchiveCookie":[]}],"description":"Requires matching Origin. Clears the cookie and invalidates active archive sessions for the same account/contact.","responses":{"200":{"description":"Archive access closed."}}}},"/v1/account/customer-requests":{"get":{"tags":["Account"],"operationId":"listCustomerRequests","summary":"List owned support, complaint and withdrawal records","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"description":"Requires the Sites-authenticated account owner and matching Origin for writes. A check API key or archive session cannot authenticate this action. Available for retained records while the account is closing or closed.","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Copy next_cursor from the previous response unchanged."}],"responses":{"200":{"description":"records and next_cursor; twenty-five records per page."}}},"post":{"tags":["Account"],"operationId":"recordCustomerRequest","summary":"Record a request with an immutable acknowledgement","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"description":"Requires the Sites-authenticated account owner and matching Origin for writes. A check API key or archive session cannot authenticate this action. Available for retained records while the account is closing or closed. A verified contact is not a prerequisite to submit. A linked withdrawal pauses further paid checks. Receipt does not confirm provider cancellation, refund, waiver or legal resolution. Use the same idempotency key and exact body after an uncertain response.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["support","complaint","withdrawal"]},"contract_id":{"type":"string","nullable":true,"pattern":"^ctr_[0-9a-f-]{36}$"},"description":{"type":"string","minLength":1,"maxLength":2000},"requested_remedy":{"type":"string","minLength":1,"maxLength":500},"reply_contact_id":{"type":"string","nullable":true}},"required":["kind","contract_id","description","requested_remedy"]}}}},"responses":{"202":{"description":"request, acknowledgement URL/hash, document_delivery, needs_verified_contact, paid_access_paused. provider_action_performed=false."},"409":{"description":"Key reused with different content or ownership changed."}}}},"/v1/account/customer-requests/{id}":{"get":{"tags":["Account"],"operationId":"readCustomerRequest","summary":"Read an owned request and its document history","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^crq_[0-9a-f-]{36}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Copy next_cursor from the previous response unchanged."}],"responses":{"200":{"description":"Request and immutable document references, with pagination."}}}},"/v1/account/customer-requests/{id}/documents/{documentId}":{"get":{"tags":["Account"],"operationId":"downloadCustomerRequestDocument","summary":"Download an owned request acknowledgement or response","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^crq_[0-9a-f-]{36}$"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","pattern":"^cra_[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"Immutable UTF-8 attachment with X-Receipt-SHA256."}}}},"/v1/admin/customer-requests":{"get":{"tags":["Administration"],"operationId":"listDirectCustomerRequests","summary":"List the customer-request handling queue","security":[{"AdminKey":[]}],"description":"Machine administrator key required; Origin must be absent. Metadata only: no submitted description or requested remedy. A response_prepared record is not proof of delivery or legal resolution. No universal resolution deadline is inferred.","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Copy next_cursor from the previous response unchanged."}],"responses":{"200":{"description":"records (including account_id, action_required and separate disposition metadata) and next_cursor; twenty-five records per page, newest first. Original status remains unchanged by a receipt-only disposition."}}},"post":{"tags":["Administration"],"operationId":"recordDirectCustomerRequest","summary":"Record a request received by email, phone or post","security":[{"AdminKey":[]}],"description":"Machine administrator key required; Origin must be absent. The administrator explicitly verifies the account and any purchase reference; an email address never establishes account identity. received_at is the original receipt in UTC seconds, not the time of data entry, and may be at most 30 seconds in the future. A verified contact reference is optional; omitted contact never blocks intake. The request and immutable acknowledgement commit together. A qualifying explicit withdrawal pauses its owned purchase and opens the linked remedy; unknown purchase or a receipt before purchase remains actionable intake without an inferred provider action. An existing contract choice and acknowledgement are preserved; an earlier external receipt remains separately evidenced in the new request. No Stripe action occurs.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["support","complaint","withdrawal"]},"contract_id":{"type":"string","nullable":true,"pattern":"^ctr_[0-9a-f-]{36}$"},"description":{"type":"string","minLength":1,"maxLength":2000},"requested_remedy":{"type":"string","minLength":1,"maxLength":500},"reply_contact_id":{"type":"string","nullable":true,"minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9_-]+$"},"account_id":{"type":"string","pattern":"^acct_[0-9a-f-]{36}$"},"channel":{"type":"string","enum":["email","phone","post"]},"received_at":{"type":"integer","minimum":1},"assigned_to":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kind","contract_id","description","requested_remedy","account_id","channel","received_at","assigned_to"]}}}},"responses":{"202":{"description":"request, acknowledgement (id, kind, created_at, sha256, owner download URL), document_delivery=prepared|pending, needs_verified_contact, paid_access_paused, provider_action_performed=false. Prepared is not proof of email delivery."},"400":{"description":"Invalid fields, timestamp or unverified/foreign contact reference."},"404":{"description":"Account or owned purchase reference not found."},"409":{"description":"Idempotency conflict, changed ownership/contact or invalid retained evidence."}}}},"/v1/admin/customer-requests/{id}":{"get":{"tags":["Administration"],"operationId":"readDirectCustomerRequest","summary":"Read a request and paginate its immutable response history","security":[{"AdminKey":[]}],"description":"Machine administrator key required; Origin must be absent. Request includes the retained description and requested remedy; returned document URLs require their authenticated owner. Pass next_cursor unchanged to read older documents.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^crq_[0-9a-f-]{36}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Copy next_cursor from the previous response unchanged."}],"responses":{"200":{"description":"request, documents (id, kind, created_at, sha256, owner download URL), more_documents, next_cursor or null. Twenty-five documents per page."},"404":{"description":"Request not found."}}}},"/v1/admin/customer-requests/{id}/disposition":{"get":{"tags":["Administration"],"operationId":"reviewReceiptOnlyDisposition","summary":"Review the exact delivered acknowledgement proof for a receipt-only support request","security":[{"AdminKey":[]}],"description":"Machine administrator key required; Origin must be absent. Read the original request and requested remedy first. Eligible means the technical evidence is present, not that the customer wanted only a receipt. Only support with no contract, no case, open original status and no response beyond the original acknowledgement qualifies. The proof binds the original request hash, immutable acknowledgement and archive document, original verified contact, delivery job and processed signed delivery event. No message or provider action occurs.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^crq_[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"eligible, required_review, proof, proof_sha256 and any retained disposition. No customer text or email address in proof."},"409":{"description":"Immutable source evidence is invalid."}}},"post":{"tags":["Administration"],"operationId":"recordReceiptOnlyDisposition","summary":"Record an explicit receipt-only fulfilment without creating another email","security":[{"AdminKey":[]}],"description":"Machine administrator key required; Origin must be absent. receipt_only=true explicitly asserts that the administrator reviewed the original remedy and it requests receipt only. Never use for a substantive support issue, complaint, withdrawal, financial action or linked contract/case. Bind the exact proof_sha256 from GET and a stable Idempotency-Key. The immutable internal record preserves the original request status and all customer documents; no new response, delivery job or provider action is created. Operational open counts exclude only currently valid dispositions; later updates, contact revocation or delivery failure restore actionability. Individual retention review includes the disposition and its minimal exact delivery event.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^crq_[0-9a-f-]{36}$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["fulfilled_by_acknowledgement"]},"receipt_only":{"type":"boolean","enum":[true]},"proof_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["kind","receipt_only","proof_sha256"]}}}},"responses":{"200":{"description":"disposition with current validity, fulfilled_by_acknowledgement, original_request_status_unchanged=true, customer_message_created=false, provider_action_performed=false."},"400":{"description":"Missing explicit review assertion, invalid fields or retry key."},"409":{"description":"Exact evidence changed, request is ineligible or retry conflicts."}}}},"/v1/admin/customer-requests/{id}/updates":{"post":{"tags":["Administration"],"operationId":"prepareCustomerRequestResponse","summary":"Prepare an immutable request update or final response","security":[{"AdminKey":[]}],"description":"Machine administrator key required; Origin must be absent. The same idempotency key and exact body replay the original document without another update. update sets open; request_information sets awaiting_customer; final_response sets response_prepared. Preparing a final response never automatically closes a legal case or establishes email delivery. verified_settlement=true is permitted only for a final_response to a withdrawal with an existing canonical verified settlement; its immutable final settlement document is appended verbatim. Otherwise no financial conclusion is generated. This endpoint makes no provider writes and sends no email itself.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^crq_[0-9a-f-]{36}$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["update","request_information","final_response"]},"message":{"type":"string","minLength":1,"maxLength":3000},"assigned_to":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"},"verified_settlement":{"type":"boolean"}},"required":["kind","message","assigned_to","verified_settlement"]}}}},"responses":{"202":{"description":"document (id, kind, created_at, sha256, owner download URL), document_delivery=prepared|pending, provider_action_performed=false."},"400":{"description":"Invalid bounded message, fields or settlement flag."},"404":{"description":"Request not found."},"409":{"description":"Idempotency conflict or verified settlement unavailable."}}}},"/v1/admin/retention/reviews":{"get":{"tags":["Administration"],"operationId":"listRetentionReviews","security":[{"AdminKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Copy next_cursor from the previous response unchanged."}],"summary":"Read the bounded document retention review queue","description":"Machine-only. Returns up to 25 pseudonymous review items with deadlines and evidence digests, using the returned cursor unchanged. Explicit policy configuration schedules reviews; age never authorizes deletion. Active-account old-contract records require their own scoped review. No contact addresses, document text or provider secrets are returned.","responses":{"200":{"description":"Policy status, review items and next_cursor."},"400":{"description":"Invalid cursor."}}}},"/v1/admin/retention/staging-fixture":{"post":{"tags":["Administration"],"operationId":"createRetentionStagingFixture","security":[{"AdminKey":[]}],"summary":"Create the single fixed synthetic staging erasure fixture","description":"Disabled by default. Requires the exact source-pinned fixture and approval digests, a short unexpired window, staging/test configuration and closed live sales. Accepts only an empty object. Atomically creates one internal closed synthetic account, a revoked key and clearly labelled non-personal records. Returns no usable credential and performs no provider calls. Existing changed records or a completed closure cannot be overwritten or recreated. Production always refuses this route.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Fixed fixture descriptor, digests and created/reused outcome."},"409":{"description":"Fixture changed or was already erased."},"503":{"description":"Synthetic staging fixture capability disabled."}}}},"/v1/admin/accounts/{id}/retention-plan":{"post":{"tags":["Administration"],"operationId":"prepareRetentionErasure","summary":"Review a bounded closed-account erasure scope without deleting data","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^acct_[0-9a-f-]{36}$"}}],"description":"Machine-only, no Origin or query string. Uses canonical provider GETs and a local record snapshot; returns only table counts/digests and blockers, never record contents. Technical eligibility is not a legal retention decision. No automatic three-year policy is inferred. Does not delete local or provider copies.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Exact manifest, manifest_sha256, blockers, technical eligibility and individual_review_required=true."},"409":{"description":"History is incomplete, unsettled or outside the bounded review scope."}}}},"/v1/admin/accounts/{id}/retention-authorize":{"post":{"tags":["Administration"],"operationId":"authorizeRetentionErasure","summary":"Bind a separate individual retention review to one exact manifest","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^acct_[0-9a-f-]{36}$"}}],"description":"Default disabled. Requires the environment-specific reviewed execution mode and exact approval-receipt, account and record-manifest pins. The separately performed individual review must cover legal holds, actual accounting/tax categories and provider follow-up. Digests identify that review; they are not a legal determination by the application. Reusing approval for another account, changed scope or later decision is rejected. Authority expires within one hour. No deletion occurs during authorization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"manifest_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"approval_receipt_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"review_evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"provider_evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"individual_retention_review":{"type":"boolean","enum":[true]},"accounting_tax_review":{"type":"boolean","enum":[true]},"no_holds":{"type":"boolean","enum":[true]},"provider_followup_acknowledged":{"type":"boolean","enum":[true]},"expires_at":{"type":"integer","minimum":1}},"required":["manifest_sha256","approval_receipt_sha256","review_evidence_sha256","provider_evidence_sha256","individual_retention_review","accounting_tax_review","no_holds","provider_followup_acknowledged","expires_at"]}}}},"responses":{"200":{"description":"One account-bound erasure authority; local_records_erased=false."},"409":{"description":"Manifest changed, approval already bound or unresolved evidence."},"503":{"description":"Reviewed erasure execution is disabled."}}}},"/v1/admin/retention/{id}/execute":{"post":{"tags":["Administration"],"operationId":"executeRetentionErasure","summary":"Execute only the exact independently reviewed local erasure","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^erase_[0-9a-f-]{36}$"}}],"description":"Machine-only, Origin and query string absent. Default disabled. Fresh provider reads, owned account lease, exact current row bytes and holds must match the short-lived authority. Conditional claim, dependent-record deletion and completion are one atomic transaction. An expired/changed approval never creates a new authority. Repeated completed execution returns the same receipt. No Stripe or email-provider data is deleted. Minimal pseudonymous closure evidence and encrypted provider follow-up remain separately disclosed; local success is not global erasure.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Durable local result and separate provider-follow-up status."},"409":{"description":"Changed manifest, expired authority or unresolved obligations; no broad deletion."},"503":{"description":"Reviewed erasure execution disabled."}}}},"/v1/admin/accounts/{id}/retention-hold":{"post":{"tags":["Administration"],"operationId":"recordRetentionHold","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^acct_[0-9a-f-]{36}$"}}],"summary":"Record a scoped hold with a specific review deadline","description":"Machine-only. Does not expire or erase automatically; review date is at most 366 days ahead. Overdue holds alert operations and continue blocking erasure.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"scope":{"type":"string","enum":["accounting_tax","service_contracts","customer_requests","all"]},"reason_code":{"type":"string","pattern":"^[a-z_]{3,64}$"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"review_due_at":{"type":"integer"}},"required":["scope","reason_code","evidence_sha256","review_due_at"]}}}},"responses":{"200":{"description":"Active hold and review date."}}}},"/v1/admin/retention-holds/{id}/release":{"post":{"tags":["Administration"],"operationId":"releaseRetentionHold","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^hold_[0-9a-f-]{36}$"}}],"summary":"Record reviewed release of one legal hold","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["evidence_sha256"]}}}},"responses":{"200":{"description":"Released hold. No erasure is authorized by release alone."}}}},"/v1/admin/retention/{id}/provider-followup":{"get":{"tags":["Administration"],"operationId":"readRetentionProviderFollowup","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^erase_[0-9a-f-]{36}$"}}],"summary":"Read the private provider follow-up for a completed local erasure","description":"Machine-only, no Origin or query string. Private no-store response contains the minimal provider references and decrypted contact addresses required for an individually reviewed follow-up. Never log its body. Does not execute provider deletion; unavailable after local handoff cleanup.","responses":{"200":{"description":"Private provider scope, documented outcomes and outstanding operator action."}}}},"/v1/admin/retention/{id}/provider-disposition":{"post":{"tags":["Administration"],"operationId":"recordRetentionProviderDisposition","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^erase_[0-9a-f-]{36}$"}}],"summary":"Record an evidence-backed provider disposition","description":"An operator attestation, not an application-verified provider deletion. Each required provider must have its own documented outcome before local handoff cleanup.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"provider":{"type":"string","enum":["stripe","resend"]},"disposition":{"type":"string","enum":["erased","retained_provider_legal_basis"]},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["provider","disposition","evidence_sha256"]}}}},"responses":{"200":{"description":"Documented provider status, separate from local erasure."}}}},"/v1/admin/retention/{id}/purge-followup":{"post":{"tags":["Administration"],"operationId":"purgeRetentionProviderFollowup","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^erase_[0-9a-f-]{36}$"}}],"summary":"Clear only the completed reviewed local provider handoff","description":"Default disabled and bound to the original individual approval receipt, account and manifest. Requires documented dispositions for all required providers. Clears the encrypted handoff; retains only the explicitly disclosed minimal pseudonymous completion evidence. Does not delete provider copies.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"review_evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["review_evidence_sha256"]}}}},"responses":{"200":{"description":"Receipt distinguishing service records, handoff cleanup and retained evidence."},"503":{"description":"Reviewed erasure execution disabled."}}}},"/v1/admin/contracts/{id}/waiver-plan":{"post":{"tags":["Administration"],"operationId":"prepareConsumerInvoiceWaiver","summary":"Prepare a canonical invoice-linked waiver plan","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ctr_[0-9a-f-]{36}$"}}],"description":"Machine-only; Origin must be absent. Disabled by default. Requires a separately enabled matching test or production action mode; production requires the exact retained source-approved public offer. Supports one wholly unpaid first-period EUR metered invoice, or its complete unconsumed invoice_too_small debit. Ordinary cancellation requires total below EUR0.50; exact EUR0.50 is excluded. Withdrawal uses the approved full-refund/unpaid-waiver policy. Missing, mixed or changed evidence requires review. Persists an immutable operation and stable provider idempotency key; no credit is issued by planning.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"purpose":{"type":"string","enum":["withdrawal","cancellation"]}},"required":["purpose"]}}}},"responses":{"200":{"description":"Immutable operation_id, canonical scope summary and verified=false."},"409":{"description":"Evidence, ownership, threshold or policy requires review."},"503":{"description":"Waiver execution is disabled or its retained offer is unapproved."}}}},"/v1/admin/waivers/{id}/execute":{"post":{"tags":["Administration"],"operationId":"executeConsumerInvoiceWaiver","summary":"Execute or verify the saved invoice-specific waiver","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^waiverop_[0-9a-f-]{36}$"}}],"description":"Machine-only, Origin absent. Caller cannot supply amounts or provider identifiers. Fresh evidence and preview precede a line-specific Stripe credit note; no generic customer-balance adjustment is used. Retries preserve the exact request and key for less than 23 hours; uncertain older outcomes require review. Only verified=true establishes canonical settlement. The bounded maintenance worker may plan/execute eligible waivers when the separately reviewed environment and action mode are explicitly enabled. New-sales admission does not authorize or disable an existing-customer remedy.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Operation status and independently verified outcome; HTTP success alone is not proof of settlement."},"409":{"description":"Canonical evidence changed or requires review."},"503":{"description":"Execution disabled, offer unapproved or provider unavailable."}}}},"/v1/account/contracts/{id}/start":{"post":{"tags":["Account"],"operationId":"requestConsumerServiceStart","summary":"Expressly request paid service to start for this purchase","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ctr_[0-9a-f-]{36}$"}}],"description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Applies only to a concluded consumer purchase whose stored offer has service_start_policy=explicit_request and whose separate Checkout early_start_requested choice was false. Download and acknowledge the original purchase confirmation first, then submit a separate express start request. The /access checkbox is optional and unchecked. The account must remain active and the purchase must remain current, unpaused and not withdrawn. This request does not waive withdrawal rights, create a Stripe payment or bypass billing, subscription, receipt or spending-budget gates. No calendar deadline automatically activates this version. Successful retries return the same immutable request and start timestamp. Historical v1 purchases keep their stored policy; business purchases and an already recorded Checkout start choice do not use this endpoint.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumerServiceStartRequest"}}}},"responses":{"200":{"description":"The separate start request is recorded; its personally addressed confirmation is downloadable. This is not proof of payment or a withdrawal waiver.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumerServiceStartResult"}}}},"400":{"description":"Use the exact current request version, original purchase confirmation hash and start_requested=true; no additional fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The signed-in account does not own this purchase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body was not received within 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Purchase or receipt is not confirmed, the account is closed, the purchase is paused/replaced/withdrawn, or this offer does not require a later start request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Account request body exceeds 1 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/contracts/{id}/start-confirmation":{"get":{"tags":["Account"],"operationId":"downloadConsumerServiceStartConfirmation","summary":"Download the immutable separate start-request confirmation","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ctr_[0-9a-f-]{36}$"}}],"description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. The signed-in owner can retrieve an existing personal start record even while the account is closing or closed. It preserves the original purchase confirmation and binds its hash, request version and request timestamp. Downloading does not create a new request, charge a payment or waive withdrawal rights.","responses":{"200":{"description":"Immutable UTF-8 start-request confirmation with its exact-byte digest.","headers":{"X-Receipt-SHA256":{"description":"SHA-256 of the exact UTF-8 response bytes.","schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"Cache-Control":{"schema":{"type":"string","enum":["no-store"]}},"Content-Disposition":{"description":"Attachment with a server-selected .txt filename.","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The signed-in account does not own this purchase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No verified start-request confirmation is available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/contracts/{id}/resolution":{"get":{"tags":["Account"],"operationId":"downloadConsumerRemedyResolution","summary":"Download the verified final resolution of a withdrawal","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^ctr_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Owner access remains available while the account is closing or closed. This read requires a resolved, concluded and paused purchase plus hash-verified resolution and reconciliation audit records, and the verified settlement decision where applicable. It describes the canonical provider evidence at the stated observation time; downloading does not call Stripe, issue a refund, restore paid access or prove email delivery or immediate bank credit. The personally addressed text reports a confirmed canceled subscription, paid/refunded/retained/waived amounts and zero remaining verified settlement liability. Test records are explicitly labeled. The original withdrawal acknowledgement remains unchanged. Missing or inconsistent evidence, a reopened case or a later reconciliation that invalidates the referenced success returns 409 instead of a stale success document. The exact bytes remain stable for the same underlying audit records; a later verified resolution may produce a new record.","responses":{"200":{"description":"Audit-backed UTF-8 final resolution attachment with its exact-byte digest. This is not an invoice.","headers":{"X-Receipt-SHA256":{"description":"SHA-256 of the exact UTF-8 response bytes.","schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"Cache-Control":{"schema":{"type":"string","enum":["no-store"]}},"Content-Disposition":{"description":"Attachment with a server-selected .txt filename.","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The signed-in account does not own this purchase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"consumer_resolution_pending: a verified current final resolution is not available for this purchase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/billing/settlement-readiness":{"get":{"tags":["Administration"],"operationId":"readSettlementProviderReadiness","summary":"Check the deployed Stripe key can read settlement resources","security":[{"AdminKey":[]}],"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Requires GET with no query or Origin. Uses four fixed bounded provider GETs with the deployed key, even while sales and billing writes are disabled. Reports resource-level read access only. It never creates financial objects, returns customer/provider payloads or proves write permissions or a live financial outcome.","responses":{"200":{"description":"Mode, four boolean resource checks, read_access_verified, write_access_verified=false and financial_operations_performed=0."},"400":{"description":"Invalid case identifier, cursor or exact request fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case, provider mode, account lock, approved policy or evidence requires reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/consumer-cases":{"get":{"tags":["Administration"],"operationId":"listConsumerRemedyQueue","summary":"Read the operator queue of unresolved consumer cases","security":[{"AdminKey":[]}],"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Returns at most 25 cases with status requested, open, review, pending, requires_action, failed or canceled, sorted newest first by created_at and id. Pass the returned next_cursor unchanged for the next page. Only the optional cursor query parameter is accepted; repeated cursor parameters are rejected. This read does not reconcile Stripe or execute a remedy. The queue can include several billing modes; reconciliation requires the deployment event mode to match the selected case.","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque next_cursor from the previous page. Omit for the newest page.","schema":{"type":"string","pattern":"^[0-9]{1,12}\\.[A-Za-z0-9_-]{1,220}$"}}],"responses":{"200":{"description":"Current queue page; next_cursor=null means no further matching page at this time.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["records","next_cursor","request_id"],"properties":{"records":{"type":"array","maxItems":25,"items":{"$ref":"#/components/schemas/ConsumerRemedyQueueRecord"}},"next_cursor":{"type":"string","nullable":true},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid case identifier, cursor or exact request fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case, provider mode, account lock, approved policy or evidence requires reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/consumer-cases/{id}/reconcile":{"post":{"tags":["Administration"],"operationId":"reconcileConsumerRemedy","summary":"Re-read canonical provider evidence and record the remedy outcome","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,220}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Send {}. Uses bounded Stripe GET requests only, independently of sales enablement, and records immutable local reconciliation evidence. It may mark a withdrawal resolved only when current provider and local evidence establish settlement. It never issues a refund, cancels a subscription, changes provider balances, deletes historical usage or restores paused access. HTTP 200 can contain complete=false or resolution=unresolved: inspect blockers and next_action. complete describes evidence completeness, not successful refund or case closure. Keep the returned server-issued evidence_sha256 for a later decision; it identifies the immutable reconciliation record and must not be recomputed from the response envelope. A due_at is an operational handling target, not a determination of every statutory deadline.","responses":{"200":{"description":"Audited reconciliation report. Success of the HTTP request does not by itself establish settlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumerRemedyReport"}}}},"400":{"description":"Send exactly an empty JSON object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case, provider mode, account lock, approved policy or evidence requires reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 4 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/consumer-cases/{id}/decision":{"post":{"tags":["Administration"],"operationId":"recordConsumerRemedyDecision","summary":"Record an approved settlement decision against fresh evidence","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,220}$"}}],"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Records an append-only operator decision; performs no Stripe action and does not assert that the requested refund or cancellation occurred. The deployment must have an explicitly configured reviewed policy version and decision mode. Only an owned, concluded and paused withdrawal in requested/review state accepts a decision. evidence_sha256 must match the latest reconciliation record for this case and mode, at most 15 minutes old; local usage and purchase identity must still match that record. Amounts, currency and units must reconcile with complete evidence. The original operational handling target may be shortened but never postponed. For full_refund_and_waive_unpaid, retained_paid_cents and settled_usage_units must be zero. For policy 2026-11-18.remedies.v1, a consumer purchase and one unambiguous affected billing period with complete retained usage are additionally required; missing, mixed or pruned allocation and customer-level balances return remedy_period_review_required instead of refunding historical charges by assumption. The administrator still determines whether withdrawal is eligible. Identical decisions against the same fresh evidence reuse the original audit record, including after a later decision, and never reinstate a superseded decision. After a 409 remedy_evidence_stale, remedy_decision_mismatch or remedy_period_review_required, reconcile again and review the new evidence rather than blindly retrying the old decision. Subsequent provider action and a fresh reconciliation are still required to establish resolution.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumerRemedyDecision"}}}},"responses":{"200":{"description":"The decision is recorded. No provider action was performed and the case status is not automatically resolved.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["recorded","provider_action_performed","case_status","audit_id","evidence_sha256","request_id"],"properties":{"recorded":{"type":"boolean","enum":[true]},"provider_action_performed":{"type":"boolean","enum":[false]},"case_status":{"type":"string"},"audit_id":{"type":"string"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid policy fields, amounts or deadline; the request cannot extend the original handling target.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Policy inactive, case changed, billing mode mismatch, account lock busy, stale evidence (remedy_evidence_stale), or decision mismatch (remedy_decision_mismatch). Reconcile and review before submitting again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 4 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/consumer-cases/{id}/execute-refund":{"post":{"tags":["Administration"],"operationId":"executeConsumerRefund","summary":"Execute a reviewed refund in the explicitly enabled payment environment","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,220}$"}}],"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Disabled by default. Requires a separately enabled action mode, matching environment/key/billing/event modes and reviewed policy 2026-11-18.remedies.v1. Production additionally requires the exact retained, source-approved public consumer offer. Pending, private-pilot and mismatched offers are rejected; no flag can approve them. The latest immutable eligibility decision must identify this exact case. Reconciles current provider evidence first; supports only an already-canceled consumer purchase, one fully paid EUR invoice in one unambiguous affected period, and one exclusively allocated charge with no pending or failed refunds, debt, credits, pending invoice items or unsettled usage. It never cancels a subscription, writes off debt, corrects invoices, changes customer balances, deletes usage or restores access. Derives the remaining refund from canonical invoice/payment/charge evidence; caller amounts and payment identifiers are forbidden. Persists one immutable operation and provider idempotency key per case before the first POST. An uncertain retry uses the identical key and amount for less than 23 hours from its first attempt; older uncertain operations require review, never a fresh key. A changed decision or allocation also requires review. HTTP 200 does not establish completion: cash_refund_verified=true confirms cash refund readback. verified=true requires the complete case, including its exact refund-linked credit note and zero balances. provider_action_performed means a provider POST was attempted, including uncertain transport outcomes; it does not prove money moved. Bounded maintenance can resume only an already-approved exact decision when its action mode is enabled; it never infers withdrawal eligibility.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["decision_id"],"properties":{"decision_id":{"type":"string","pattern":"^remedy_[0-9a-f-]{36}$","description":"Latest server-issued approved decision audit_id."}}}}}},"responses":{"200":{"description":"Cash refund operation status; inspect verified and case_resolution separately.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["operation_id","operation_status","provider_action_performed","case_resolution","verified","requires_reconciliation","request_id"],"properties":{"operation_id":{"type":"string","nullable":true},"operation_status":{"type":"string","enum":["verified","awaiting_reconciliation","prepared","uncertain","submitted","review"]},"provider_action_performed":{"type":"boolean"},"cash_refund_verified":{"type":"boolean"},"invoice_correction_verified":{"type":"boolean"},"case_resolution":{"type":"string","enum":["unresolved","resolved_refunded"]},"verified":{"type":"boolean"},"requires_reconciliation":{"type":"boolean"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid case identifier, cursor or exact request fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case, provider mode, account lock, approved policy or evidence requires reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body exceeds 4 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/consumer-cases/{id}/execute-credit-note":{"post":{"tags":["Administration"],"operationId":"executeConsumerCreditNote","summary":"Correct the exact refunded invoice without issuing another refund","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,220}$"}}],"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Default disabled. Requires the separate mode-bound credit-note switch and the latest approved decision. The server derives one owned paid EUR invoice, its exact line and an already-succeeded full refund in the affected period. A canonical preview and durable immutable intent precede one provider POST. It links the existing refund with refunds[0][type]=refund and amount_refunded; it never requests refund_amount, out-of-band credit or customer credit. An uncertain dispatch is reconciled through GET requests only, never resubmitted with a replacement key. Unknown, partial, mixed-period and changed evidence requires review. Cash refund alone cannot resolve the case. Public sales admission is independent of existing-customer remedies.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["decision_id"],"properties":{"decision_id":{"type":"string","pattern":"^remedy_[0-9a-f-]{36}$"}}}}}},"responses":{"200":{"description":"Durable correction operation and canonical verification status; HTTP success alone does not establish settlement."},"400":{"description":"Invalid case identifier, cursor or exact request fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case, provider mode, account lock, approved policy or evidence requires reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/consumer-cases/{id}/reconcile-credit-note":{"post":{"tags":["Administration"],"operationId":"reconcileConsumerCreditNote","summary":"Verify invoice correction using provider reads only","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,220}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"description":"Machine-only operator endpoint. Requires the separate administrator Bearer credential. Restricted hosting access is a separate operator-only boundary. Omit Origin entirely: requests containing it are rejected, including GET requests. A customer check API key cannot authorize this action. Uses the shared administrator rate limits. Send {}. Performs bounded canonical reads and appends local evidence. It never creates a credit note or refund. Requires matching mode and owned retained contract even with execution disabled.","responses":{"200":{"description":"Canonical correction status; inspect verified and blockers."},"400":{"description":"Invalid case identifier, cursor or exact request fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin must be absent; this endpoint accepts machine requests only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such remedy case.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use the documented method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case, provider mode, account lock, approved policy or evidence requires reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator request limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider configuration, canonical evidence or durable storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/contracts/{id}/confirmation":{"get":{"tags":["Account"],"operationId":"downloadPurchaseConfirmation","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"summary":"Download the signed-in account’s immutable purchase confirmation","description":"Private test purchase record, available after verified Checkout completion. A download does not acknowledge receipt or waive withdrawal rights.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Personally addressed, immutable UTF-8 confirmation, with X-Receipt-SHA256 for acknowledgement.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"Confirmation not yet verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/contracts/{id}/withdrawal-confirmation":{"get":{"tags":["Account"],"operationId":"downloadWithdrawalConfirmation","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"summary":"Download an immutable acknowledgement of a recorded withdrawal","description":"Available to the signed-in owner, including while the account is closing. Identifies the request and timestamp; does not claim a Stripe refund or cancellation was executed.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Immutable UTF-8 withdrawal acknowledgement.","content":{"text/plain":{"schema":{"type":"string"}}}},"409":{"description":"No recorded withdrawal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/contracts/{id}/receipt":{"post":{"tags":["Account"],"operationId":"acknowledgePurchaseConfirmation","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"summary":"Acknowledge the exact downloaded confirmation","description":"Requires signed-in ownership, same-site Origin, a preceding download and the exact hash. Separate from terms acceptance and withdrawal.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["receipt_sha256","received"],"properties":{"receipt_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"received":{"type":"boolean","enum":[true]}}}}}},"responses":{"200":{"description":"Receipt acknowledged."},"409":{"description":"Download or exact confirmation missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/contracts/{id}/withdrawal":{"post":{"tags":["Account"],"operationId":"requestWithdrawal","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"summary":"Record withdrawal and pause further paid checks","description":"Requires signed-in ownership and same-site Origin. No paid invoice, reason or receipt acknowledgement is required. The legacy withdrawal_requested-only body remains valid. The extended body contains all three contact fields: customer_name, reply_contact_id and reply_email; only one contact may be non-null. The customer may confirm the account-owned verified contact or give an alternative email. Missing/revoked verification does not discard withdrawal: an actionable follow-up is recorded. An alternative address never grants archive or account access and is not automatically treated as verified. The immutable acknowledgement records the original request, name, contact and date/time. Records and pauses the request; does not itself cancel Stripe billing or execute a refund. Direct support remains available.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["withdrawal_requested"],"properties":{"withdrawal_requested":{"type":"boolean","enum":[true]},"customer_name":{"type":"string","maxLength":160},"reply_contact_id":{"type":"string","nullable":true},"reply_email":{"type":"string","format":"email","maxLength":254,"nullable":true}}}}}},"responses":{"200":{"description":"Request recorded; paid access paused. Contact follow-up may still be needed."}}}},"/v1/usage":{"get":{"tags":["Usage"],"operationId":"getUsage","summary":"Read the allowance and price associated with this API key","description":"Uses the same Bearer API key as POST /v1/check, without browser sign-in. Returns only the authenticated key's account allowance, current plan, per-completed-check price, key expiry and limits. Does not issue keys, change billing, reserve a check, or create a billable event. It consumes the shared 60-per-minute and 2,000-per-UTC-day request limits per key and, for linked keys, per account. completed_and_reserved includes completed checks plus in-flight quota reservations; it is not an invoice total. The allowance resets at the start of the next UTC calendar month. Paid plans charge EUR 0.01 for every completed PASS or FAIL, exclusive of applicable VAT, billed monthly; the free 100-check allowance does not discount a paid plan. metered_test uses test billing only. Stale subscription state is reconciled with the billing provider; failures do not silently report a stale paid account as free. Legacy administrator-issued keys return plan unlinked, usage null, pricing null and budget null because they have no account allowance. Account/customer identifiers, subscription details and other keys are never returned. This snapshot does not reserve future capacity or authorize a payment. Budgets are EUR cents before VAT per UTC calendar month, shared across keys at account level and optionally restricted further per key. Default account budget is 0, which pauses paid checks without affecting free-plan checks. The cap includes completed and in-flight reserved paid checks. Reducing a cap does not cancel already reserved work. Saving a cap does not create a subscription or authorize a separate payment. API-key agents can read but cannot change these caps.","security":[{"ApiKey":[]}],"responses":{"200":{"description":"A read-only usage snapshot; no completed check or billable event is recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSnapshot"}}}},"401":{"description":"API key is missing, invalid, expired, revoked or no longer linked to an available account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use GET.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Allow":{"schema":{"type":"string","enum":["GET"]}}}},"409":{"description":"Account is closing, billing is being reconciled, or its billing mode requires review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Shared per-key or per-account request limit exceeded, or billing provider is rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Present for application request rate limits, in seconds.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Usage or billing entitlement could not be read reliably.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/check":{"post":{"tags":["Checks"],"operationId":"checkAsset","summary":"Check one image, PDF or static web page","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":" Trial and paid checks require Idempotency-Key; it is optional for legacy/free calls but recommended for every check. Format: hq1_<10-digit Unix seconds>_<lowercase UUIDv4>. A key is valid for 24 hours from its timestamp, with at most 60 seconds of future clock skew. Reuse the exact same request key, API key and input after an uncertain network result; never generate a replacement automatically or rotate the API key to retry. Scope is one API key. A completed duplicate returns HTTP 409 check_already_completed with a minimal receipt and zero new usage, not the original QA report. Pending/unresolved, previously failed and conflicting input return 409 check_in_progress, check_previously_failed and idempotency_conflict respectively. Expired keys return 410 idempotency_expired even after cleanup. No full QA result is retained or replayed. A new request key deliberately starts new work and may incur another charge.","schema":{"type":"string","minLength":51,"maxLength":51,"pattern":"^hq1_[0-9]{10}_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"description":"60 requests per minute and 2,000 per UTC day per API key. Authenticated attempts consume these rate limits even if input validation fails. Self-service free accounts additionally share 100 completed checks per UTC calendar month; issuing or rotating keys does not reset account usage. Files: at most 2 MiB; images: at most 4 million pixels; PDFs: at most 50 pages. PNG support is non-interlaced 8-bit, without APNG or compressed/international metadata chunks (acTL, fcTL, fdAT, iCCP, zTXt, iTXt). JPEGs are decoded within a memory limit. In public URL mode, arbitrary public HTTPS DNS hostnames are accepted through enforced public-only egress, with up to three individually revalidated redirects. IP literals, internal hostnames, credentials, custom ports, fragments and HTTP downgrades are rejected. Operator allowlist mode remains available and disallows redirects. UTF-8 static HTML only, at most 1 MiB decoded, with a total 8-second fetch-and-read deadline. No JavaScript execution, subresource fetches or browser rendering. The PDF print profile requires explicit TrimBox and BleedBox, proper box containment, and at least 3 mm geometric bleed on every side; it does not verify artwork extends into bleed. Isolated PDF mode requires a configured external parser; inline parsing is development-only and is not a public-service isolation guarantee. Request body maximum is 2,900,000 bytes. Each completed API check consumes one account usage unit, whether PASS or FAIL; input, authentication and server errors do not. Stripe metering applies only to an account with a verified active subscription in the configured mode; staging uses test mode only. Budgets are EUR cents before VAT per UTC calendar month, shared across keys at account level and optionally restricted further per key. Default account budget is 0, which pauses paid checks without affecting free-plan checks. The cap includes completed and in-flight reserved paid checks. Reducing a cap does not cancel already reserved work. Saving a cap does not create a subscription or authorize a separate payment. API-key agents can read but cannot change these caps. Trial and paid checks require Idempotency-Key; it is optional for legacy/free calls but recommended for every check. Format: hq1_<10-digit Unix seconds>_<lowercase UUIDv4>. A key is valid for 24 hours from its timestamp, with at most 60 seconds of future clock skew. Reuse the exact same request key, API key and input after an uncertain network result; never generate a replacement automatically or rotate the API key to retry. Scope is one API key. A completed duplicate returns HTTP 409 check_already_completed with a minimal receipt and zero new usage, not the original QA report. Pending/unresolved, previously failed and conflicting input return 409 check_in_progress, check_previously_failed and idempotency_conflict respectively. Expired keys return 410 idempotency_expired even after cleanup. No full QA result is retained or replayed. A new request key deliberately starts new work and may incur another charge.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckInput"},"examples":{"url":{"summary":"Static HTML","value":{"type":"url","url":"https://example.com","profile":"baseline"}}}}}},"responses":{"200":{"description":"A completed check. PASS or FAIL is in the response, not the HTTP status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResult"}}}},"400":{"description":"Invalid input/profile, malformed or future-dated Idempotency-Key, or idempotency_key_required for paid work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked API key. Platform access can reject the request before it reaches this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"budget_exceeded: account or key monthly spending budget exhausted, including reserved work. Ask the owner to review the cap; do not automatically retry or raise it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"In allowlist mode, the URL hostname is not enabled; or linked_account_required because legacy unlinked keys cannot perform paid work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"HTTP method is not POST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body read timeout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"check_already_completed (with minimal receipt), check_in_progress, check_previously_failed, idempotency_conflict, or account/billing state conflict. No duplicate check is started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"idempotency_expired: the request key is older than 24 hours and cannot execute again, including after server cleanup. Do not automatically replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request, asset, page count, image pixel count or fetched HTML exceeds the supported limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Content type or asset format is unsupported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Remote fetch failed, exceeded the total 8-second deadline, returned empty/invalid HTML, or exceeded the redirect policy. Redirects are disabled in allowlist mode. An isolated PDF parser may also reject unsupported input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-key rate/daily limit or account monthly allowance exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Present for per-key rate limits: seconds until that quota window resets. Monthly account usage resets at the start of the next UTC calendar month.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"Required configuration, database or service is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"tags":["Operations"],"operationId":"getHealth","summary":"Check service liveness","security":[],"responses":{"200":{"description":"The handler is responding. Does not imply database readiness.","content":{"application/json":{"schema":{"type":"object","required":["status","service","environment","version"],"properties":{"status":{"type":"string","enum":["ok"]},"service":{"type":"string","enum":["honewa-quality"]},"environment":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/ready":{"get":{"tags":["Operations"],"operationId":"getReadiness","summary":"Check service configuration and database readiness","security":[],"responses":{"200":{"description":"Runtime configuration and database access are ready. This is not an end-to-end external parser or Stripe payment test.","content":{"application/json":{"schema":{"type":"object","required":["status","billing","strict_public_egress","pdf_mode","url_mode"],"properties":{"status":{"type":"string","enum":["ready"]},"billing":{"type":"string","enum":["disabled","stripe_test","stripe_live"]},"strict_public_egress":{"type":"boolean"},"pdf_mode":{"type":"string","enum":["inline_development","isolated"]},"url_mode":{"type":"string","enum":["allowlist","public"]}}}}}},"503":{"description":"Missing configuration, unsafe public URL transport or unavailable database.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account":{"get":{"tags":["Account"],"operationId":"getAccount","summary":"Read your account, active key metadata and monthly usage","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Creates an account for a signed-in user on first access. Raw API keys are never returned by this endpoint.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"responses":{"200":{"description":"Account state. Free allowance is shared by every key and resets at the start of the next UTC calendar month.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/budget":{"put":{"tags":["Account"],"operationId":"setAccountBudget","summary":"Set the shared monthly paid spending cap","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Budgets are EUR cents before VAT per UTC calendar month, shared across keys at account level and optionally restricted further per key. Default account budget is 0, which pauses paid checks without affecting free-plan checks. The cap includes completed and in-flight reserved paid checks. Reducing a cap does not cancel already reserved work. Saving a cap does not create a subscription or authorize a separate payment. API-key agents can read but cannot change these caps.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["monthly_budget_cents"],"properties":{"monthly_budget_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000."}}}}}},"responses":{"200":{"description":"Saved budget and current spending snapshot. No subscription is created or payment initiated.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["budget","request_id"],"properties":{"budget":{"$ref":"#/components/schemas/BudgetSnapshot"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Send only monthly_budget_cents as an integer from 0 through 100000. Null is not allowed for the account budget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body was not received within 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Account is closing; no budget change was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Account request body exceeds 1 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/keys/{id}/budget":{"put":{"tags":["Account"],"operationId":"setKeyBudget","summary":"Set or inherit one key's monthly paid spending cap","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Budgets are EUR cents before VAT per UTC calendar month, shared across keys at account level and optionally restricted further per key. Default account budget is 0, which pauses paid checks without affecting free-plan checks. The cap includes completed and in-flight reserved paid checks. Reducing a cap does not cancel already reserved work. Saving a cap does not create a subscription or authorize a separate payment. API-key agents can read but cannot change these caps. The key must be active, unexpired and owned by the signed-in account. Null removes the extra key cap and inherits the account limit; 0 pauses paid checks for this key. Raising a key cap cannot bypass the shared cap.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[0-9a-f-]{36}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["monthly_budget_cents"],"properties":{"monthly_budget_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000. Null inherits the account cap; the effective key cap never exceeds the account cap.","nullable":true}}}}}},"responses":{"200":{"description":"Saved budget and current spending snapshot. No subscription is created or payment initiated.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["budget","request_id"],"properties":{"budget":{"$ref":"#/components/schemas/BudgetSnapshot"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Send only monthly_budget_cents as an integer from 0 through 100000, or null to inherit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The selected active key is not owned by this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body was not received within 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Account is closing; no budget change was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Account request body exceeds 1 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/keys":{"post":{"tags":["Account"],"operationId":"createAccountApiKey","summary":"Issue your own API key, valid for 90 days","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Up to three active, unexpired keys per account. The secret is returned once; only its SHA-256 hash is stored. Creating or rotating a key does not reset monthly account usage.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"responses":{"201":{"description":"Store the secret securely; it cannot be retrieved again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedAccountKey"}}}},"400":{"description":"Send an empty JSON object. Customer, price and subscription identifiers are server-controlled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body was not received within 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Three active keys already exist. Revoke one before issuing another.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Account request body exceeds 1 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/keys/{id}":{"delete":{"tags":["Account"],"operationId":"revokeAccountApiKey","summary":"Revoke one of your own API keys","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Revocation is scoped to the signed-in account. Does not reset usage. No request body is required.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"The key was revoked.","content":{"application/json":{"schema":{"type":"object","required":["revoked","request_id"],"properties":{"revoked":{"type":"boolean","enum":[true]},"request_id":{"type":"string","format":"uuid"}}}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"This account does not own an active key with that ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"operationId":"createBillingCheckout","summary":"Open a server-configured Stripe Checkout session","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Configuration-gated. Staging accepts test billing only; external staging Checkout and webhook tests have passed. The price, customer and meter are controlled and verified by the server. Existing open checkout sessions are reused; an active subscription is not duplicated. A checkout success redirect never grants entitlement by itself.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"requestBody":{"required":true,"description":"When /v1/account consumer.required=true, send these separate customer choices with the exact current consumer.offer.version. Otherwise send an empty object. The customer must authorise the choices; agent use is not business-use consent.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"maxProperties":0},{"type":"object","additionalProperties":false,"required":["offer_version","terms_accepted","customer_kind","early_start_requested"],"properties":{"offer_version":{"type":"string"},"terms_accepted":{"type":"boolean","enum":[true]},"customer_kind":{"type":"string","enum":["consumer","business"]},"early_start_requested":{"type":"boolean","description":"Must be false for business. Separate optional consent for consumers; never preselect."}}}]}}}},"responses":{"200":{"description":"Open this verified Stripe URL in the browser; staging uses test mode only. Returning to the site does not establish subscription entitlement.","content":{"application/json":{"schema":{"type":"object","required":["url","request_id"],"properties":{"url":{"type":"string","format":"uri"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Send an empty JSON object. Customer, price and subscription identifiers are server-controlled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body was not received within 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A billing operation, existing subscription or checkout reconciliation is in progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Account request body exceeds 1 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/portal":{"post":{"tags":["Billing"],"operationId":"createBillingPortal","summary":"Open the Stripe customer portal for your account","description":"Requires the signed-in browser identity managed by Sites. Use /access; an application API key or a platform service token alone does not establish user identity. Never set platform identity headers yourself. Mutations require Origin to match the site origin. Account actions share a 20-per-minute limit. Requires configured billing and a Stripe customer already attached to this account. The return URL is server-controlled. Staging uses test mode only.","security":[],"x-browser-authentication":{"required":true,"managed_by":"hosting_provider","sign_in":"/access","description":"Requires the hosting-managed signed-in account owner. No standalone OpenAPI credential is available for this browser session. API keys, archive sessions and operator platform tokens do not authenticate account actions. Writes require the matching site Origin."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0},"example":{}}}},"responses":{"200":{"description":"Open this verified Stripe URL in the browser; staging uses test mode only. Returning to the site does not establish subscription entitlement.","content":{"application/json":{"schema":{"type":"object","required":["url","request_id"],"properties":{"url":{"type":"string","format":"uri"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Send an empty JSON object. Customer, price and subscription identifiers are server-controlled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sign in through the site to manage your account. A check API key does not authenticate account actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Mutations must originate from the configured site origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method is not supported for this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body was not received within 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A billing operation is in progress or this account has no billing customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Account request body exceeds 1 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Send application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Account actions are limited to 20 per minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Account or billing service is unavailable or not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["Billing"],"operationId":"receiveStripeWebhook","summary":"Receive signed Stripe events","description":"Provider endpoint, not a customer action. The server verifies the Stripe-Signature HMAC against the exact raw body before parsing JSON, with a five-minute timestamp tolerance and support for the current and previous signing secret. At most 256 KiB with a five-second body deadline. HQ_STRIPE_EVENT_MODE independently selects stripe_test or stripe_live; live events require a production environment and live API key, while explicit test mode requires a non-production environment and test key. An absent event setting falls back to the valid billing configuration; an explicit disabled or invalid setting never falls back. An active sales mode must match the event mode. Thus live delivery and canonical read-only reconciliation can be verified while HQ_BILLING_MODE=disabled; they do not authorize Checkout, metering, paid admission or any Stripe write. Recognized events enter a durable inbox keyed by event ID with only object/customer references, type, mode and timestamps, not full payloads. Duplicate events never create a second inbox entry. A signed duplicate of a processed Checkout completion/success can requeue that same row only for its exact still-pending local acceptance, with matching customer, object, type and mode, fewer than 12 previous attempts and elapsed lease/backoff. Original event time and attempt count are retained; pending/failed rows and concluded purchases are not reset. Unknown event types and unrelated lifecycle customers are safely ignored. Processing re-reads canonical Stripe objects rather than trusting event order or redirects. Checkout normally requires a complete subscription session that is paid or needs no payment; an ordinary unpaid delayed charge awaits verified async success. A narrow flexible usage-only exception supports unpaid sessions with both subtotal and total exactly zero, explicit null invoice/payment/setup intents and payment_method_collection=always: fresh canonical reads must establish the exact active auto-charge Managed Payments subscription and accepted metered price, an attached default payment method with no pending setup/trial/pause/change, no initial invoice and a complete empty subscription invoice list, plus the approved product and meter. Missing or conflicting evidence keeps confirmation pending; a client-supplied verification flag cannot authorize it. This records the purchase only; separate receipt, service-start, budget and sales gates remain. Already concluded purchase confirmations remain immutable. On owner-private hosting, Stripe must use a public signature-preserving relay that supplies the separate platform service credential upstream. Direct Stripe delivery to the private site is not sufficient.","x-supported-event-types":["checkout.session.completed","checkout.session.async_payment_succeeded","checkout.session.async_payment_failed","customer.subscription.created","customer.subscription.updated","customer.subscription.deleted","customer.subscription.paused","customer.subscription.resumed","invoice.paid","invoice.payment_failed","invoice.payment_action_required","refund.created","refund.updated","refund.failed","charge.refunded","charge.dispute.created","charge.dispute.updated","charge.dispute.closed","radar.early_fraud_warning.created","radar.early_fraud_warning.updated"],"security":[{"StripeSignature":[]}],"requestBody":{"required":true,"description":"The raw signed Stripe event body, forwarded byte-for-byte. Maximum 262144 bytes; do not reserialize it before signature verification.","content":{"application/json":{"schema":{"type":"object","required":["id","type","livemode","data"],"properties":{"id":{"type":"string","pattern":"^evt_[a-zA-Z0-9_]{1,150}$"},"type":{"type":"string","description":"Recognized types are listed in x-supported-event-types. Unknown types with a valid signature and mode are acknowledged as ignored."},"livemode":{"type":"boolean","description":"Must match the configured event-verification mode; false for stripe_test, true for stripe_live."},"data":{"type":"object","additionalProperties":true}},"additionalProperties":true}}}},"responses":{"200":{"description":"Event durably accepted, already recorded, safely requeued, or intentionally ignored. This is not a confirmation that subscription reconciliation finished.","content":{"application/json":{"schema":{"type":"object","required":["received","request_id"],"properties":{"received":{"type":"boolean","enum":[true]},"duplicate":{"type":"boolean"},"requeued":{"type":"boolean","enum":[true],"description":"Present only when this signed duplicate safely requeues the same stored event for its still-pending acceptance. No new event or payment was created."},"ignored":{"type":"boolean"},"request_id":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid signature, invalid event or wrong Stripe mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Use POST.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Webhook body timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Webhook body exceeds 256 KiB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Webhook must be application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Event mode, matching API key, webhook secret or durable inbox is not configured or available. Event verification can be enabled independently of sales.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/keys":{"post":{"tags":["Administration"],"operationId":"createApiKey","summary":"Issue a staging API key valid for 30 days","description":"Use the administrator bearer credential, not a check API key. Returns the raw API key once. Only its SHA-256 hash is stored. Uses the same per-administrator minute and day limits.","security":[{"AdminKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"customer_id":{"type":"string","pattern":"^cus_[A-Za-z0-9]{1,100}$","description":"Optional Stripe test customer mapping. Does not enable billing."}}},"example":{}}}},"responses":{"201":{"description":"New API key. Store the returned value securely; it is not retrievable later.","content":{"application/json":{"schema":{"type":"object","required":["id","api_key","expires_at","rate_limit","request_id"],"properties":{"id":{"type":"string"},"api_key":{"type":"string","description":"Secret value; returned once."},"expires_at":{"type":"string","format":"date-time"},"request_id":{"type":"string","format":"uuid"},"rate_limit":{"type":"object","required":["per_minute","per_day"],"properties":{"per_minute":{"type":"integer","enum":[60]},"per_day":{"type":"integer","enum":[2000]}}}}}}}},"400":{"description":"Invalid request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator quota exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/admin/keys/{id}":{"delete":{"tags":["Administration"],"operationId":"revokeApiKey","summary":"Revoke an API key","security":[{"AdminKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"The key is revoked or was already absent/revoked.","content":{"application/json":{"schema":{"type":"object","required":["revoked","request_id"],"properties":{"revoked":{"type":"boolean","enum":[true]},"request_id":{"type":"string","format":"uuid"}}}}}},"401":{"description":"Missing or invalid administrator credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Administrator quota exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ArchiveCookie":{"type":"apiKey","in":"cookie","name":"__Secure-hq_archive","description":"One-hour HttpOnly archive-read session. Does not authenticate account or billing actions."},"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Issue a key after signing in at /access. Self-service keys expire after 90 days; legacy owner-issued keys expire after 30 days. Send only to this API from your server. Never put credentials in query strings or public browser code."},"AdminKey":{"type":"http","scheme":"bearer","bearerFormat":"Administrator key","description":"Separate owner administrator secret. Never distribute to API consumers."},"ResendSignature":{"type":"apiKey","in":"header","name":"svix-signature","description":"Provider-generated raw-body HMAC. Also requires the svix-id and svix-timestamp headers; no customer API key or browser identity is accepted."},"StripeSignature":{"type":"apiKey","in":"header","name":"Stripe-Signature","description":"Stripe-generated signature over the exact raw body and timestamp. A bearer API key is not used for webhook authentication."}},"schemas":{"ConsumerServiceStartRequest":{"type":"object","additionalProperties":false,"required":["request_version","purchase_confirmation_sha256","start_requested"],"properties":{"request_version":{"type":"string","enum":["2026-11-12.service-start.v1","2026-11-18.service-start.v2"],"description":"Exact separate-request version selected by the retained purchase shown in /access, not the currently offered draft. Older v2 purchases retain the original wording; production draft v3 uses affected-period full-refund wording. Both production drafts remain inactive."},"purchase_confirmation_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Digest of this purchase’s previously downloaded and acknowledged confirmation."},"start_requested":{"type":"boolean","enum":[true],"description":"Separate express request to start; not terms acceptance, receipt acknowledgement or withdrawal waiver."}}},"ConsumerServiceStartResult":{"type":"object","additionalProperties":false,"required":["requested","requested_at","service_start_at","confirmation_url","confirmation_sha256","withdrawal_waiver","request_id"],"properties":{"requested":{"type":"boolean","enum":[true]},"requested_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"service_start_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"confirmation_url":{"type":"string","description":"Same-origin account-owned start-confirmation path."},"confirmation_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"withdrawal_waiver":{"type":"boolean","enum":[false]},"request_id":{"type":"string","format":"uuid"}}},"ConsumerRemedyQueueRecord":{"type":"object","additionalProperties":false,"required":["id","account_id","contract_id","kind","status","provider_status","amount","currency","created_at","updated_at"],"properties":{"id":{"type":"string"},"account_id":{"type":"string","nullable":true},"contract_id":{"type":"string","nullable":true},"kind":{"type":"string"},"status":{"type":"string","enum":["requested","open","review","pending","requires_action","failed","canceled"]},"provider_status":{"type":"string","nullable":true},"amount":{"type":"integer","nullable":true},"currency":{"type":"string","nullable":true},"created_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"updated_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."}}},"ConsumerRemedyDecision":{"type":"object","additionalProperties":false,"required":["policy_version","evidence_sha256","decision","currency","expected_refund_cents","retained_paid_cents","waived_unpaid_cents","settled_usage_units","waived_usage_units","next_action","due_at"],"properties":{"policy_version":{"type":"string","description":"Exact approved HQ_REMEDY_POLICY_VERSION configured on the deployment."},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Server-issued digest of the latest complete reconciliation, no more than 15 minutes old."},"decision":{"type":"string","enum":["full_refund_and_waive_unpaid","proportional_settlement"],"description":"Must equal the approved deployment policy mode."},"currency":{"type":"string","pattern":"^[a-z]{3}$"},"expected_refund_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"retained_paid_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"waived_unpaid_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"settled_usage_units":{"type":"integer","minimum":0,"maximum":100000000000},"waived_usage_units":{"type":"integer","minimum":0,"maximum":100000000000},"next_action":{"type":"string","enum":["request_provider_refund","cancel_subscription","settle_provider_balance","reconcile_usage_delivery","wait_for_provider","verify_settlement","policy_review"]},"due_at":{"type":"integer","minimum":1,"description":"Operational handling target. Must not exceed the original withdrawal target or be more than 366 days in the future; does not replace applicable legal deadlines."}}},"ConsumerRemedyReport":{"type":"object","additionalProperties":false,"required":["cash_refund_verified","invoice_correction_verified","credit_notes","case_id","contract_id","observed_at","due_at","overdue","complete","case_status","resolution","next_action","blockers","local","subscription","invoices","refunds","money","decision_id","audit_id","evidence_sha256","request_id"],"properties":{"case_id":{"type":"string"},"contract_id":{"type":"string","nullable":true},"observed_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"due_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds.","nullable":true},"overdue":{"type":"boolean"},"complete":{"type":"boolean","description":"Whether bounded evidence collection completed; not an assertion of refund or case resolution."},"case_status":{"type":"string"},"resolution":{"type":"string","enum":["unresolved","resolved_no_charge","resolved_refunded","resolved_settled"]},"next_action":{"type":"string","enum":["request_provider_refund","cancel_subscription","settle_provider_balance","reconcile_usage_delivery","wait_for_provider","verify_settlement","policy_review"]},"blockers":{"type":"array","items":{"type":"string"}},"local":{"type":"object","additionalProperties":false,"required":["completed_units","base_amount_cents","unsettled_usage_events","open_reservations"],"properties":{"completed_units":{"type":"integer","minimum":0,"maximum":100000000000},"base_amount_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"unsettled_usage_events":{"type":"integer","minimum":0,"maximum":100000000000},"open_reservations":{"type":"integer","minimum":0,"maximum":100000000000}}},"policy_scope":{"type":"object","additionalProperties":false,"description":"Present for policy 2026-11-18.remedies.v1. Requires one unambiguous affected first period and complete retained usage; missing/mixed evidence needs review. Staging test mode additionally supports the narrowly observed first-cancellation meter shape: one paid EUR invoice/one owned one-cent line, invoice boundaries exactly floor(first start/60)*60 and ceil(canonical cancellation/60)*60, full unit/amount agreement and no foreign customer usage in that window. Raw allocation evidence is preserved and must match the original hash-verified decision source on every execution/retry and resolution. This exception is not enabled in production and is not a general rounding tolerance or an eligibility decision.","required":["period","blockers"],"properties":{"period":{"type":"object","nullable":true,"additionalProperties":false,"required":["start","end"],"properties":{"start":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"end":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."}}},"blockers":{"type":"array","items":{"type":"string"}},"allocation":{"$ref":"#/components/schemas/ConsumerMinuteCancellationAllocation"}}},"subscription":{"type":"object","nullable":true,"additionalProperties":false,"required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string"}}},"invoices":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","status","currency","subtotal","total","amount_due","amount_paid","amount_remaining","starting_balance","ending_balance","credit_notes"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"subtotal":{"type":"integer"},"total":{"type":"integer"},"amount_due":{"type":"integer"},"amount_paid":{"type":"integer"},"amount_remaining":{"type":"integer"},"starting_balance":{"type":"integer"},"ending_balance":{"type":"integer"},"credit_notes":{"type":"integer"}}}},"refunds":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","charge","status","amount","currency"],"properties":{"id":{"type":"string"},"charge":{"type":"string"},"status":{"type":"string"},"amount":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"currency":{"type":"string"}}}},"cash_refund_verified":{"type":"boolean"},"invoice_correction_verified":{"type":"boolean"},"credit_notes":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","invoice_id","refund_id","amount_cents","status","pdf_url"],"properties":{"pdf_url":{"type":"string","format":"uri","description":"Canonical provider PDF link; private customer document access, never a public listing."},"id":{"type":"string"},"invoice_id":{"type":"string"},"refund_id":{"type":"string"},"amount_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"status":{"type":"string","enum":["issued"]}}}},"invoice_correction":{"type":"object","additionalProperties":false,"required":["invoice_id","customer_id","currency","gross_cents","base_cents","line_id","quantity","refund_id","charge_id","payment_intent_id"],"properties":{"invoice_id":{"type":"string"},"customer_id":{"type":"string"},"currency":{"type":"string","enum":["eur"]},"gross_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"base_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"line_id":{"type":"string"},"quantity":{"type":"integer","minimum":0,"maximum":100000000000},"refund_id":{"type":"string"},"charge_id":{"type":"string"},"payment_intent_id":{"type":"string"}}},"money":{"type":"object","additionalProperties":false,"required":["currency","paid_cents","refunded_cents","pending_refund_cents","invoice_due_cents","customer_debit_cents","customer_credit_cents","cash_balance_cents"],"properties":{"currency":{"type":"string","nullable":true},"paid_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"refunded_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"pending_refund_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"invoice_due_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"customer_debit_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"customer_credit_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."},"cash_balance_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."}}},"decision_id":{"type":"string","nullable":true},"audit_id":{"type":"string"},"evidence_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Opaque digest of the stored reconciliation record, not of this response envelope."},"request_id":{"type":"string","format":"uuid"}}},"ConsumerMinuteCancellationAllocation":{"type":"object","additionalProperties":false,"required":["kind","item_period","invoice_period","subscription_start","canceled_at","ended_at","invoice_id","line_id","subscription_item_id","price_id","meter_id","units","base_amount_cents"],"properties":{"kind":{"type":"string","enum":["metered_first_cancellation_minute_v1"]},"item_period":{"type":"object","additionalProperties":false,"required":["start","end"],"properties":{"start":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"end":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."}}},"invoice_period":{"type":"object","additionalProperties":false,"required":["start","end"],"properties":{"start":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"end":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."}}},"subscription_start":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"canceled_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"ended_at":{"type":"integer","minimum":0,"description":"Unix seconds, not milliseconds."},"invoice_id":{"type":"string"},"line_id":{"type":"string"},"subscription_item_id":{"type":"string"},"price_id":{"type":"string"},"meter_id":{"type":"string"},"units":{"type":"integer","minimum":0,"maximum":100000000000},"base_amount_cents":{"type":"integer","minimum":0,"maximum":100000000000,"description":"Integer minor units in the stated currency."}}},"BudgetSnapshot":{"type":"object","additionalProperties":false,"required":["currency","tax_behavior","limit_basis","period","resets_at","billing_mode","account","key"],"properties":{"currency":{"type":"string","enum":["EUR"]},"tax_behavior":{"type":"string","enum":["exclusive"]},"limit_basis":{"type":"string","enum":["usage_before_tax_and_fx"],"description":"Limits usage at the EUR base price; tax and payment currency conversion are excluded."},"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"resets_at":{"type":"string","format":"date-time"},"billing_mode":{"type":"string","nullable":true,"enum":["stripe_test","stripe_live",null],"description":"Test/live counters are separate. Null when billing is disabled."},"account":{"type":"object","additionalProperties":false,"required":["monthly_limit_cents","completed_and_reserved_cents","remaining_cents"],"properties":{"monthly_limit_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000."},"completed_and_reserved_cents":{"type":"integer","minimum":0},"remaining_cents":{"type":"integer","minimum":0}}},"key":{"type":"object","nullable":true,"additionalProperties":false,"required":["monthly_limit_cents","effective_limit_cents","completed_and_reserved_cents","remaining_cents"],"properties":{"monthly_limit_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000.","nullable":true},"effective_limit_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000."},"completed_and_reserved_cents":{"type":"integer","minimum":0},"remaining_cents":{"type":"integer","minimum":0,"description":"Remaining key capacity bounded by shared account capacity."}},"description":"Null for account-only reads; otherwise the authenticated or owner-selected key."}}},"CheckReceipt":{"type":"object","additionalProperties":false,"required":["original_request_id","completed","original_usage_units","new_usage_units"],"properties":{"original_request_id":{"type":"string","format":"uuid"},"completed":{"type":"boolean","enum":[true]},"original_usage_units":{"type":"integer","enum":[1]},"new_usage_units":{"type":"integer","enum":[0]}}},"UsageSnapshot":{"oneOf":[{"$ref":"#/components/schemas/AccountUsageSnapshot"},{"$ref":"#/components/schemas/TrialUsageSnapshot"}]},"TrialUsageSnapshot":{"type":"object","additionalProperties":false,"required":["plan","usage","pricing","budget","key","limits","request_id"],"properties":{"plan":{"type":"string","enum":["trial"]},"usage":{"type":"object","required":["attempts_used","attempts_remaining","attempt_limit","period","resets_at","counts_failed_attempts","request_limit","requests_used","requests_remaining"],"properties":{"attempts_used":{"type":"integer","minimum":0},"attempts_remaining":{"type":"integer","minimum":0},"requests_used":{"type":"integer","minimum":0},"requests_remaining":{"type":"integer","minimum":0},"attempt_limit":{"type":"integer","enum":[3]},"request_limit":{"type":"integer","enum":[20]},"period":{"type":"string","enum":["trial_lifetime"]},"resets_at":{"type":"string","nullable":true,"enum":[null]},"counts_failed_attempts":{"type":"boolean","enum":[true]}}},"pricing":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR"]},"unit_amount":{"type":"string","enum":["0.00"]},"tax_behavior":{"type":"string","enum":["not_applicable"]},"billing_interval":{"type":"string","nullable":true,"enum":[null]}}},"budget":{"type":"object","nullable":true,"enum":[null]},"key":{"type":"object","required":["expires_at"],"properties":{"expires_at":{"type":"string","format":"date-time"}}},"limits":{"type":"object","description":"Per-minute and daily transport limits are additionally bounded by20 total requests per trial credential."},"request_id":{"type":"string","format":"uuid"},"next_action":{"$ref":"#/components/schemas/AccessNextAction"}}},"AccountUsageSnapshot":{"type":"object","additionalProperties":false,"required":["plan","usage","pricing","budget","key","limits","request_id"],"properties":{"plan":{"type":"string","enum":["free","metered_test","metered_live","payment_required","unlinked"]},"next_action":{"$ref":"#/components/schemas/AccessNextAction"},"budget":{"type":"object","additionalProperties":false,"required":["currency","tax_behavior","limit_basis","period","resets_at","billing_mode","account","key"],"properties":{"currency":{"type":"string","enum":["EUR"]},"tax_behavior":{"type":"string","enum":["exclusive"]},"limit_basis":{"type":"string","enum":["usage_before_tax_and_fx"],"description":"Limits usage at the EUR base price; tax and payment currency conversion are excluded."},"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"resets_at":{"type":"string","format":"date-time"},"billing_mode":{"type":"string","nullable":true,"enum":["stripe_test","stripe_live",null],"description":"Test/live counters are separate. Null when billing is disabled."},"account":{"type":"object","additionalProperties":false,"required":["monthly_limit_cents","completed_and_reserved_cents","remaining_cents"],"properties":{"monthly_limit_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000."},"completed_and_reserved_cents":{"type":"integer","minimum":0},"remaining_cents":{"type":"integer","minimum":0}}},"key":{"type":"object","nullable":true,"additionalProperties":false,"required":["monthly_limit_cents","effective_limit_cents","completed_and_reserved_cents","remaining_cents"],"properties":{"monthly_limit_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000.","nullable":true},"effective_limit_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"EUR usage cents before VAT, other taxes and payment currency conversion; not a final card-charge cap. 0 pauses paid checks. Maximum 100000 cents = EUR 1000."},"completed_and_reserved_cents":{"type":"integer","minimum":0},"remaining_cents":{"type":"integer","minimum":0,"description":"Remaining key capacity bounded by shared account capacity."}},"description":"Null for account-only reads; otherwise the authenticated or owner-selected key."}},"nullable":true,"description":"Current account/key spending caps and completed plus reserved cost. Null for unlinked keys. This does not reserve future capacity."},"usage":{"type":"object","nullable":true,"additionalProperties":false,"required":["period","completed_and_reserved","limit","remaining","resets_at"],"properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"UTC calendar month."},"completed_and_reserved":{"type":"integer","minimum":0,"description":"Completed checks plus in-flight reservations across every account key."},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0},"resets_at":{"type":"string","format":"date-time"}}},"pricing":{"type":"object","nullable":true,"additionalProperties":false,"required":["currency","unit_amount","tax_behavior","billing_interval"],"properties":{"currency":{"type":"string","enum":["EUR"]},"unit_amount":{"type":"string","enum":["0.00","0.01"],"description":"EUR per completed check under the current plan, before applicable tax."},"tax_behavior":{"type":"string","enum":["not_applicable","exclusive"]},"billing_interval":{"type":"string","nullable":true,"enum":["month",null]}}},"key":{"type":"object","additionalProperties":false,"required":["expires_at"],"properties":{"expires_at":{"type":"string","format":"date-time"}}},"limits":{"type":"object","additionalProperties":false,"required":["per_key","per_account","shared_with_checks"],"properties":{"per_key":{"$ref":"#/components/schemas/RequestLimits"},"per_account":{"type":"object","nullable":true,"additionalProperties":false,"required":["per_minute","per_utc_day"],"properties":{"per_minute":{"type":"integer","enum":[60]},"per_utc_day":{"type":"integer","enum":[2000]}}},"shared_with_checks":{"type":"boolean","enum":[true]}}},"request_id":{"type":"string","format":"uuid"}}},"RequestLimits":{"type":"object","additionalProperties":false,"required":["per_minute","per_utc_day"],"properties":{"per_minute":{"type":"integer","enum":[60]},"per_utc_day":{"type":"integer","enum":[2000]}}},"Account":{"type":"object","required":["account","keys","usage","budget","billing","request_id"],"properties":{"account":{"type":"object","required":["id","plan","subscription_status"],"properties":{"id":{"type":"string"},"plan":{"type":"string","enum":["free","metered_test","metered_live","billing_review_required"]},"subscription_status":{"type":"string","description":"Last reconciled subscription status; does not by itself grant paid entitlement."}}},"keys":{"type":"array","maxItems":3,"description":"Active, unexpired key metadata only. Raw secrets are never returned.","items":{"type":"object","required":["id","created_at","expires_at","revoked_at","monthly_budget_cents"],"properties":{"id":{"type":"string"},"created_at":{"type":"integer","description":"Unix seconds."},"expires_at":{"type":"integer","description":"Unix seconds."},"revoked_at":{"type":"integer","nullable":true,"description":"Null for returned active keys."},"monthly_budget_cents":{"type":"integer","minimum":0,"maximum":100000,"description":"Null inherits the shared account budget.","nullable":true}}}},"usage":{"type":"object","required":["period","used","limit"],"properties":{"period":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-11"},"used":{"type":"integer","minimum":0,"description":"Completed checks plus any checks currently reserved in flight."},"limit":{"type":"integer","minimum":1,"description":"100 for a free account; a configured safety limit for a verified metered subscription."}}},"budget":{"$ref":"#/components/schemas/BudgetSnapshot"},"billing":{"type":"object","required":["mode","seller_model","available"],"properties":{"seller_model":{"type":"string","enum":["direct","stripe_managed"],"description":"Managed Payments is supported only in test billing in this release."},"mode":{"type":"string","enum":["disabled","stripe_test","stripe_live"]},"available":{"type":"boolean","description":"Billing configuration is present; this is not proof of completed checkout or webhook delivery."}}},"request_id":{"type":"string","format":"uuid"}}},"IssuedAccountKey":{"type":"object","required":["id","api_key","expires_at","request_id"],"properties":{"id":{"type":"string"},"api_key":{"type":"string","description":"Secret returned exactly once. Only a hash is stored."},"expires_at":{"type":"string","format":"date-time","description":"90 days after issuance."},"request_id":{"type":"string","format":"uuid"}}},"CheckInput":{"oneOf":[{"$ref":"#/components/schemas/ImageInput"},{"$ref":"#/components/schemas/PdfInput"},{"$ref":"#/components/schemas/UrlInput"}],"discriminator":{"propertyName":"type","mapping":{"image":"#/components/schemas/ImageInput","pdf":"#/components/schemas/PdfInput","url":"#/components/schemas/UrlInput"}}},"ImageInput":{"type":"object","additionalProperties":false,"required":["type","data_base64"],"properties":{"type":{"type":"string","enum":["image"]},"data_base64":{"type":"string","format":"byte","minLength":4,"maxLength":2796204,"description":"Canonical padded RFC 4648 base64. No data URL prefix or whitespace. Decoded size must not exceed 2 MiB."},"profile":{"type":"string","enum":["baseline"],"default":"baseline"},"min_width":{"type":"integer","minimum":1,"maximum":20000,"default":256,"description":"Required minimum width in pixels."},"min_height":{"type":"integer","minimum":1,"maximum":20000,"default":256,"description":"Required minimum height in pixels."}}},"PdfInput":{"type":"object","additionalProperties":false,"required":["type","data_base64"],"properties":{"type":{"type":"string","enum":["pdf"]},"data_base64":{"type":"string","format":"byte","minLength":4,"maxLength":2796204,"description":"Canonical padded RFC 4648 base64. No data URL prefix or whitespace. Decoded size must not exceed 2 MiB."},"profile":{"type":"string","enum":["baseline","print"],"default":"baseline"}}},"UrlInput":{"type":"object","additionalProperties":false,"required":["type","url"],"properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri","minLength":1,"maxLength":2048,"description":"HTTPS public DNS website names on port 443 only. No IP literals, local/internal hostnames, credentials, custom ports, whitespace, backslashes or fragments. Public mode follows at most three revalidated HTTPS redirects through enforced public-only egress. Allowlist mode accepts only exact operator-configured names and no redirects. Inspect /ready for the active mode."},"profile":{"type":"string","enum":["baseline"],"default":"baseline"}}},"CheckResult":{"type":"object","additionalProperties":false,"required":["request_id","version","asset_type","profile","status","quality_score","production_ready","issues","checks_run","metadata","scope"],"properties":{"request_id":{"type":"string","format":"uuid"},"version":{"type":"string","enum":["2026-11-10.v2"]},"asset_type":{"type":"string","enum":["image","pdf","url"]},"profile":{"type":"string","enum":["baseline","print"]},"status":{"type":"string","enum":["PASS","FAIL"],"description":"FAIL when any critical issue is found, otherwise PASS. Limited to checks that actually ran."},"quality_score":{"type":"integer","minimum":0,"maximum":100,"description":"Starts at 100. Deduct 20 for each distinct critical rule, 5 for each distinct warning rule. Score is clamped at zero. This deterministic rule score is not an AI probability or production certification."},"production_ready":{"type":"boolean","enum":[false],"description":"Always false for this MVP. Complete visual, brand, print and accessibility validation is not implemented."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"checks_run":{"type":"array","items":{"type":"string"},"description":"Stable rule IDs that were evaluated."},"metadata":{"type":"object","additionalProperties":true,"description":"Content-free technical measurements specific to the input type, such as dimensions, page count, and byte count. Never includes file text or page HTML."},"scope":{"$ref":"#/components/schemas/Coverage"}}},"Issue":{"type":"object","additionalProperties":false,"required":["severity","category","rule","location","message","fix"],"properties":{"severity":{"type":"string","enum":["critical","warning","info"]},"category":{"type":"string","enum":["visual","print","web","brand","accessibility"]},"rule":{"type":"string","description":"Stable rule identifier."},"location":{"type":"object","additionalProperties":false,"properties":{"page":{"type":"integer","minimum":1,"description":"One-based page number."},"selector":{"type":"string","description":"Source HTML element location."},"asset":{"type":"string","enum":["document","image","url"]}}},"message":{"type":"string"},"fix":{"type":"string","description":"Suggested next action; no content is automatically changed."}}},"Coverage":{"type":"object","additionalProperties":false,"required":["checked_modules","unimplemented_modules","limitations"],"properties":{"checked_modules":{"type":"array","items":{"type":"string"},"description":"Modules that supplied rules for this input."},"unimplemented_modules":{"type":"array","items":{"type":"string"},"description":"Modules not evaluated for this input; some have implementations for other asset types."},"limitations":{"type":"array","items":{"type":"string"},"description":"Explicit unassessed areas. Read these before using PASS in a workflow."}}},"AccessNextAction":{"type":"object","additionalProperties":false,"description":"Optional guidance for an exhausted allowance or paused paid budget. URLs are fixed links to this environment's operator page, not payment or mutation endpoints. Opening the link does not accept terms, authorize a purchase, increase a limit or retry a check. Existing idempotency and consent rules still apply. Unknown deployment environments omit this guidance.","required":["type","reason","action","url","requires_operator_authorization","automatic_retry","message"],"properties":{"type":{"type":"string","enum":["operator_action"]},"reason":{"type":"string","enum":["trial_capacity_reached","trial_request_allowance_reached","trial_issuance_capacity_reached","free_monthly_allowance_reached","paid_monthly_safety_limit_reached","spending_budget_reached","paid_budget_zero"]},"action":{"type":"string","enum":["create_account_key","review_paid_access","review_usage_limit","review_spending_budget"]},"url":{"type":"string","format":"uri","enum":["https://honewa-quality-staging.honewa-6908.chatgpt.site/access#api-keys","https://honewa-quality-staging.honewa-6908.chatgpt.site/access#usage-billing","https://honewa-quality-staging.honewa-6908.chatgpt.site/access#spending-budget","https://honewa-quality.honewa-6908.chatgpt.site/access#api-keys","https://honewa-quality.honewa-6908.chatgpt.site/access#usage-billing","https://honewa-quality.honewa-6908.chatgpt.site/access#spending-budget","https://quality.honewa.com/access#api-keys","https://quality.honewa.com/access#usage-billing","https://quality.honewa.com/access#spending-budget"]},"requires_operator_authorization":{"type":"boolean","enum":[true]},"automatic_retry":{"type":"boolean","enum":[false]},"message":{"type":"string","maxLength":1000,"description":"Fixed guidance, never asset-derived instructions. A zero budget is not fixed by waiting for a monthly reset."}}},"Error":{"type":"object","additionalProperties":false,"required":["error","request_id"],"properties":{"next_action":{"$ref":"#/components/schemas/AccessNextAction"},"receipt":{"$ref":"#/components/schemas/CheckReceipt","description":"Present only for check_already_completed; proves prior completion without returning its QA result."},"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string","description":"Safe explanation without raw parser or asset contents."}}},"request_id":{"type":"string","format":"uuid"}}}}}}