{"openapi": "3.0.3", "info": {"title": "Certified forgetting for agents", "version": "0.1.0", "description": "Certified forgetting with signed per-store attestations and hash-chained receipts. Provider: TextForAgents LLC. Support: support@textforagents.com. Hosted v1 operates on in-service demonstration/test stores the operator creates through this API (vector, summary, cache, shared, notes shapes). There are NO connectors to external memory providers in v1. Certification covers token-bearing surfaces: a paraphrase-only residue that rewords a fact using none of its tokens is outside the v1 certificate's claim. Forgetting is effected by per-store delete operations and contribution-level summary rewrites only."}, "paths": {"/": {"get": {"summary": "Public product descriptor", "responses": {"200": {"description": "Descriptor", "content": {"application/json": {"schema": {"type": "object", "properties": {"product": {"type": "string"}}, "required": []}}}}}}}, "/health": {"get": {"summary": "Health", "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"status": {"type": "string"}}, "required": []}}}}}}}, "/register": {"post": {"summary": "Register an account", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_name": {"type": "string"}, "payer_wallet": {"type": "string"}}, "required": ["account_name", "payer_wallet"]}}}}, "responses": {"200": {"description": "Account + claim token", "content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "claim_token": {"type": "string"}}, "required": []}}}}}}}, "/trial": {"post": {"summary": "Claim the one-time trial (first 10 certified forgets free)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "claim_token": {"type": "string"}}, "required": ["account_id", "claim_token"]}}}}, "responses": {"200": {"description": "Trial token (shown once)", "content": {"application/json": {"schema": {"type": "object", "properties": {"token": {"type": "string"}, "tier": {"type": "string"}, "trial": {"type": "boolean"}, "quota_total": {"type": "integer"}, "expires_at": {"type": "number"}}, "required": []}}}}, "403": {"description": "Trial already used or bad claim"}}}}, "/subscribe": {"post": {"summary": "Subscribe/renew via x402 (Operator 9000000 / Fleet 29000000 atomic USDC)", "parameters": [{"name": "X-PAYMENT", "in": "header", "schema": {"type": "string"}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "tier": {"type": "string", "enum": ["Operator", "Fleet"]}}, "required": ["account_id", "tier"]}}}}, "responses": {"200": {"description": "Token issued/extended 30 days with tier quota", "content": {"application/json": {"schema": {"type": "object", "properties": {"token": {"type": "string"}, "tier": {"type": "string"}, "quota_total": {"type": "integer"}, "expires_at": {"type": "number"}}, "required": []}}}}, "402": {"description": "x402 payment required / payment rejected"}}}}, "/stores": {"post": {"summary": "Create/list the account's in-service demo stores (Bearer)", "security": [{"BearerAuth": []}], "responses": {"200": {"description": "Store list", "content": {"application/json": {"schema": {"type": "object", "properties": {"stores": {"type": "array", "items": {"type": "object"}}}, "required": []}}}}, "401": {"description": "Missing/expired token"}}}}, "/facts": {"post": {"summary": "Write a fact; it spreads across all stores with lineage (Bearer)", "security": [{"BearerAuth": []}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"fact_id": {"type": "string"}, "text": {"type": "string"}, "share_with": {"type": "array", "items": {"type": "string"}}}, "required": ["fact_id", "text"]}}}}, "responses": {"201": {"description": "Write result with artifact count", "content": {"application/json": {"schema": {"type": "object", "properties": {"fact_id": {"type": "string"}, "artifacts": {"type": "integer"}}, "required": []}}}}, "401": {"description": "Missing/expired token"}}}}, "/probe": {"post": {"summary": "Absence/presence probe of a fact on every surface (Bearer)", "security": [{"BearerAuth": []}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"fact_id": {"type": "string"}}, "required": ["fact_id"]}}}}, "responses": {"200": {"description": "Probe hits by store", "content": {"application/json": {"schema": {"type": "object", "properties": {"fact_id": {"type": "string"}, "hits_by_store": {"type": "object"}, "total_hits": {"type": "integer"}}, "required": []}}}}, "401": {"description": "Missing/expired token"}}}}, "/forget": {"post": {"summary": "Certified forget (Bearer; consumes 1 included forget, else 402 \u2014 retry with X-PAYMENT $0.25)", "security": [{"BearerAuth": []}], "parameters": [{"name": "X-PAYMENT", "in": "header", "schema": {"type": "string"}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"fact_id": {"type": "string"}, "tombstone_id": {"type": "string"}}, "required": ["fact_id"]}}}}, "responses": {"200": {"description": "Forgetting receipt", "content": {"application/json": {"schema": {"type": "object", "properties": {"fact_id": {"type": "string"}, "tombstone_id": {"type": "string"}, "status": {"type": "string", "enum": ["CERTIFIED", "INCOMPLETE"]}, "attestations": {"type": "array", "items": {"type": "object", "properties": {"store": {"type": "string"}, "fact_id": {"type": "string"}, "deleted": {"type": "integer"}, "mode": {"type": "string"}, "sig": {"type": ["string", "null"]}, "refused": {"type": "boolean"}}, "required": []}}, "lineage_deleted": {"type": "integer"}, "discovery_deleted": {"type": "integer"}, "probe": {"type": "object"}, "receipt_hash": {"type": "string"}, "cert_sig": {"type": "string"}, "cert_pubkey": {"type": "string"}}, "required": []}}}}, "401": {"description": "Missing/expired token"}, "402": {"description": "Quota exhausted: x402 payment required / payment rejected"}}}}, "/receipts": {"get": {"summary": "The account's forgetting receipts (Bearer)", "security": [{"BearerAuth": []}], "responses": {"200": {"description": "Receipts", "content": {"application/json": {"schema": {"type": "object", "properties": {"receipts": {"type": "array", "items": {"type": "object", "properties": {"fact_id": {"type": "string"}, "tombstone_id": {"type": "string"}, "status": {"type": "string", "enum": ["CERTIFIED", "INCOMPLETE"]}, "attestations": {"type": "array", "items": {"type": "object", "properties": {"store": {"type": "string"}, "fact_id": {"type": "string"}, "deleted": {"type": "integer"}, "mode": {"type": "string"}, "sig": {"type": ["string", "null"]}, "refused": {"type": "boolean"}}, "required": []}}, "lineage_deleted": {"type": "integer"}, "discovery_deleted": {"type": "integer"}, "probe": {"type": "object"}, "receipt_hash": {"type": "string"}, "cert_sig": {"type": "string"}, "cert_pubkey": {"type": "string"}}, "required": []}}}, "required": []}}}}, "401": {"description": "Missing/expired token"}}}}, "/receipts/verify": {"post": {"summary": "Verify a receipt: hash chain body, certificate signature, per-store Ed25519 attestations (Bearer)", "security": [{"BearerAuth": []}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"receipt": {"type": "object", "properties": {"fact_id": {"type": "string"}, "tombstone_id": {"type": "string"}, "status": {"type": "string", "enum": ["CERTIFIED", "INCOMPLETE"]}, "attestations": {"type": "array", "items": {"type": "object", "properties": {"store": {"type": "string"}, "fact_id": {"type": "string"}, "deleted": {"type": "integer"}, "mode": {"type": "string"}, "sig": {"type": ["string", "null"]}, "refused": {"type": "boolean"}}, "required": []}}, "lineage_deleted": {"type": "integer"}, "discovery_deleted": {"type": "integer"}, "probe": {"type": "object"}, "receipt_hash": {"type": "string"}, "cert_sig": {"type": "string"}, "cert_pubkey": {"type": "string"}}, "required": []}}, "required": ["receipt"]}}}}, "responses": {"200": {"description": "Validity", "content": {"application/json": {"schema": {"type": "object", "properties": {"valid": {"type": "boolean"}}, "required": []}}}}, "401": {"description": "Missing/expired token"}}}}, "/account": {"get": {"summary": "Account tier + quota state (Bearer)", "security": [{"BearerAuth": []}], "responses": {"200": {"description": "Account", "content": {"application/json": {"schema": {"type": "object", "properties": {"account_id": {"type": "string"}, "tier": {"type": "string"}, "quota_total": {"type": "integer"}, "quota_used": {"type": "integer"}}, "required": []}}}}, "401": {"description": "Missing/expired token"}}}}, "/tokens/revoke": {"post": {"summary": "Revoke the caller's token", "security": [{"BearerAuth": []}], "responses": {"200": {"description": "Revoked", "content": {"application/json": {"schema": {"type": "object", "properties": {"revoked": {"type": "boolean"}}, "required": []}}}}}}}}, "components": {"securitySchemes": {"BearerAuth": {"type": "http", "scheme": "bearer"}}, "schemas": {"Receipt": {"type": "object", "properties": {"fact_id": {"type": "string"}, "tombstone_id": {"type": "string"}, "status": {"type": "string", "enum": ["CERTIFIED", "INCOMPLETE"]}, "attestations": {"type": "array", "items": {"type": "object", "properties": {"store": {"type": "string"}, "fact_id": {"type": "string"}, "deleted": {"type": "integer"}, "mode": {"type": "string"}, "sig": {"type": ["string", "null"]}, "refused": {"type": "boolean"}}, "required": []}}, "lineage_deleted": {"type": "integer"}, "discovery_deleted": {"type": "integer"}, "probe": {"type": "object"}, "receipt_hash": {"type": "string"}, "cert_sig": {"type": "string"}, "cert_pubkey": {"type": "string"}}, "required": []}}}}