{"openapi":"3.1.0","info":{"title":"bizbasics platform-api","version":"0.1.0"},"paths":{"/v1/catalog":{"get":{"tags":["catalog"],"summary":"List Products","description":"Products visible to the caller, with visibility enforced server-side.\n\nVisibility is authoritative here (the launcher also filters client-side, but\nthat is UX, not a boundary — we must not leak hidden/admin_only product\nmetadata to customers):\n  - launcher_listed → everyone\n  - admin_only      → platform admins only\n  - hidden          → only if the org is entitled (already provisioned it)\n                      or the caller is a platform admin\nArchived products are never listed.","operationId":"list_products_v1_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/catalog/health":{"get":{"tags":["catalog"],"summary":"Catalog Health","description":"Aggregated health status for all non-archived products.\nCombines real-time Redis poll state with the product's operational_mode.","operationId":"catalog_health_v1_catalog_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/catalog/{product_id}":{"get":{"tags":["catalog"],"summary":"Get Product","operationId":"get_product_v1_catalog__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["catalog"],"summary":"Upsert Product","operationId":"upsert_product_v1_catalog__product_id__put","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/catalog/{product_id}/lifecycle":{"patch":{"tags":["catalog"],"summary":"Update Lifecycle","description":"Update one or more product policy fields (lifecycle, visibility, audience, assignment_mode, operational_mode).","operationId":"update_lifecycle_v1_catalog__product_id__lifecycle_patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspace-records":{"get":{"tags":["records"],"summary":"List Records","description":"List workspace records for the current org. Used by monk for AI context.","operationId":"list_records_v1_workspace_records_get","parameters":[{"name":"record_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Type"}},{"name":"source_product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Product"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"active","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["records"],"summary":"Publish Record","description":"Publish or update a workspace record.\nAccepted from: products with X-Internal-Key, or API key callers with write scope.\nUpserts by (org_id, source_product, record_type, source_ref).","operationId":"publish_record_v1_workspace_records_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRecordRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspace-records/{workspace_record_id}":{"get":{"tags":["records"],"summary":"Get Record","operationId":"get_record_v1_workspace_records__workspace_record_id__get","parameters":[{"name":"workspace_record_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["records"],"summary":"Archive Record","operationId":"archive_record_v1_workspace_records__workspace_record_id__delete","parameters":[{"name":"workspace_record_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Record Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workspace-records/internal/search":{"get":{"tags":["records"],"summary":"Internal Search Records","description":"Internal-key search over workspace records for a given org.\nUsed by monk to supplement RAG context with cross-product content (e.g. relay messages).","operationId":"internal_search_records_v1_workspace_records_internal_search_get","parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"source_product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Product"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"default":5,"title":"Limit"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/storage/objects":{"post":{"tags":["storage"],"summary":"Register Object","operationId":"register_object_v1_storage_objects_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterObjectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["storage"],"summary":"List Objects","operationId":"list_objects_v1_storage_objects_get","parameters":[{"name":"storage_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Kind"}},{"name":"source_product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Product"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/storage/objects/{shared_object_id}":{"get":{"tags":["storage"],"summary":"Get Object","operationId":"get_object_v1_storage_objects__shared_object_id__get","parameters":[{"name":"shared_object_id","in":"path","required":true,"schema":{"type":"string","title":"Shared Object Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["storage"],"summary":"Archive Object","operationId":"archive_object_v1_storage_objects__shared_object_id__delete","parameters":[{"name":"shared_object_id","in":"path","required":true,"schema":{"type":"string","title":"Shared Object Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/storage/share-tokens":{"post":{"tags":["storage"],"summary":"Create Share Token","operationId":"create_share_token_v1_storage_share_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShareTokenRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/storage/share/{token}":{"get":{"tags":["storage"],"summary":"Resolve Share Token","operationId":"resolve_share_token_v1_storage_share__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/org-documents":{"get":{"tags":["org-documents"],"summary":"List Org Documents","operationId":"list_org_documents_v1_org_documents_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["org-documents"],"summary":"Upload Org Document","operationId":"upload_org_document_v1_org_documents_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_org_document_v1_org_documents_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/org-documents/{shared_object_id}/download":{"get":{"tags":["org-documents"],"summary":"Download Org Document","operationId":"download_org_document_v1_org_documents__shared_object_id__download_get","parameters":[{"name":"shared_object_id","in":"path","required":true,"schema":{"type":"string","title":"Shared Object Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/org-documents/{shared_object_id}":{"delete":{"tags":["org-documents"],"summary":"Archive Org Document","operationId":"archive_org_document_v1_org_documents__shared_object_id__delete","parameters":[{"name":"shared_object_id","in":"path","required":true,"schema":{"type":"string","title":"Shared Object Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/org/members":{"get":{"tags":["org"],"summary":"Get Org Members","description":"Proxy to auth-service — returns members for the current org.","operationId":"get_org_members_v1_org_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/org/teams":{"get":{"tags":["org"],"summary":"Get Org Teams","description":"Proxy to auth-service — returns teams for the current org.","operationId":"get_org_teams_v1_org_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/org/knowledge-context":{"get":{"tags":["org"],"summary":"Get Knowledge Context","description":"Returns a compact context snapshot for the current org:\nrecent workspace records grouped by type, for use by monk as AI context.","operationId":"get_knowledge_context_v1_org_knowledge_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/org/retrieve":{"get":{"tags":["org"],"summary":"Retrieve Records","description":"Text search across workspace records for the current org.\nMonk uses this to find cross-product business objects without direct DB reads.","operationId":"retrieve_records_v1_org_retrieve_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"record_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Type"}},{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quota/consume":{"post":{"tags":["quota"],"summary":"Consume Quota","description":"Atomically consume quota tokens. Returns 200 with allowed=false if over limit\n(never 429 — callers decide how to respond to over-limit).\n\nProducts should call this before performing a quota-gated operation.\nOn Redis failure, fail open (allowed=true) with limit=-1.","operationId":"consume_quota_v1_quota_consume_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quota/provision":{"post":{"tags":["quota"],"summary":"Provision Quota","description":"Called by billing-service when a subscription is created or upgraded.\nSets the quota limits for the org. Optionally resets current period counters.\nQuota limits are stored indefinitely (no TTL) — they apply to every period.","operationId":"provision_quota_v1_quota_provision_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__quota__ProvisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Provision Quota V1 Quota Provision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quota/reset/{org_id}":{"post":{"tags":["quota"],"summary":"Reset Quota","description":"Reset current-period usage counters. Called on billing period renewal.","operationId":"reset_quota_v1_quota_reset__org_id__post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Quota V1 Quota Reset  Org Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quota/status":{"get":{"tags":["quota"],"summary":"Get Quota Status","description":"Current period quota usage for the authenticated org.","operationId":"get_quota_status_v1_quota_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Quota Status V1 Quota Status Get"}}}}}}},"/v1/quota/breakdown":{"get":{"tags":["quota"],"summary":"Get Quota Breakdown","description":"Per-product usage breakdown for the current org and period.\nQueries Redis for bb:quota:{org_id}:{product_id}:{resource}:{period} keys.\nReturns only products that have recorded any usage this period.","operationId":"get_quota_breakdown_v1_quota_breakdown_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Quota Breakdown V1 Quota Breakdown Get"}}}}}}},"/v1/quota/admin/grant-bonus":{"post":{"tags":["quota"],"summary":"Grant Bonus Quota","description":"Platform admin grants bonus quota tokens to an org for the current period.\nUseful for support escalations, trials, and custom deals.","operationId":"grant_bonus_quota_v1_quota_admin_grant_bonus_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BonusGrantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Grant Bonus Quota V1 Quota Admin Grant Bonus Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quota/admin/status/{org_id}":{"get":{"tags":["quota"],"summary":"Get Org Quota Admin","description":"Platform admin view of any org's quota state.","operationId":"get_org_quota_admin_v1_quota_admin_status__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Org Quota Admin V1 Quota Admin Status  Org Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/messages":{"post":{"tags":["ai"],"summary":"Ai Messages","description":"Meter the org's ai_calls quota, then proxy one Messages call to Claude with\nthe platform key and the platform-pinned model.","operationId":"ai_messages_v1_ai_messages_post","parameters":[{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIMessagesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ai Messages V1 Ai Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/infra":{"get":{"tags":["infra"],"summary":"List Provisioned","operationId":"list_provisioned_v1_infra_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProvisionListItem"},"type":"array","title":"Response List Provisioned V1 Infra Get"}}}}}}},"/v1/infra/provision":{"post":{"tags":["infra"],"summary":"Provision Product","operationId":"provision_product_v1_infra_provision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__infra__ProvisionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/infra/selfcheck":{"get":{"tags":["infra"],"summary":"Infra Selfcheck","description":"Probe platform-api's own dependencies (db, redis, auth-service,\nnotification-service) and report each. 200 always; read `ok`. The\nnotification-service line is the on-demand version of the 8093/8094 catcher.","operationId":"infra_selfcheck_v1_infra_selfcheck_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Infra Selfcheck V1 Infra Selfcheck Get"}}}}}}},"/v1/infra/provision/{product_id}/deprovision":{"post":{"tags":["infra"],"summary":"Deprovision Product","description":"Retire a product SAFELY. Archives its provisioning metadata + the catalog\nentry, revokes its deploy tokens, and drops the active provisioning row. The\nproduct's DATA STORES — its Postgres, MinIO bucket, Redpanda topics, and k8s\nnamespace — are RETAINED, never deleted here. The archived snapshot is the\nrecord an operator uses to tear those down separately and deliberately, because\nthat step is irreversible. No data is destroyed by this call.","operationId":"deprovision_product_v1_infra_provision__product_id__deprovision_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeprovisionRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deprovision Product V1 Infra Provision  Product Id  Deprovision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/infra/provision/{product_id}":{"get":{"tags":["infra"],"summary":"Get Provisioning","operationId":"get_provisioning_v1_infra_provision__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/infra/provision/{product_id}/smoke":{"post":{"tags":["infra"],"summary":"Run Provision Smoke","description":"Run the post-deploy smoke against a provisioned product and return the\nper-leg report. Annotates, never blocks — a failing leg means the deploy\nsucceeded but verification found a problem (so HTTP is 200 regardless; read\n`ok`). Auto-running on first-healthy + persisting the report lands with #56.","operationId":"run_provision_smoke_v1_infra_provision__product_id__smoke_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Provision Smoke V1 Infra Provision  Product Id  Smoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"post":{"tags":["webhooks"],"summary":"Register Webhook","description":"Register an outbound webhook endpoint for a product.","operationId":"register_webhook_v1_webhooks_post","parameters":[{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterWebhookRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["webhooks"],"summary":"List Webhooks","description":"List webhook endpoints registered by this product.","operationId":"list_webhooks_v1_webhooks_get","parameters":[{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookListItem"},"title":"Response List Webhooks V1 Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Test Webhook","description":"Fire a synthetic event at the registered URL so developers can verify\ntheir endpoint receives signed deliveries.\n\nSends `webhook.test` with a deterministic payload. The endpoint sees\nreal HMAC signing, retries (3 attempts), and a row in\nwebhook_delivery_log — same path as production deliveries.\n\nReturns 202 immediately; the delivery happens in a background task.\nSubsequent calls to GET /v1/webhooks/{id}/deliveries (TODO) or to the\ndelivery_log table show the outcome.","operationId":"test_webhook_v1_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Webhook V1 Webhooks  Webhook Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Webhook","description":"Delete a webhook endpoint. Product can only delete its own endpoints.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Webhook V1 Webhooks  Webhook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/events":{"post":{"tags":["webhooks"],"summary":"Dispatch Event","description":"Receive a platform lifecycle event from auth-service (or other platform services).\nEnqueues async delivery to all matching webhook endpoints.","operationId":"dispatch_event_v1_internal_events_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchEventRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dispatch Event V1 Internal Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/webhook-deliveries":{"get":{"tags":["webhooks"],"summary":"List Webhook Deliveries","description":"Recent webhook delivery attempts for the authenticated org's products.\n\nOrg-scoped via the products the org owns (app_submissions.product_slug ->\nwebhook_endpoints.product_id). Lets developers debug their integrations:\nwhich event, which target, HTTP status, attempt #, and any error.","operationId":"list_webhook_deliveries_v1_dev_webhook_deliveries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/api-requests":{"get":{"tags":["webhooks"],"summary":"List Api Requests","description":"Recent API requests made with this org's `bbk_` API keys.\n\nOrg-scoped via api_request_log.org_id (the owning org of the key used). Lets\ndevelopers see what their keys are doing: method, path, status, latency, and\nwhich key prefix made the call.","operationId":"list_api_requests_v1_dev_api_requests_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/send":{"post":{"tags":["notifications"],"summary":"Send Email","description":"Send a transactional email — the SA-authed front door for products.\n\nA product authenticates with its pod ServiceAccount token (no shared secret)\nand the platform proxies to the notification service with platform trust. This\nkeeps the notification service's shared key off every product (mirrors the AI\ngateway). The template must exist platform-side (e.g. esign_invite).","operationId":"send_email_v1_notifications_send_post","parameters":[{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Email V1 Notifications Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/internal/write":{"post":{"tags":["notifications"],"summary":"Write Notification","description":"Internal endpoint — platform services create per-user platform-native\nnotifications here (member.joined, billing, health…). These carry no\nsource_app (NULL → the platform brand in the bell). A PRODUCT tagging an\nevent with its own app uses `/push`, where source_app is derived from the\ncredential — see below.","operationId":"write_notification_v1_notifications_internal_write_post","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_WriteNotificationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/push":{"post":{"tags":["notifications"],"summary":"Push Notification","description":"Push an in-app notification into the unified inbox — the SA-authed front\ndoor for products (OS 1.4). A product authenticates with its pod\nServiceAccount token (no shared secret, mirrors the email and AI gateways)\nand the event lands in the same store the portal bell reads, tagged with the\noriginating app for cross-app wayfinding. `source_app` is DERIVED from the\ncredential — never self-declared — so a product can only ever speak as itself.\nSee docs/developer/SHELL_SDK.md (notifications channel).","operationId":"push_notification_v1_notifications_push_post","parameters":[{"name":"X-Product-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Product-Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_WriteNotificationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications":{"get":{"tags":["notifications"],"summary":"List Notifications","description":"Return the 50 most recent notifications for the current user.","operationId":"list_notifications_v1_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/notifications/count":{"get":{"tags":["notifications"],"summary":"Unread Count","description":"Badge count — number of unread notifications.","operationId":"unread_count_v1_notifications_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/notifications/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Mark Read","operationId":"mark_read_v1_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Mark All Read","operationId":"mark_all_read_v1_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/dev/submissions":{"get":{"summary":"List Submissions","description":"List all submissions for the authenticated user.","operationId":"list_submissions_v1_dev_submissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Submission","description":"Create a draft app submission.","operationId":"create_submission_v1_dev_submissions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/submissions/{submission_id}":{"get":{"summary":"Get Submission","description":"Get a submission owned by the authenticated user.","operationId":"get_submission_v1_dev_submissions__submission_id__get","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Submission","description":"Update a draft submission. Only allowed in 'draft' state.","operationId":"update_submission_v1_dev_submissions__submission_id__patch","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Submission","description":"Delete a draft submission.","operationId":"delete_submission_v1_dev_submissions__submission_id__delete","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/submissions/{submission_id}/submit":{"post":{"summary":"Submit For Review","description":"Transition submission from draft → submitted for platform review.","operationId":"submit_for_review_v1_dev_submissions__submission_id__submit_post","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/internal/app-ownership/{slug}":{"get":{"summary":"Internal App Ownership","description":"Which org owns an approved product slug.\n\nauth-service calls this before letting an org mint a per-product SSO\ncredential (bbas_): the org must be the submitter of an *approved*\napp_submission for the slug. Returns 404 when no approved submission claims\nit. This is the catalog authority's answer — auth-service does not read\nplatform.app_submissions directly.","operationId":"internal_app_ownership_v1_internal_app_ownership__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/submissions":{"get":{"summary":"Admin List Submissions","description":"List all submissions, optionally filtered by state.","operationId":"admin_list_submissions_v1_admin_submissions_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/submissions/{submission_id}":{"get":{"summary":"Admin Get Submission","description":"Get any submission by ID.","operationId":"admin_get_submission_v1_admin_submissions__submission_id__get","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/submissions/{submission_id}/review":{"patch":{"summary":"Admin Review Submission","description":"Review a submission. Actions:\n- begin_review: submitted → in_review\n- approve: in_review → approved (product_slug required; creates catalog entry)\n- reject: submitted|in_review → rejected\n- request_changes: in_review → draft (sends back to developer)","operationId":"admin_review_submission_v1_admin_submissions__submission_id__review_patch","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","title":"Submission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/products/{slug}/deploy":{"post":{"summary":"Deploy Product","description":"A product owner ships a build themselves (human path) — no platform-dev in\nthe loop. Verify ownership, then deploy.","operationId":"deploy_product_v1_dev_products__slug__deploy_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/products/{slug}/ci-deploy":{"post":{"summary":"Ci Deploy Product","description":"The CI path: a product's pipeline deploys on push with a product-scoped\nX-Deploy-Token (no browser session). The token authorizes only this product.","operationId":"ci_deploy_product_v1_dev_products__slug__ci_deploy_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"X-Deploy-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Deploy-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/products/{slug}/deploy-tokens":{"post":{"summary":"Create Deploy Token","description":"Mint a product-scoped deploy token. Returned once, in plaintext — store it.","operationId":"create_deploy_token_v1_dev_products__slug__deploy_tokens_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeployTokenRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Deploy Tokens","operationId":"list_deploy_tokens_v1_dev_products__slug__deploy_tokens_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dev/products/{slug}/deploy-tokens/{token_id}":{"delete":{"summary":"Revoke Deploy Token","operationId":"revoke_deploy_token_v1_dev_products__slug__deploy_tokens__token_id__delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/products/deployable":{"get":{"tags":["admin-deploy"],"summary":"List Deployable","description":"Per external product: running sha, pinned tag, drift, and last smoke.","operationId":"list_deployable_v1_admin_products_deployable_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/products/{slug}/builds":{"get":{"tags":["admin-deploy"],"summary":"List Builds","description":"Available sha-* builds for a product (best-effort; tags/list is readable\nbut not reliably time-ordered under the current creds, so newest-first is\napproximated by reverse-lexical). The operator can also type a sha.","operationId":"list_builds_v1_admin_products__slug__builds_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/products/{slug}/deploy":{"post":{"tags":["admin-deploy"],"summary":"Deploy","description":"Promote a product to a specific build. Existence-gated + actor-stamped.","operationId":"deploy_v1_admin_products__slug__deploy_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/usage":{"get":{"tags":["usage"],"summary":"Admin Usage","description":"Per-customer usage by meter + our variable cost, newest-spend first.\nThe UI joins each org_id with its plan to show spend + margin.","operationId":"admin_usage_v1_admin_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/meter-rates":{"get":{"tags":["usage"],"summary":"List Meter Rates","description":"Editable per-model token rates (micros per million tokens).","operationId":"list_meter_rates_v1_admin_meter_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/meter-rates/{model}":{"put":{"tags":["usage"],"summary":"Set Meter Rate","description":"Update (or create) a model's rate. Takes effect within the ledger's 60s\nrate cache — applies to FUTURE events; past cost_micros is immutable.","operationId":"set_meter_rate_v1_admin_meter_rates__model__put","parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/me":{"get":{"tags":["usage"],"summary":"My Usage","description":"The CALLER'S org usage by meter — transparency only, NO cost.","operationId":"my_usage_v1_usage_me_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ready":{"get":{"summary":"Ready","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AIMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"title":"Content"}},"type":"object","required":["role","content"],"title":"AIMessage"},"AIMessagesRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"messages":{"items":{"$ref":"#/components/schemas/AIMessage"},"type":"array","title":"Messages"},"system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System"},"max_tokens":{"type":"integer","minimum":1.0,"title":"Max Tokens","default":1024},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"}},"type":"object","required":["org_id","messages"],"title":"AIMessagesRequest"},"Body_upload_org_document_v1_org_documents_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"display_name":{"type":"string","title":"Display Name","default":""}},"type":"object","required":["file"],"title":"Body_upload_org_document_v1_org_documents_post"},"BonusGrantRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"resource":{"type":"string","title":"Resource"},"bonus_amount":{"type":"integer","title":"Bonus Amount"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["org_id","resource","bonus_amount"],"title":"BonusGrantRequest"},"ConsumeRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"resource":{"type":"string","title":"Resource"},"amount":{"type":"integer","title":"Amount","default":1},"product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Id"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["org_id","resource"],"title":"ConsumeRequest"},"ConsumeResponse":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"used":{"type":"integer","title":"Used"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"},"resource":{"type":"string","title":"Resource"},"period":{"type":"string","title":"Period"},"reset_at":{"type":"string","title":"Reset At"}},"type":"object","required":["allowed","used","limit","remaining","resource","period","reset_at"],"title":"ConsumeResponse"},"CreateDeployTokenRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"CreateDeployTokenRequest"},"CreateShareTokenRequest":{"properties":{"shared_object_id":{"type":"string","title":"Shared Object Id"},"expires_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires Hours"}},"type":"object","required":["shared_object_id"],"title":"CreateShareTokenRequest"},"DeployBody":{"properties":{"image_tag":{"type":"string","maxLength":128,"minLength":1,"title":"Image Tag"}},"type":"object","required":["image_tag"],"title":"DeployBody"},"DeployRequest":{"properties":{"image_tag":{"type":"string","title":"Image Tag"}},"type":"object","required":["image_tag"],"title":"DeployRequest"},"DeprovisionRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","title":"DeprovisionRequest"},"DispatchEventRequest":{"properties":{"event_type":{"type":"string","title":"Event Type"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["event_type","payload"],"title":"DispatchEventRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LifecycleUpdateRequest":{"properties":{"lifecycle_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifecycle State"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience"},"assignment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignment Mode"},"operational_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operational Mode"}},"type":"object","title":"LifecycleUpdateRequest"},"ProductUpsertRequest":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"frontend_url":{"type":"string","title":"Frontend Url"},"api_url":{"type":"string","title":"Api Url"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"color":{"type":"string","title":"Color","default":"#6366f1"},"lifecycle_state":{"type":"string","title":"Lifecycle State","default":"sandbox"},"visibility":{"type":"string","title":"Visibility","default":"hidden"},"assignment_mode":{"type":"string","title":"Assignment Mode","default":"disabled"},"audience":{"type":"string","title":"Audience","default":"internal_only"},"operational_mode":{"type":"string","title":"Operational Mode","default":"normal"},"storage_mode":{"type":"string","title":"Storage Mode","default":"none"},"storage_kinds":{"items":{"type":"string"},"type":"array","title":"Storage Kinds","default":[]},"shared_capabilities":{"items":{"type":"string"},"type":"array","title":"Shared Capabilities","default":[]},"is_platform_native":{"type":"boolean","title":"Is Platform Native","default":false},"sort_order":{"type":"string","title":"Sort Order","default":"50"}},"type":"object","required":["id","name","frontend_url","api_url"],"title":"ProductUpsertRequest"},"ProvisionListItem":{"properties":{"product_id":{"type":"string","title":"Product Id"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"},"namespace":{"type":"string","title":"Namespace"},"port":{"type":"integer","title":"Port"},"provisioned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisioned At"}},"type":"object","required":["product_id","display_name","status","namespace","port","provisioned_at"],"title":"ProvisionListItem"},"ProvisionResponse":{"properties":{"product_id":{"type":"string","title":"Product Id"},"status":{"type":"string","title":"Status"},"namespace":{"type":"string","title":"Namespace"},"redis_url":{"type":"string","title":"Redis Url"},"redis_key_prefix":{"type":"string","title":"Redis Key Prefix"},"minio_bucket":{"type":"string","title":"Minio Bucket"},"minio_access_key":{"type":"string","title":"Minio Access Key"},"minio_secret_key":{"type":"string","title":"Minio Secret Key"},"redpanda_bootstrap":{"type":"string","title":"Redpanda Bootstrap"},"redpanda_topics":{"items":{"type":"string"},"type":"array","title":"Redpanda Topics"},"product_url":{"type":"string","title":"Product Url"},"api_url":{"type":"string","title":"Api Url"},"provisioned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisioned At"},"provisioned_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisioned By"},"db_cluster_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Db Cluster Status"},"smoke_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smoke Status"},"smoke_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smoke Version"},"smoke_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smoke At"},"smoke_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Smoke Report"},"next_steps":{"items":{"type":"string"},"type":"array","title":"Next Steps"}},"type":"object","required":["product_id","status","namespace","redis_url","redis_key_prefix","minio_bucket","minio_access_key","minio_secret_key","redpanda_bootstrap","redpanda_topics","product_url","api_url","provisioned_at","provisioned_by","next_steps"],"title":"ProvisionResponse"},"PublishRecordRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"source_product":{"type":"string","title":"Source Product"},"record_type":{"type":"string","title":"Record Type"},"source_ref":{"type":"string","title":"Source Ref"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"summary_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Text"},"app_href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Href"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"type":"string","title":"Status","default":"active"}},"type":"object","required":["org_id","source_product","record_type","source_ref","title"],"title":"PublishRecordRequest"},"RateBody":{"properties":{"input_micros_per_mtok":{"type":"integer","minimum":0.0,"title":"Input Micros Per Mtok"},"output_micros_per_mtok":{"type":"integer","minimum":0.0,"title":"Output Micros Per Mtok"}},"type":"object","required":["input_micros_per_mtok","output_micros_per_mtok"],"title":"RateBody"},"RegisterObjectRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"source_product":{"type":"string","title":"Source Product"},"storage_kind":{"type":"string","title":"Storage Kind"},"display_name":{"type":"string","title":"Display Name"},"source_ref":{"type":"string","title":"Source Ref"},"object_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Uri"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["org_id","source_product","storage_kind","display_name","source_ref"],"title":"RegisterObjectRequest"},"RegisterWebhookRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"}},"type":"object","required":["url","event_types"],"title":"RegisterWebhookRequest"},"RegisterWebhookResponse":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"string","title":"Product Id"},"url":{"type":"string","title":"Url"},"secret":{"type":"string","title":"Secret"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","product_id","url","secret","event_types","created_at"],"title":"RegisterWebhookResponse"},"ReviewRequest":{"properties":{"action":{"type":"string","title":"Action"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"product_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Slug"}},"type":"object","required":["action"],"title":"ReviewRequest"},"SendEmailRequest":{"properties":{"type":{"type":"string","title":"Type"},"to":{"type":"string","title":"To"},"data":{"additionalProperties":true,"type":"object","title":"Data","default":{}},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},"type":"object","required":["type","to"],"title":"SendEmailRequest"},"SubmissionCreate":{"properties":{"name":{"type":"string","title":"Name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"sso_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sso Url"},"health_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Health Url"},"bootstrap_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bootstrap Url"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","required":["name"],"title":"SubmissionCreate"},"SubmissionUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"website_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Url"},"sso_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sso Url"},"health_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Health Url"},"bootstrap_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bootstrap Url"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","title":"SubmissionUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookListItem":{"properties":{"id":{"type":"string","title":"Id"},"product_id":{"type":"string","title":"Product Id"},"url":{"type":"string","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"is_active":{"type":"boolean","title":"Is Active"},"failure_count":{"type":"integer","title":"Failure Count"},"last_triggered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Triggered At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","product_id","url","event_types","is_active","failure_count","last_triggered_at","created_at"],"title":"WebhookListItem"},"_WriteNotificationRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Url"}},"type":"object","required":["user_id","kind","title"],"title":"_WriteNotificationRequest"},"app__routes__infra__ProvisionRequest":{"properties":{"product_id":{"type":"string","title":"Product Id"},"display_name":{"type":"string","title":"Display Name"},"redis_db_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Redis Db Index"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"split_web":{"type":"boolean","title":"Split Web","default":false}},"type":"object","required":["product_id","display_name"],"title":"ProvisionRequest"},"app__routes__quota__ProvisionRequest":{"properties":{"org_id":{"type":"string","title":"Org Id"},"quotas":{"additionalProperties":{"type":"integer"},"type":"object","title":"Quotas"},"reset_usage":{"type":"boolean","title":"Reset Usage","default":true}},"type":"object","required":["org_id","quotas"],"title":"ProvisionRequest"}}}}