{"openapi":"3.1.0","info":{"title":"SystemPrompt Management API","description":"Multi-tenant management API for SystemPrompt platform","contact":{"name":"SystemPrompt Support","email":"support@systemprompt.io"},"license":{"name":"Proprietary"},"version":"1.0.0"},"servers":[{"url":"https://api-sandbox.systemprompt.io","description":"Sandbox environment"},{"url":"https://api.systemprompt.io","description":"Production environment"}],"paths":{"/":{"get":{"tags":["Discovery"],"operationId":"root","responses":{"200":{"description":"API discovery information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiDiscovery"}}}}}}},"/health":{"get":{"tags":["Health"],"operationId":"health_check","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/ready":{"get":{"tags":["Health"],"operationId":"readiness_check","responses":{"200":{"description":"Service is ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedHealthResponse"}}}},"503":{"description":"Service is not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedHealthResponse"}}}}}}}},"components":{"schemas":{"ApiContact":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"ApiDiscovery":{"type":"object","required":["name","version","description","documentation","endpoints","contact"],"properties":{"contact":{"$ref":"#/components/schemas/ApiContact"},"description":{"type":"string"},"documentation":{"type":"string"},"endpoints":{"$ref":"#/components/schemas/ApiEndpoints"},"name":{"type":"string"},"version":{"type":"string"}}},"ApiEndpoints":{"type":"object","required":["health","ready","openapi","auth","customers","tenants"],"properties":{"auth":{"type":"string"},"customers":{"type":"string"},"health":{"type":"string"},"openapi":{"type":"string"},"ready":{"type":"string"},"tenants":{"type":"string"}}},"ComponentHealth":{"type":"object","required":["status"],"properties":{"latency_ms":{"type":["integer","null"],"format":"int64","minimum":0},"message":{"type":["string","null"]},"status":{"type":"string"}}},"ComponentsHealth":{"type":"object","required":["database"],"properties":{"database":{"$ref":"#/components/schemas/ComponentHealth"},"fly":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ComponentHealth"}]}}},"DetailedHealthResponse":{"type":"object","required":["status","version","components"],"properties":{"components":{"$ref":"#/components/schemas/ComponentsHealth"},"status":{"type":"string"},"version":{"type":"string"}}},"ErrorCode":{"type":"string","enum":["bad_request","unauthorized","forbidden","not_found","conflict","validation_error","rate_limited","internal_error","service_unavailable","not_implemented"]},"ErrorDetail":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string"},"details":{"type":["string","null"]},"message":{"type":"string"},"path":{"type":["string","null"]},"request_id":{"type":["string","null"],"format":"uuid"},"timestamp":{"type":"string","format":"date-time"},"validation_errors":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ValidationError"}}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"HealthResponse":{"type":"object","required":["status","version"],"properties":{"status":{"type":"string"},"version":{"type":"string"}}},"PaginationInfo":{"type":"object","required":["total","page","per_page","total_pages","has_next","has_prev"],"properties":{"base_url":{"type":["string","null"]},"has_next":{"type":"boolean"},"has_prev":{"type":"boolean"},"page":{"type":"integer","format":"int64"},"per_page":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"},"total_pages":{"type":"integer","format":"int64"}}},"ResponseLinks":{"type":"object","properties":{"docs":{"type":["string","null"]},"next":{"type":["string","null"]},"prev":{"type":["string","null"]},"self":{"type":["string","null"]}}},"ResponseMeta":{"type":"object","required":["request_id","timestamp","version"],"properties":{"pagination":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PaginationInfo"}]},"request_id":{"type":"string","format":"uuid"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"}}},"ValidationError":{"type":"object","required":["field","message"],"properties":{"code":{"type":["string","null"]},"field":{"type":"string"},"message":{"type":"string"}}}}},"tags":[{"name":"Discovery","description":"API discovery and documentation endpoints"},{"name":"Health","description":"Health and readiness check endpoints"},{"name":"Auth","description":"Authentication and token management"},{"name":"OAuth","description":"OAuth provider integration"},{"name":"Customers","description":"Customer management"},{"name":"Tenants","description":"Tenant management"},{"name":"Subscriptions","description":"Subscription management"},{"name":"Secrets","description":"Secret management for tenants"},{"name":"Monitoring","description":"Metrics and monitoring"},{"name":"Webhooks","description":"Webhook handling"}]}