{"openapi":"3.1.0","info":{"title":"Autowash.ai Data Stream API","version":"1.0.0","description":"Public agent discovery, manual-review payment instructions, and protected live feed access."},"servers":[{"url":"https://autowash.ai"}],"paths":{"/api/public/plans":{"get":{"operationId":"listPlans","summary":"List public plans","description":"Returns structured public plan metadata for agents and browser clients.","x-openai-isConsequential":false,"responses":{"200":{"description":"Plan list","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/PublicPlan"}}},"required":["plans"]}}}}}}},"/api/public/payment-options":{"get":{"operationId":"listPaymentOptions","summary":"List static payment options","description":"Returns public receiving-address instructions only. No private wallet material is exposed.","x-openai-isConsequential":false,"responses":{"200":{"description":"Payment options","content":{"application/json":{"schema":{"type":"object","properties":{"payment_options":{"type":"array","items":{"$ref":"#/components/schemas/PaymentOption"}}},"required":["payment_options"]}}}}}}},"/api/public/checkout-options":{"get":{"operationId":"listCheckoutOptions","summary":"List checkout options","description":"Returns current manual payment method metadata and future hosted checkout placeholders. This endpoint does not create checkout sessions.","x-openai-isConsequential":false,"responses":{"200":{"description":"Checkout options","content":{"application/json":{"schema":{"type":"object","properties":{"checkout_options":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutOption"}}},"required":["checkout_options"]}}}}}}},"/api/public/contact":{"post":{"operationId":"submitPublicContactMessage","summary":"Submit a public contact message","description":"Receives questions or access requests for operator review.","x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactInput"}}}},"responses":{"202":{"description":"Message accepted for private operator review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactResponse"}}}},"400":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/public/payment-evidence":{"post":{"operationId":"submitPaymentEvidence","summary":"Submit payment evidence for manual review","description":"Stores transaction evidence as pending_review only. This action does not grant access.","x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentEvidenceInput"}}}},"responses":{"202":{"description":"Evidence accepted for manual review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentEvidenceResponse"}}}},"400":{"description":"Validation failed"},"429":{"description":"Rate limited"}}}},"/api/feed/preview":{"get":{"operationId":"getFeedPreview","summary":"Get redacted public feed preview","description":"Returns server-side redacted feed records for guest/agent preview. Contact fields and raw source payloads are never returned.","x-openai-isConsequential":false,"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":80,"default":24}}],"responses":{"200":{"description":"Redacted feed preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedPreviewResponse"}}}}}}},"/api/feed/v1/records/batches":{"post":{"operationId":"submitMatrixFeedRecordsBatch","summary":"Submit a protected Matrix records batch","description":"Protected producer intake for Matrix Feed Contract v1 records. Accepts contactable, non-contactable, unknown, and evidence-only records. Requires an inbound API Bearer token created by an admin.","x-openai-isConsequential":true,"security":[{"inboundBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixFeedBatchInput"}}}},"responses":{"200":{"description":"Batch accepted with no newly created records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixFeedBatchResponse"}}}},"201":{"description":"Batch accepted and records were created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixFeedBatchResponse"}}}},"400":{"description":"Invalid batch envelope or record payload"},"401":{"description":"Missing or invalid Bearer token"},"403":{"description":"API key is not authorized for this feed source or dataset"}}}},"/api/feed/v1/contactable-leads/batches":{"post":{"operationId":"submitContactableLeadBatch","summary":"Submit a protected contactable lead batch","description":"Compatibility intake for Matrix Feed Contract v1 batches where every accepted record must contain a usable phone, mobile, or email. This is the endpoint used by the local-to-production relay.","x-openai-isConsequential":true,"security":[{"inboundBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixFeedBatchInput"}}}},"responses":{"200":{"description":"Batch accepted with no newly created records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixFeedBatchResponse"}}}},"201":{"description":"Batch accepted and records were created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixFeedBatchResponse"}}}},"400":{"description":"Invalid batch envelope or record payload"},"401":{"description":"Missing or invalid Bearer token"},"403":{"description":"API key is not authorized for this feed source or dataset"}}}},"/api/intake-feed":{"get":{"operationId":"getFeedRecords","summary":"Get protected live feed records","description":"Requires an authenticated human session with live feed access. Returned fields are controlled server-side by user clearance and feed permissions.","x-openai-isConsequential":false,"security":[{"cookieSession":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":80}}],"responses":{"200":{"description":"Protected feed records"},"401":{"description":"Session required"},"403":{"description":"Live feed access denied"}}}},"/api/sales-inbox/cards/{id}":{"get":{"operationId":"getFeedRecordById","summary":"Get a protected feed card by id","description":"Existing protected sales-inbox card detail endpoint. Requires a human session and existing sales inbox access rules.","x-openai-isConsequential":false,"security":[{"cookieSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Protected card detail"},"401":{"description":"Session required"},"403":{"description":"Access denied"},"404":{"description":"Record not found"}}}},"/api/auth/check":{"get":{"operationId":"getClearanceStatus","summary":"Get current human session clearance status","description":"Returns current authenticated session/user permissions. Without a valid session, returns 401.","x-openai-isConsequential":false,"security":[{"cookieSession":[]}],"responses":{"200":{"description":"Session clearance status"},"401":{"description":"No authenticated session"}}}}},"components":{"securitySchemes":{"cookieSession":{"type":"apiKey","in":"cookie","name":"connect.sid","description":"Existing human browser session cookie."},"inboundBearer":{"type":"http","scheme":"bearer","description":"Admin-created inbound API key for producer or relay writes."}},"schemas":{"PublicPlan":{"type":"object","properties":{"plan_id":{"type":"string"},"name":{"type":"string"},"price":{"type":"number"},"currency":{"type":"string"},"interval":{"type":"string"},"description":{"type":"string"},"features":{"type":"array","items":{"type":"string"}},"limits":{"type":"object"},"clearance_granted":{"type":"string","enum":["unlimited_stream"]},"payment_available":{"type":"boolean"},"manual_review_required":{"type":"boolean"}},"required":["plan_id","name","price","currency","interval","description","features","limits","clearance_granted","payment_available","manual_review_required"]},"PaymentOption":{"type":"object","properties":{"type":{"type":"string","enum":["static_crypto_address"]},"provider":{"type":"string"},"asset":{"type":"string"},"network":{"type":"string"},"receiving_address":{"type":["string","null"]},"memo_or_tag_required":{"type":"boolean"},"memo_or_tag_value":{"type":["string","null"]},"settlement_currency":{"type":"string"},"min_amount":{"type":["number","null"]},"max_amount":{"type":["number","null"]},"status":{"type":"string","enum":["available","unconfigured"]},"manual_review_required":{"type":"boolean"},"confirmation_instructions":{"type":"string"},"notes":{"type":"string"},"support_email":{"type":["string","null"]}}},"CheckoutOption":{"type":"object","properties":{"method_id":{"type":"string"},"method_type":{"type":"string"},"label":{"type":"string"},"status":{"type":"string"},"is_hosted_checkout":{"type":"boolean"},"is_static_address":{"type":"boolean"},"requires_manual_review":{"type":"boolean"},"instructions":{"type":"string"},"future_upgrade_path":{"type":"string"},"checkout_url":{"type":["string","null"]},"checkout_id":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"provider":{"type":"string"}}},"PaymentEvidenceInput":{"type":"object","properties":{"plan_id":{"type":"string"},"payer_email":{"type":"string","format":"email"},"asset":{"type":"string"},"network":{"type":"string"},"transaction_hash":{"type":"string"},"amount_sent":{"oneOf":[{"type":"string"},{"type":"number"}]},"notes":{"type":"string"}},"required":["plan_id","payer_email","asset","network","transaction_hash","amount_sent"]},"PublicContactInput":{"type":"object","properties":{"subject":{"type":"string","maxLength":160},"message":{"type":"string","minLength":10,"maxLength":4000},"reply_email":{"type":"string","format":"email","description":"Optional return address."},"source":{"type":"string","description":"Optional caller label such as public_form or agent_message."},"context":{"type":"object","additionalProperties":true}},"required":["message"]},"PublicContactResponse":{"type":"object","properties":{"id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["received"]},"message":{"type":"string"},"reply_possible":{"type":"boolean"}},"required":["status","message","reply_possible"]},"MatrixFeedBatchInput":{"type":"object","properties":{"schema_version":{"type":"string","const":"matrix.feed.v1"},"source_system":{"type":"string","maxLength":120},"dataset":{"type":"string","maxLength":160},"source_name":{"type":"string","maxLength":240},"source_channel":{"type":"string","maxLength":160},"source_channel_name":{"type":"string","maxLength":240},"source_platform":{"type":"string","maxLength":120},"batch_id":{"type":"string","maxLength":240},"mode":{"type":"string","enum":["new","delta","backfill"]},"generated_at":{"type":"string","description":"ISO timestamp preferred."},"records":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/MatrixFeedRecordInput"}}},"required":["schema_version","source_system","dataset","source_name","batch_id","mode","generated_at","records"],"additionalProperties":true},"MatrixFeedRecordInput":{"type":"object","properties":{"external_source_record_id":{"type":"string","maxLength":320},"business_name":{"type":"string","maxLength":500},"phone":{"type":"string","maxLength":100},"mobile":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":320},"contactability_status":{"type":"string","enum":["contactable","non_contactable","unknown","evidence_only"]},"payload_hash":{"type":"string","maxLength":320},"idempotency_key":{"type":"string","maxLength":500},"source_url":{"type":"string","maxLength":2048},"profile_url":{"type":"string","maxLength":2048},"proof_url":{"type":"string","maxLength":2048},"observed_at":{"type":"string"},"captured_at":{"type":"string"},"external_source_updated_at":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"raw_payload":{},"raw_appendix":{}},"required":["external_source_record_id","business_name","metadata"],"additionalProperties":true},"MatrixFeedBatchResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"schema_version":{"type":"string","const":"matrix.feed.v1"},"batch_id":{"type":"string"},"source_system":{"type":"string"},"dataset":{"type":"string"},"source_name":{"type":"string"},"mode":{"type":"string"},"feed_kind":{"type":"string","enum":["records","contactable-leads"]},"counts":{"type":"object","additionalProperties":{"type":"number"}},"contactability_counts":{"type":"object","additionalProperties":{"type":"number"}},"results":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["ok","schema_version","batch_id","source_system","dataset","source_name","mode","feed_kind","counts","contactability_counts","results"]},"PaymentEvidenceResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending_review"]},"message":{"type":"string"},"review_required":{"type":"boolean"}},"required":["status","message","review_required"]},"FeedPreviewResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"clearance":{"type":"string","enum":["guest"]},"total":{"type":"number"},"items":{"type":"array","items":{"type":"object"}}},"required":["generatedAt","clearance","total","items"]}}}}