{"openapi":"3.0.3","info":{"title":"Centrali Workspace Service API","version":"5.1.2","description":"API documentation for the Centrali Workspace Service - Workspace management, billing, usage tracking, and subscription handling.","contact":{"name":"Centrali Support"}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained from the IAM service"}},"schemas":{"def-0":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["active","suspended","cancelled"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"title":"Workspace"},"def-1":{"type":"object","properties":{"workspace_id":{"type":"string","format":"uuid"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"records_count":{"type":"integer"},"storage_bytes":{"type":"integer"},"function_invocations":{"type":"integer"},"api_calls":{"type":"integer"}},"title":"Usage"},"def-2":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"price_monthly":{"type":"number"},"price_yearly":{"type":"number"},"limits":{"type":"object","properties":{"records":{"type":"integer"},"storage_gb":{"type":"integer"},"function_invocations":{"type":"integer"},"api_calls_per_month":{"type":"integer"}}}},"title":"Plan"},"def-3":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"amount":{"type":"number"},"currency":{"type":"string","example":"USD"},"status":{"type":"string","enum":["draft","open","paid","void","uncollectible"]},"invoice_date":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"},"pdf_url":{"type":"string","format":"uri"}},"title":"Invoice"},"def-4":{"type":"object","required":["error","message","status","timestamp","path"],"properties":{"error":{"type":"string","example":"WORKSPACE_NOT_FOUND","description":"Machine-readable error code"},"message":{"type":"string","example":"Workspace not found","description":"Human-readable error message"},"status":{"type":"integer","example":404,"description":"HTTP status code"},"timestamp":{"type":"string","format":"date-time","example":"2026-03-02T10:00:00.000Z"},"path":{"type":"string","example":"/api/v1/workspaces/my-ws","description":"Request path"},"requestId":{"type":"string","description":"Optional request ID for tracing"}},"title":"Error"}}},"paths":{"/metrics":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/{slug}":{"get":{"tags":["Workspaces"],"description":"Get workspace details","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true,"description":"Workspace slug"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}},"put":{"tags":["Workspaces"],"description":"Update workspace settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}},"delete":{"tags":["Workspaces"],"description":"Delete a workspace (soft delete with grace period)","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"workspace_slug":{"type":"string"},"deleted_at":{"type":"string"},"restore_deadline":{"type":"string"},"grace_period_days":{"type":"number"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/provision-status":{"get":{"tags":["Workspaces"],"description":"Get workspace provisioning status","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"workspace_slug":{"type":"string"},"status":{"type":"string"},"services":{"type":"object","additionalProperties":{"type":"string"}},"updated_at":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/provision-status/retry":{"post":{"tags":["Workspaces"],"description":"Retry provisioning a failed service","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name to retry"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"workspace_slug":{"type":"string"},"service":{"type":"string"},"status":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/delete":{"post":{"tags":["Workspaces"],"description":"Request workspace deletion with 30-day grace period","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"workspace_slug":{"type":"string"},"deleted_at":{"type":"string"},"restore_deadline":{"type":"string"},"grace_period_days":{"type":"number"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/restore":{"post":{"tags":["Workspaces"],"description":"Restore a workspace from pending deletion","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"workspace_slug":{"type":"string"},"status":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/":{"post":{"tags":["Workspaces"],"description":"Create a new workspace","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","email","username"],"properties":{"name":{"type":"string","description":"Workspace display name"},"email":{"type":"string","format":"email","description":"Owner email address"},"password":{"type":"string","description":"Owner password"},"username":{"type":"string","description":"Owner username"},"passwordConfirmation":{"type":"string","description":"Password confirmation"},"description":{"type":"string"}}}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"plan":{"type":"string"},"created_at":{"type":"string"}}},"auth_token":{"type":"string"},"user_id":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/export":{"get":{"tags":["Workspaces"],"description":"Get latest active or recently completed export job","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"progress":{"type":"object","additionalProperties":true},"downloadUrl":{"type":["string","null"]},"downloadExpiresAt":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string"}}},{"type":"null"}]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}},"post":{"tags":["Workspaces"],"description":"Request a full workspace data export","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/export/{jobId}":{"get":{"tags":["Workspaces"],"description":"Get export job status and download URL","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"jobId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"progress":{"type":"object","additionalProperties":true},"downloadUrl":{"type":["null","string"]},"downloadExpiresAt":{"type":["null","string"]},"errorMessage":{"type":["null","string"]},"createdAt":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/version":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/{slug}/support-issues":{"post":{"tags":["Support"],"description":"Create a support issue","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["title","description"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["bug","feature-request","question"],"default":"question"},"priority":{"type":"string","enum":["low","medium","high","urgent"],"default":"medium"},"category":{"type":"string"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"summary":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"priority":{"type":"string"},"status":{"type":"string"},"workspaceSlug":{"type":"string"},"createdBy":{"type":"string"},"assignedTo":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}}}}},"get":{"tags":["Support"],"description":"List support issues","parameters":[{"schema":{"type":"integer","default":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","default":20},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["open","in_progress","resolved","closed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/{slug}/support-issues/{id}":{"get":{"tags":["Support"],"description":"Get a support issue by ID","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"tags":["Support"],"description":"Update a support issue","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["open","in_progress","resolved","closed"]},"priority":{"type":"string","enum":["low","medium","high","urgent"]}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/{slug}/support-issues/{id}/comments":{"get":{"tags":["Support"],"description":"List comments on a support issue","parameters":[{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"integer","default":20},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"tags":["Support"],"description":"Add a comment to a support issue","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["comment"],"properties":{"comment":{"type":"string"},"type":{"type":"string","default":"comment"},"displayName":{"type":"string"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/{slug}/support-issues/{id}/comments/{commentId}":{"get":{"tags":["Support"],"description":"Get a specific comment","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"commentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"tags":["Support"],"description":"Update a comment","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"commentId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"tags":["Support"],"description":"Delete a comment","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"commentId","required":true}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/usage/current":{"get":{"tags":["Usage"],"description":"Get current billing period usage","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/usage/historical":{"get":{"tags":["Usage"],"description":"Get historical usage data","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"startDate","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"endDate","required":false},{"schema":{"type":"string","enum":["day","week","month"]},"in":"query","name":"granularity","required":false},{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/usage/{billingPeriod}":{"get":{"tags":["Usage"],"description":"Get usage for a specific billing period","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"billingPeriod","required":true,"description":"Billing period (e.g., 2024-01)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/invoice/{invoiceId}":{"get":{"tags":["Invoices"],"description":"Get a specific invoice","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"invoiceId","required":true,"description":"Invoice ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/invoices":{"get":{"tags":["Invoices"],"description":"List all invoices","parameters":[{"schema":{"type":"integer","default":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","default":20},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["draft","open","paid","void","uncollectible"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/webhooks/stripe":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/{slug}/plan":{"get":{"tags":["Plans"],"description":"Get current plan information","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"currentPlan":{"type":"string"},"availablePlans":{"type":"array","items":{"type":"string"}},"quota":{"type":"object","properties":{"storageMB":{"type":"number"},"computeExecutions":{"type":"number"},"smartQueries":{"type":"number"}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/plan/{newPlan}":{"patch":{"tags":["Plans"],"description":"Update workspace plan","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"newPlan","required":true,"description":"New plan ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/create-setup-session":{"post":{"tags":["Billing"],"description":"Create Stripe setup session for adding payment method","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"clientSecret":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/payment-methods":{"get":{"tags":["Billing"],"description":"List payment methods","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/payment-methods/{pmId}":{"delete":{"tags":["Billing"],"description":"Delete a payment method","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"pmId","required":true,"description":"Payment method ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/payment-methods/{pmId}/default":{"post":{"tags":["Billing"],"description":"Set payment method as default","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true},{"schema":{"type":"string"},"in":"path","name":"pmId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/payment-methods/default":{"get":{"tags":["Billing"],"description":"Get default payment method","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/{slug}/public-key":{"get":{"tags":["Billing"],"description":"Get Stripe public key","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/overage":{"get":{"tags":["Billing"],"description":"Get overage billing settings","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"overageEnabled":{"type":"boolean"},"overageSpendingCapCents":{"type":["null","integer"]},"hasDefaultPaymentMethod":{"type":"boolean"},"overageRates":{"oneOf":[{"type":"object","properties":{"executions":{"type":"number"},"cpuSeconds":{"type":"number"},"memoryGbSeconds":{"type":"number"},"storagePerGb":{"type":"number"},"blobStoragePerGb":{"type":"number"}}},{"type":"null"}]}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}},"patch":{"tags":["Billing"],"description":"Enable or disable overage billing","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overageEnabled":{"type":"boolean"},"overageSpendingCapCents":{"type":["integer","null"]}},"required":["overageEnabled"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"overageEnabled":{"type":"boolean"},"overageSpendingCapCents":{"type":["null","integer"]},"overageEnabledAt":{"type":["null","string"]}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/audit/export":{"get":{"tags":["Audit Log"],"description":"Export audit events as CSV","parameters":[{"schema":{"type":"string"},"in":"query","name":"resourceType","required":false},{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"type":"string"},"in":"query","name":"actorId","required":false},{"schema":{"type":"string"},"in":"query","name":"dateFrom","required":false},{"schema":{"type":"string"},"in":"query","name":"dateTo","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"path","name":"slug","required":true,"description":"Workspace slug"}],"responses":{"200":{"description":"Default Response"}}}},"/{slug}/audit/activity":{"get":{"tags":["Audit Log"],"description":"Get recent audit activity across the workspace","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Cursor from previous page (entry ID)"},{"schema":{"type":"string"},"in":"query","name":"resourceType","required":false,"description":"Filter by resource type"},{"schema":{"type":"string"},"in":"query","name":"type","required":false,"description":"Filter by event type"},{"schema":{"type":"string"},"in":"query","name":"actorId","required":false,"description":"Filter by actor ID"},{"schema":{"type":"string"},"in":"query","name":"dateFrom","required":false,"description":"Filter from date (ISO 8601)"},{"schema":{"type":"string"},"in":"query","name":"dateTo","required":false,"description":"Filter to date (ISO 8601)"},{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Search in summary and resource ID"},{"schema":{"type":"string"},"in":"path","name":"slug","required":true,"description":"Workspace slug"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array"},"nextCursor":{"type":["null","string"]},"hasMore":{"type":"boolean"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/audit/{resourceType}/{resourceId}/history":{"get":{"tags":["Audit Log"],"description":"Get audit history for a specific resource","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Cursor from previous page (entry ID)"},{"schema":{"type":"string"},"in":"path","name":"slug","required":true,"description":"Workspace slug"},{"schema":{"type":"string"},"in":"path","name":"resourceType","required":true,"description":"Resource type (e.g. structure, function, user)"},{"schema":{"type":"string"},"in":"path","name":"resourceId","required":true,"description":"Resource ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array"},"nextCursor":{"type":["null","string"]},"hasMore":{"type":"boolean"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/overview":{"get":{"tags":["Workspaces"],"description":"Get aggregated workspace overview with stats from all services","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true,"description":"Workspace slug"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"structures":{"type":["null","object"],"properties":{"total":{"type":"number"},"recentlyCreated":{"type":"number"}}},"records":{"type":["null","object"],"properties":{"total":{"type":"number"},"createdToday":{"type":"number"}}},"users":{"type":["null","object"],"properties":{"total":{"type":"number"},"activeThisWeek":{"type":"number"}}},"storage":{"type":["null","object"],"properties":{"usedBytes":{"type":"number"},"fileCount":{"type":"number"}}},"compute":{"type":["null","object"],"properties":{"functionsTotal":{"type":"number"},"runsToday":{"type":"number"},"failedToday":{"type":"number"}}},"scheduler":{"type":["null","object"],"properties":{"activeJobs":{"type":"number"},"failedToday":{"type":"number"}}},"recentActivity":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":"string"},"actorId":{"type":"string"},"summary":{"type":"string"},"at":{"type":"string"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/{slug}/capabilities":{"get":{"tags":["Workspaces"],"description":"Get workspace feature capabilities based on the current plan","parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true,"description":"Workspace slug"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string"},"capabilities":{"type":"object","properties":{"ai":{"type":"object","properties":{"enabled":{"type":"boolean"},"validation":{"type":"boolean"},"anomalyInsights":{"type":"boolean"}}},"compute":{"type":"object","properties":{"enabled":{"type":"boolean"},"orchestrations":{"type":"boolean"}}},"scheduler":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"storage":{"type":"object","properties":{"enabled":{"type":"boolean"},"maxFileSizeBytes":{"type":"number"}}},"search":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"billing":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"advancedRbac":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"supportTickets":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"backups":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/def-4"}}}}}}},"/openapi.json":{"get":{"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://api.centrali.io/workspace/api/v1","description":"Workspace Service API"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Workspaces","description":"Workspace management operations"},{"name":"Usage","description":"Usage tracking and metrics"},{"name":"Billing","description":"Billing and subscription management"},{"name":"Plans","description":"Subscription plans"},{"name":"Invoices","description":"Invoice management"},{"name":"Support","description":"Support issue management"}]}