{"openapi":"3.0.3","info":{"title":"CreatorOS Public API","version":"1.0.0","description":"Tenant-scoped REST API. Authenticate with `Authorization: Bearer cos_…`. Lists return `{data, meta:{page,per_page,total,pages}}`; errors return `{error, message}`."},"servers":[{"url":"https://krunc.com/api/v1"}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"cos_…"}}},"paths":{"/me":{"get":{"summary":"Current tenant and key","security":[{"ApiKey":[]}],"responses":{"200":{"description":"OK"}}}},"/profiles":{"get":{"summary":"List creator profiles","security":[{"ApiKey":[]}],"description":"Requires scope `read:profile`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}}]}},"/products":{"get":{"summary":"List active products","security":[{"ApiKey":[]}],"description":"Requires scope `read:store`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}}]},"post":{"summary":"Create a product","security":[{"ApiKey":[]}],"description":"Requires scope `write:store`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","price_cents"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["one_time","recurring"]},"price_cents":{"type":"integer"},"currency":{"type":"string"},"interval":{"type":"string","enum":["month","year"]},"deliverables":{"type":"array","items":{"type":"object"}},"is_active":{"type":"boolean"}}}}}}}},"/orders":{"get":{"summary":"List orders","security":[{"ApiKey":[]}],"description":"Requires scope `read:orders`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"status","in":"query","schema":{"type":"string"}}]}},"/orders/{id}":{"get":{"summary":"Order with items and entitlements","security":[{"ApiKey":[]}],"description":"Requires scope `read:orders`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/servers":{"get":{"summary":"List game servers","security":[{"ApiKey":[]}],"description":"Requires scope `read:servers`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}}]}},"/servers/{id}/status":{"get":{"summary":"Public live status (counts + privacy-safe zone aggregates)","security":[{"ApiKey":[]}],"description":"Requires scope `read:servers`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/members":{"get":{"summary":"List members (display name + role only)","security":[{"ApiKey":[]}],"description":"Requires scope `read:members`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}}]}},"/posts":{"post":{"summary":"Create a draft post","security":[{"ApiKey":[]}],"description":"Requires scope `write:posts`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"title":{"type":"string"},"body":{"type":"string"},"scheduled_at":{"type":"string","format":"date-time"},"media":{"type":"array","items":{"type":"string"}}}}}}}}},"/analytics/summary":{"get":{"summary":"Revenue, orders, subscribers, audience, daily rollups","security":[{"ApiKey":[]}],"description":"Requires scope `read:analytics`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"days","in":"query","schema":{"type":"integer","default":30}}]}},"/webhooks":{"get":{"summary":"List outbound webhooks","security":[{"ApiKey":[]}],"description":"Requires scope `webhooks`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}}},"post":{"summary":"Register an outbound webhook (secret returned once)","security":[{"ApiKey":[]}],"description":"Requires scope `webhooks`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","order.paid","order.refunded","subscription.created","subscription.canceled","entitlement.granted","entitlement.revoked","member.joined","stream.started","stream.ended","server.online","server.offline","post.published","automation.run","report.created"]}}}}}}}}},"/webhooks/{id}":{"delete":{"summary":"Delete a webhook","security":[{"ApiKey":[]}],"description":"Requires scope `webhooks`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}},"/webhooks/{id}/enable":{"post":{"summary":"Re-enable a webhook disabled after repeated failures","security":[{"ApiKey":[]}],"description":"Requires scope `webhooks`.","responses":{"200":{"description":"OK"},"401":{"description":"Invalid key"},"403":{"description":"Missing scope"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}]}}}}