{"openapi":"3.0.0","info":{"title":"Qaldy control plane","version":"1.0.0","description":"Public REST contract (docs/api/routes.md). Internal gate routes: crates/qaldy-gate/INTERNAL_API.md."},"components":{"securitySchemes":{"QaldyKey":{"type":"http","scheme":"bearer","description":"A project key. qk_sec_… is for servers: it is limited by its scopes (rows:read, rows:write, schema:write) and table list, not by row rules. qk_pub_… is for browsers: every request is checked against the table rules for a visitor, or for the signed-in person whose token is sent as the Bearer next to the key in an apikey header."}},"schemas":{},"parameters":{}},"paths":{"/v1/projects/{projectId}/schema":{"get":{"summary":"Tables and typed columns the caller may use (a visitor or signed-in person sees only what the rules give them)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"}],"responses":{"200":{"description":"Schema","content":{"application/json":{"schema":{"type":"object","properties":{"tables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}}},"required":["tables"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/projects/{projectId}/schema/tables":{"post":{"summary":"Create a table (secret key with schema:write; it starts private)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean","default":true}},"required":["name","type"]},"maxItems":64,"default":[]},"publicRead":{"type":"boolean","default":false},"confirmPublic":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/projects/{projectId}/schema/tables/{table}/columns":{"post":{"summary":"Add a column (secret key with schema:write)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean","default":true}},"required":["name","type"]}}}},"responses":{"201":{"description":"Table","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/projects/{projectId}/rest/{table}":{"get":{"summary":"List rows the caller may see","description":"Filters: `?column=op.value` with eq, neq, gt, gte, lt, lte, like, ilike (`*` wildcard), `in.(a,b)` and `is.null|true|false`. `select=a,b`, `order=col.desc`, `limit` (≤ 1000, default 100) and `offset`. `Prefer: count=exact` adds `Content-Range`. A caller under row rules gets only their rows and columns; filtering or sorting by a column they cannot see on every row is refused (column_not_filterable), and a column they cannot see at all reads as no such column.","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"}],"responses":{"200":{"description":"Rows","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Insert one row or up to 500 (all or nothing; rows:write, and a rule for the caller)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"},{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"},"minItems":1,"maxItems":500}]}}}},"responses":{"201":{"description":"Inserted row(s)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Update every row matching ≥ 1 filter (rows:write, and a rule for the caller)","description":"Filters: `?column=op.value` with eq, neq, gt, gte, lt, lte, like, ilike (`*` wildcard), `in.(a,b)` and `is.null|true|false`. `select=a,b`, `order=col.desc`, `limit` (≤ 1000, default 100) and `offset`. `Prefer: count=exact` adds `Content-Range`.","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Delete every row matching ≥ 1 filter (rows:write, and a rule for the caller)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/projects/{projectId}/rest/{table}/{id}":{"get":{"summary":"One row","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"},{"schema":{"type":"string","pattern":"^\\d+$","description":"Row id"},"required":true,"description":"Row id","name":"id","in":"path"}],"responses":{"200":{"description":"Row","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Update one row (rows:write, and a rule for the caller)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"},{"schema":{"type":"string","pattern":"^\\d+$","description":"Row id"},"required":true,"description":"Row id","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Delete one row (rows:write, and a rule for the caller)","tags":["backend data API"],"security":[{"QaldyKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Backend project id"},"required":true,"description":"Backend project id","name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48,"description":"Table name"},"required":true,"description":"Table name","name":"table","in":"path"},{"schema":{"type":"string","pattern":"^\\d+$","description":"Row id"},"required":true,"description":"Row id","name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true},"description":"A row: column name → value"}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/session":{"get":{"summary":"Who is signed in","tags":["session"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"workspaceId":{"type":"string","minLength":1},"workspaceRole":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"devLogin":{"type":"boolean"}},"required":["user","workspaceId","workspaceRole","devLogin"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/auth/logout":{"post":{"summary":"Sign out","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/world":{"get":{"summary":"The City: WorldSnapshot of a workspace, filtered to apps you can view","tags":["world"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"seq":{"type":"integer","minimum":0},"generatedAt":{"type":"string","format":"date-time"},"demo":{"type":"boolean"},"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]},"cell":{"type":"string","enum":["global","eu","kz"]},"locale":{"type":"string","enum":["en","ru","kk"]},"timezone":{"type":"string","minLength":1},"hourlyCostMinor":{"type":"integer","minimum":0},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"memberCount":{"type":"integer","minimum":0}},"required":["id","slug","name","profile","cell","locale","timezone","hourlyCostMinor","currency","memberCount"]},"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"districts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"type":"string","enum":["team","purpose"]}},"required":["id","name","kind"]}},"gates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"side":{"type":"string","enum":["north","east","south","west"]},"plot":{"type":"object","nullable":true,"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]}},"required":["id","connectorId","displayName","status","side","plot"]}},"buildings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]},"plot":{"type":"object","nullable":true,"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]},"footprint":{"type":"object","properties":{"w":{"type":"integer","minimum":1,"maximum":2},"h":{"type":"integer","minimum":1,"maximum":2}},"required":["w","h"]},"level":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]}]},"sharing":{"type":"string","enum":["private","shared","workspace","public"]},"districtId":{"type":"string","nullable":true},"trustScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"runsTotal":{"type":"integer","minimum":0},"runsThisMonth":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"kpi":{"type":"object","nullable":true,"properties":{"label":{"type":"string","minLength":1},"unit":{"type":"string"},"value":{"type":"number"},"series":{"type":"array","items":{"type":"number"},"maxItems":64}},"required":["label","unit","value","series"]},"rows":{"type":"integer","nullable":true,"minimum":0},"construction":{"type":"object","nullable":true,"properties":{"step":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"label":{"type":"string"}},"required":["step","totalSteps","label"]},"failure":{"type":"object","nullable":true,"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"since":{"type":"string","format":"date-time"}},"required":["code","message","since"]},"viewers":{"type":"integer","minimum":0},"pendingApprovals":{"type":"integer","minimum":0},"connectors":{"type":"array","items":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"manualMinutesPerRun":{"type":"number","minimum":0},"createdBy":{"type":"string","minLength":1},"currentVersionId":{"type":"string","nullable":true}},"required":["id","slug","name","description","archetype","category","status","plot","footprint","level","sharing","districtId","trustScore","runsTotal","runsThisMonth","lastRunAt","nextRunAt","kpi","rows","construction","failure","viewers","pendingApprovals","connectors","manualMinutesPerRun","createdBy","currentVersionId"]}},"roads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]}},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["active","paused","failing"]},"path":{"type":"array","nullable":true,"items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]}}},"required":["id","name","from","to","via","category","trigger","status","path"]}},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"teamId":{"type":"string","nullable":true},"online":{"type":"boolean"},"viewing":{"type":"string","nullable":true}},"required":["id","name","initials","color","role","teamId","online","viewing"]}},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","memberIds"]}},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"requestedBy":{"type":"string","minLength":1},"requestedFrom":{"type":"string","minLength":1},"requestedAt":{"type":"string","format":"date-time"}},"required":["id","appId","runId","title","requestedBy","requestedFrom","requestedAt"]}},"roi":{"type":"object","properties":{"hoursSavedYear":{"type":"number","minimum":0},"runsYear":{"type":"integer","minimum":0},"minutesSavedMonth":{"type":"number","minimum":0},"moneySavedMinorYear":{"type":"integer","minimum":0},"trees":{"type":"integer","minimum":0}},"required":["hoursSavedYear","runsYear","minutesSavedMonth","moneySavedMinorYear","trees"]},"activeRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"startedAt":{"type":"string","format":"date-time"},"step":{"type":"integer","minimum":0}},"required":["id","appId","roadId","trigger","status","startedAt","step"]}},"capacity":{"type":"object","properties":{"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"land":{"type":"object","properties":{"entitledPlots":{"type":"integer","minimum":0},"district":{"type":"object","properties":{"w":{"type":"integer","minimum":3,"maximum":8},"h":{"type":"integer","minimum":3,"maximum":6}},"required":["w","h"]},"held":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"w":{"type":"integer","minimum":1},"h":{"type":"integer","minimum":1}},"required":["x","y","w","h"]},"maxItems":2}},"required":["entitledPlots","district","held"]},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"station":{"type":"string","enum":["turbine","turbine_large","battery_bank","silo","fuel_tank","gate_lane","road","crane_yard","reactor_dome","reactor"]},"total":{"type":"number","minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"estimate":{"type":"boolean"}},"required":["kind","status","station","total","pct","band","estimate"]},"maxItems":17},"mock":{"type":"boolean"}},"required":["plan","land","units","mock"]}},"required":["version","seq","generatedAt","demo","workspace","island","districts","gates","buildings","roads","people","teams","approvals","roi","activeRuns"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"world.get"}}},"/v1/apps/{id}":{"get":{"summary":"One app: building, manifest, version, sharing, recent runs","tags":["apps"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"building":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]},"plot":{"type":"object","nullable":true,"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]},"footprint":{"type":"object","properties":{"w":{"type":"integer","minimum":1,"maximum":2},"h":{"type":"integer","minimum":1,"maximum":2}},"required":["w","h"]},"level":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]}]},"sharing":{"type":"string","enum":["private","shared","workspace","public"]},"districtId":{"type":"string","nullable":true},"trustScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"runsTotal":{"type":"integer","minimum":0},"runsThisMonth":{"type":"integer","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"kpi":{"type":"object","nullable":true,"properties":{"label":{"type":"string","minLength":1},"unit":{"type":"string"},"value":{"type":"number"},"series":{"type":"array","items":{"type":"number"},"maxItems":64}},"required":["label","unit","value","series"]},"rows":{"type":"integer","nullable":true,"minimum":0},"construction":{"type":"object","nullable":true,"properties":{"step":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":1},"label":{"type":"string"}},"required":["step","totalSteps","label"]},"failure":{"type":"object","nullable":true,"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"since":{"type":"string","format":"date-time"}},"required":["code","message","since"]},"viewers":{"type":"integer","minimum":0},"pendingApprovals":{"type":"integer","minimum":0},"connectors":{"type":"array","items":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"manualMinutesPerRun":{"type":"number","minimum":0},"createdBy":{"type":"string","minLength":1},"currentVersionId":{"type":"string","nullable":true}},"required":["id","slug","name","description","archetype","category","status","plot","footprint","level","sharing","districtId","trustScore","runsTotal","runsThisMonth","lastRunAt","nextRunAt","kpi","rows","construction","failure","viewers","pendingApprovals","connectors","manualMinutesPerRun","createdBy","currentVersionId"]},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","minLength":1},"bundleHash":{"type":"string","minLength":1},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustReport":{"type":"object","properties":{"rubricVersion":{"type":"string","minLength":1},"score":{"type":"integer","minimum":0,"maximum":100},"band":{"type":"string","enum":["pass","review","fail"]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"passed":{"type":"boolean"},"weight":{"type":"number","minimum":0},"detail":{"type":"string"}},"required":["id","label","passed","weight","detail"]}}},"required":["rubricVersion","score","band","checks"]},"build":{"type":"object","nullable":true,"properties":{"calls":{"type":"array","items":{"type":"object","properties":{"phase":{"type":"string","enum":["plan","codegen"]},"model":{"type":"string","minLength":1,"maxLength":100},"usage":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"cacheWrite":{"type":"integer","minimum":0},"cacheRead":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0}},"required":["input","cacheWrite","cacheRead","output"]},"costUsd":{"type":"number","minimum":0}},"required":["phase","model","usage","costUsd"]},"maxItems":100},"tokens":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"cacheWrite":{"type":"integer","minimum":0},"cacheRead":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0}},"required":["input","cacheWrite","cacheRead","output"]},"costUsd":{"type":"number","minimum":0},"capUsd":{"type":"number","minimum":0},"capReached":{"type":"boolean"},"builder":{"type":"string","enum":["claude","offline"]},"model":{"type":"string","nullable":true},"turns":{"type":"integer","minimum":0},"change":{"type":"object","properties":{"kind":{"type":"string","enum":["build","edit"]},"summary":{"type":"string","minLength":1,"maxLength":300},"instruction":{"type":"string","maxLength":2000},"baseVersionId":{"type":"string","nullable":true,"minLength":1},"templateId":{"type":"string","nullable":true,"minLength":1,"maxLength":64},"changeId":{"type":"string","minLength":1,"maxLength":128}},"required":["kind","summary"]}},"required":["calls","tokens","costUsd","capUsd","capReached","builder","model","turns"]}},"required":["id","appId","createdAt","createdBy","bundleHash","trustScore","trustReport"]},"share":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"owner":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"grants":{"type":"array","items":{"type":"object","properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},{"type":"object","properties":{"kind":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberCount":{"type":"integer","minimum":0}},"required":["kind","id","name","memberCount"]}]},"role":{"type":"string","enum":["viewer","runner","editor"]}},"required":["principal","role"]}},"generalAccess":{"type":"string","enum":["restricted","team","workspace","link"]},"generalRole":{"type":"string","enum":["viewer","runner","editor"]},"teamId":{"type":"string","nullable":true},"canShare":{"type":"boolean"},"linkAllowed":{"type":"boolean"},"linkDisabledReason":{"type":"string","nullable":true,"enum":["policy","app-type","not-admin",null]},"guests":{"type":"integer","minimum":0},"publicProbe":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_check","stale","running","blocked","unavailable"]},"probeId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"maxLength":400}},"required":["state","probeId","reason"]}},"required":["appId","owner","grants","generalAccess","generalRole","teamId","canShare","linkAllowed","linkDisabledReason"]},"recentRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"integer","nullable":true,"minimum":0},"minutesSaved":{"type":"number","minimum":0},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"replayOf":{"type":"string","nullable":true}},"required":["id","workspaceId","appId","appName","roadId","roadName","trigger","status","startedAt","finishedAt","durationMs","minutesSaved","errorCode","errorMessage"]}},"url":{"type":"string","nullable":true}},"required":["building","manifest","version","share","recentRuns","url"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"apps.get"}}},"/v1/apps/{id}/runs":{"post":{"summary":"Run an app now","tags":["apps"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"held":{"type":"boolean"}},"required":["runId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"apps.run"}}},"/v1/apps/{id}/pause":{"post":{"summary":"Pause or resume an app","tags":["apps"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/move":{"post":{"summary":"Move a building to another plot","tags":["apps"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plot":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]}},"required":["plot"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/runs":{"get":{"summary":"Runs, newest first (only apps you can view)","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"array","items":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]}},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"appId","in":"query"},{"schema":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"required":false,"name":"trigger","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"integer","nullable":true,"minimum":0},"minutesSaved":{"type":"number","minimum":0},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"replayOf":{"type":"string","nullable":true}},"required":["id","workspaceId","appId","appName","roadId","roadName","trigger","status","startedAt","finishedAt","durationMs","minutesSaved","errorCode","errorMessage"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"runs.list"}}},"/v1/runs/{id}":{"get":{"summary":"One run with its step timeline","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"integer","nullable":true,"minimum":0},"minutesSaved":{"type":"number","minimum":0},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"replayOf":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"label":{"type":"string","minLength":1},"at":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"status":{"type":"string","enum":["pending","running","ok","waiting","failed","blocked","skipped"]},"startedAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"integer","nullable":true,"minimum":0},"detail":{"type":"string","nullable":true}},"required":["index","label","at","status","startedAt","durationMs","detail"]}},"explanation":{"type":"object","nullable":true,"properties":{"what":{"type":"string","minLength":1},"why":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"fix":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["reconnect","allow-domain","retry","edit-app"]},"label":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"domain":{"type":"string"}},"required":["kind","label"]},"nothingLost":{"type":"boolean"}},"required":["what","why","next","fix","nothingLost"]},"askedBy":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["agent","test"]},"toolName":{"type":"string","minLength":1,"maxLength":48},"person":{"type":"string","minLength":1,"maxLength":120},"client":{"type":"string","nullable":true,"maxLength":40}},"required":["kind","toolName","person","client"]}},"required":["id","workspaceId","appId","appName","roadId","roadName","trigger","status","startedAt","finishedAt","durationMs","minutesSaved","errorCode","errorMessage","steps","explanation"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"runs.get"}}},"/v1/runs/{id}/trace":{"get":{"summary":"What the platform recorded around a run: gate decisions and its last log lines","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"gate":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["egress.allowed","egress.blocked","connector.called","flow.blocked","flow.allowed"]},"domain":{"type":"string","minLength":1},"method":{"type":"string","minLength":1},"status":{"type":"integer","minimum":0},"reason":{"type":"string","nullable":true},"connector":{"type":"string","nullable":true},"action":{"type":"string","nullable":true},"labels":{"type":"array","items":{"type":"string","maxLength":32},"maxItems":8}},"required":["at","kind","domain","method","status","reason","connector","action"]}},"log":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"level":{"type":"string","enum":["info","warn","error"]},"source":{"type":"string","enum":["run","step","gate"]},"text":{"type":"string"}},"required":["at","level","source","text"]}},"logSource":{"type":"string","enum":["platform"]}},"required":["runId","appId","gate","log","logSource"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"runs.trace"}}},"/v1/runs/{id}/explain":{"get":{"summary":"Explain & fix: what happened, why, and the next step","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"what":{"type":"string","minLength":1},"why":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"fix":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["reconnect","allow-domain","retry","edit-app"]},"label":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"domain":{"type":"string"}},"required":["kind","label"]},"nothingLost":{"type":"boolean"}},"required":["what","why","next","fix","nothingLost"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"runs.explain"}}},"/v1/runs/{id}/ask":{"get":{"summary":"What a run did, why, and what changed since the last good run (rules; free)","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["en","ru","kk"]},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"generatedAt":{"type":"string","format":"date-time"},"locale":{"type":"string","enum":["en","ru","kk"]},"source":{"type":"string","enum":["rules","workspace_model","platform_model"]},"model":{"type":"string","nullable":true},"cached":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"failureClass":{"type":"string","nullable":true,"enum":["egress_denied","secret_missing","auth_rejected","quota","ai_budget","ai_setup","timeout","connector_rate_limited","connector_client_error","connector_server_error","schema_mismatch","runtime_unavailable","not_runnable","app_error",null]},"confidence":{"type":"string","enum":["high","medium","low"]},"headline":{"type":"string","minLength":1,"maxLength":600},"why":{"type":"string","minLength":1,"maxLength":1200},"next":{"type":"string","minLength":1,"maxLength":1200},"answer":{"type":"string","nullable":true,"maxLength":2400},"evidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":400},"maxItems":12},"whatChanged":{"type":"object","properties":{"lastGood":{"type":"object","nullable":true,"properties":{"runId":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"}},"required":["runId","at"]},"versionChanged":{"type":"boolean","nullable":true},"codeChanged":{"type":"boolean","nullable":true},"lines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":600},"maxItems":12}},"required":["lastGood","versionChanged","codeChanged","lines"]},"fix":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["reconnect","allow_egress","retry","edit_app","rollback","models","capacity"]},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"domain":{"type":"string","minLength":1,"maxLength":253},"versionId":{"type":"string","minLength":1},"versionNumber":{"type":"integer","minimum":1}},"required":["kind"]},"suggestion":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["allow_egress"]},"domain":{"type":"string","minLength":1,"maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":200},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]}},"required":["kind","domain","reason","diff"]},"nothingLost":{"type":"boolean","nullable":true},"grounding":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"gateDecisions":{"type":"integer","minimum":0},"logLines":{"type":"integer","minimum":0},"appOutput":{"type":"boolean"},"versionDiff":{"type":"boolean"}},"required":["steps","gateDecisions","logLines","appOutput","versionDiff"]},"usage":{"type":"object","nullable":true,"properties":{"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0},"costMicros":{"type":"integer","minimum":0}},"required":["inputTokens","outputTokens","costMicros"]},"offer":{"type":"object","properties":{"via":{"type":"string","nullable":true,"enum":["workspace","platform",null]},"model":{"type":"string","nullable":true},"note":{"type":"string","nullable":true,"enum":["rules_only","running","needs_editor","profile","no_model","limit","too_large","failed","disabled",null]},"remainingToday":{"type":"integer","nullable":true,"minimum":0}},"required":["via","model","note","remainingToday"]}},"required":["runId","appId","appName","generatedAt","locale","source","model","cached","status","failureClass","confidence","headline","why","next","answer","evidence","whatChanged","fix","suggestion","nothingLost","grounding","usage","offer"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"runs.ask"}},"post":{"summary":"Ask about this run: a model writes the answer when the workspace has a key for one","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":2,"maxLength":500},"locale":{"type":"string","enum":["en","ru","kk"]},"rulesOnly":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"generatedAt":{"type":"string","format":"date-time"},"locale":{"type":"string","enum":["en","ru","kk"]},"source":{"type":"string","enum":["rules","workspace_model","platform_model"]},"model":{"type":"string","nullable":true},"cached":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"failureClass":{"type":"string","nullable":true,"enum":["egress_denied","secret_missing","auth_rejected","quota","ai_budget","ai_setup","timeout","connector_rate_limited","connector_client_error","connector_server_error","schema_mismatch","runtime_unavailable","not_runnable","app_error",null]},"confidence":{"type":"string","enum":["high","medium","low"]},"headline":{"type":"string","minLength":1,"maxLength":600},"why":{"type":"string","minLength":1,"maxLength":1200},"next":{"type":"string","minLength":1,"maxLength":1200},"answer":{"type":"string","nullable":true,"maxLength":2400},"evidence":{"type":"array","items":{"type":"string","minLength":1,"maxLength":400},"maxItems":12},"whatChanged":{"type":"object","properties":{"lastGood":{"type":"object","nullable":true,"properties":{"runId":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"}},"required":["runId","at"]},"versionChanged":{"type":"boolean","nullable":true},"codeChanged":{"type":"boolean","nullable":true},"lines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":600},"maxItems":12}},"required":["lastGood","versionChanged","codeChanged","lines"]},"fix":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["reconnect","allow_egress","retry","edit_app","rollback","models","capacity"]},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"domain":{"type":"string","minLength":1,"maxLength":253},"versionId":{"type":"string","minLength":1},"versionNumber":{"type":"integer","minimum":1}},"required":["kind"]},"suggestion":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["allow_egress"]},"domain":{"type":"string","minLength":1,"maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":200},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]}},"required":["kind","domain","reason","diff"]},"nothingLost":{"type":"boolean","nullable":true},"grounding":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"gateDecisions":{"type":"integer","minimum":0},"logLines":{"type":"integer","minimum":0},"appOutput":{"type":"boolean"},"versionDiff":{"type":"boolean"}},"required":["steps","gateDecisions","logLines","appOutput","versionDiff"]},"usage":{"type":"object","nullable":true,"properties":{"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0},"costMicros":{"type":"integer","minimum":0}},"required":["inputTokens","outputTokens","costMicros"]},"offer":{"type":"object","properties":{"via":{"type":"string","nullable":true,"enum":["workspace","platform",null]},"model":{"type":"string","nullable":true},"note":{"type":"string","nullable":true,"enum":["rules_only","running","needs_editor","profile","no_model","limit","too_large","failed","disabled",null]},"remainingToday":{"type":"integer","nullable":true,"minimum":0}},"required":["via","model","note","remainingToday"]}},"required":["runId","appId","appName","generatedAt","locale","source","model","cached","status","failureClass","confidence","headline","why","next","answer","evidence","whatChanged","fix","suggestion","nothingLost","grounding","usage","offer"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"runs.ask_model"}}},"/v1/runs/{id}/change":{"post":{"summary":"Plan the change a refused run suggests (let the app reach the host the gate refused): the diff, nothing built","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"baseVersionId":{"type":"string","minLength":1},"instruction":{"type":"string"},"summary":{"type":"string","minLength":1,"maxLength":300},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]},"steps":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"rebuildsCode":{"type":"boolean"},"builder":{"type":"string","enum":["claude","offline"]},"model":{"type":"string","nullable":true},"templateId":{"type":"string","nullable":true},"notes":{"type":"array","items":{"type":"string","minLength":1},"maxItems":8},"adminApproval":{"type":"object","properties":{"required":{"type":"boolean"},"connectors":{"type":"array","items":{"type":"string"}}},"required":["required","connectors"]},"needsConsole":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["changeId","appId","appName","baseVersionId","instruction","summary","manifest","diff","steps","rebuildsCode","builder","model","templateId","notes","adminApproval","needsConsole","expiresAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/incidents":{"get":{"summary":"Failures grouped into incidents: first bad run, blast radius, cause (apps you can view)","tags":["analytics"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"7d"},"required":false,"name":"range","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"appId","in":"query"},{"schema":{"type":"string","enum":["en","ru","kk"]},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["7d","30d","90d"]},"generatedAt":{"type":"string","format":"date-time"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["open","recovered"]},"failureClass":{"type":"string","enum":["egress_denied","secret_missing","auth_rejected","quota","ai_budget","ai_setup","timeout","connector_rate_limited","connector_client_error","connector_server_error","schema_mismatch","runtime_unavailable","not_runnable","app_error"]},"confidence":{"type":"string","enum":["high","medium","low"]},"subject":{"type":"object","properties":{"host":{"type":"string","nullable":true},"connectorId":{"type":"string","nullable":true,"enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake",null]},"connection":{"type":"string","nullable":true},"httpStatus":{"type":"integer","nullable":true,"minimum":0,"maximum":999}},"required":["host","connectorId","connection","httpStatus"]},"title":{"type":"string","minLength":1},"cause":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"firstRun":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"startedAt":{"type":"string","format":"date-time"}},"required":["id","appId","appName","startedAt"]},"lastFailureAt":{"type":"string","format":"date-time"},"recoveredAt":{"type":"string","nullable":true,"format":"date-time"},"failedRuns":{"type":"integer","minimum":1},"runsInSpan":{"type":"integer","minimum":1},"apps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"failed":{"type":"integer","minimum":1}},"required":["id","name","failed"]}},"automations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"failed":{"type":"integer","minimum":1}},"required":["id","name","failed"]}}},"required":["id","status","failureClass","confidence","subject","title","cause","next","firstRun","lastFailureAt","recoveredAt","failedRuns","runsInSpan","apps","automations"]}},"truncated":{"type":"boolean"}},"required":["range","generatedAt","incidents","truncated"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"incidents.list"}}},"/v1/workspaces/{ws}/dead-letters":{"get":{"summary":"Failed runs and refused webhook calls kept for replay (apps you can open)","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","enum":["open","replayed","discarded","all"],"default":"open"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"appId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"automationId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"runId","in":"query"},{"schema":{"type":"string","enum":["run","delivery"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["run","delivery"]},"state":{"type":"string","enum":["open","replayed","discarded"]},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"reason":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"runId":{"type":"string","nullable":true},"deliveryId":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"attempt":{"type":"integer","minimum":1},"hasPayload":{"type":"boolean"},"payloadBytes":{"type":"integer","minimum":0},"preview":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"settledAt":{"type":"string","nullable":true,"format":"date-time"},"settledByName":{"type":"string","nullable":true},"replayRunId":{"type":"string","nullable":true},"canManage":{"type":"boolean"}},"required":["id","kind","state","appId","appName","roadId","roadName","trigger","reason","message","runId","deliveryId","version","attempt","hasPayload","payloadBytes","preview","createdAt","settledAt","settledByName","replayRunId","canManage"]}},"nextCursor":{"type":"string","nullable":true},"counts":{"type":"object","properties":{"open":{"type":"integer","minimum":0},"replayed":{"type":"integer","minimum":0},"discarded":{"type":"integer","minimum":0}},"required":["open","replayed","discarded"]}},"required":["items","nextCursor","counts"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"deadletters.list"}}},"/v1/dead-letters/{id}":{"get":{"summary":"One dead letter, with the input it kept (for people who may edit the app)","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["run","delivery"]},"state":{"type":"string","enum":["open","replayed","discarded"]},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"reason":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"runId":{"type":"string","nullable":true},"deliveryId":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"attempt":{"type":"integer","minimum":1},"hasPayload":{"type":"boolean"},"payloadBytes":{"type":"integer","minimum":0},"preview":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"settledAt":{"type":"string","nullable":true,"format":"date-time"},"settledByName":{"type":"string","nullable":true},"replayRunId":{"type":"string","nullable":true},"canManage":{"type":"boolean"},"payload":{"nullable":true}},"required":["id","kind","state","appId","appName","roadId","roadName","trigger","reason","message","runId","deliveryId","version","attempt","hasPayload","payloadBytes","preview","createdAt","settledAt","settledByName","replayRunId","canManage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"deadletters.get"}}},"/v1/dead-letters/{id}/replay":{"post":{"summary":"Replay a dead letter as a new run, with its input as kept or an edited one","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"nullable":true},"version":{"type":"string","enum":["current","original"],"default":"current"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"deadLetterId":{"type":"string","nullable":true},"version":{"type":"object","properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"edited":{"type":"boolean"},"held":{"type":"boolean","default":false}},"required":["runId","deadLetterId","version","edited"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"deadletters.replay"}}},"/v1/dead-letters/{id}/discard":{"post":{"summary":"Set a dead letter aside: it is kept for a week as a record, then removed","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["run","delivery"]},"state":{"type":"string","enum":["open","replayed","discarded"]},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"reason":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"runId":{"type":"string","nullable":true},"deliveryId":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"attempt":{"type":"integer","minimum":1},"hasPayload":{"type":"boolean"},"payloadBytes":{"type":"integer","minimum":0},"preview":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"settledAt":{"type":"string","nullable":true,"format":"date-time"},"settledByName":{"type":"string","nullable":true},"replayRunId":{"type":"string","nullable":true},"canManage":{"type":"boolean"}},"required":["id","kind","state","appId","appName","roadId","roadName","trigger","reason","message","runId","deliveryId","version","attempt","hasPayload","payloadBytes","preview","createdAt","settledAt","settledByName","replayRunId","canManage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/dead-letters/bulk":{"post":{"summary":"Replay or discard up to 50 open dead letters as they were kept","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["replay","discard"]},"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":50},"version":{"type":"string","enum":["current","original"],"default":"current"}},"required":["action","ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["replay","discard"]},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"ok":{"type":"boolean","enum":[true]},"runId":{"type":"string","nullable":true}},"required":["id","ok","runId"]},{"type":"object","properties":{"id":{"type":"string"},"ok":{"type":"boolean","enum":[false]},"code":{"type":"string"},"message":{"type":"string"}},"required":["id","ok","code","message"]}]}},"done":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["action","results","done","failed"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/runs/{id}/replay":{"post":{"summary":"Replay a failed run as a new run, optionally with an edited input","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"nullable":true},"version":{"type":"string","enum":["current","original"],"default":"current"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"deadLetterId":{"type":"string","nullable":true},"version":{"type":"object","properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"edited":{"type":"boolean"},"held":{"type":"boolean","default":false}},"required":["runId","deadLetterId","version","edited"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"runs.replay"}}},"/v1/workspaces/{ws}/queue-health":{"get":{"summary":"Work in flight, how long the oldest has waited and what finished (apps you can open)","tags":["runs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"appId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asOf":{"type":"string","format":"date-time"},"totals":{"type":"object","properties":{"waiting":{"type":"integer","minimum":0},"running":{"type":"integer","minimum":0},"awaitingApproval":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0,"default":0},"oldestSeconds":{"type":"integer","nullable":true,"minimum":0},"startedLastHour":{"type":"integer","minimum":0},"finishedLastHour":{"type":"integer","minimum":0},"failedLastHour":{"type":"integer","minimum":0},"medianWaitSeconds":{"type":"number","nullable":true,"minimum":0},"deadLetters":{"type":"integer","minimum":0},"state":{"type":"string","enum":["clear","busy","slow","stuck"]}},"required":["waiting","running","awaitingApproval","oldestSeconds","startedLastHour","finishedLastHour","failedLastHour","medianWaitSeconds","deadLetters","state"]},"hours":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"started":{"type":"integer","minimum":0},"finished":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"peak":{"type":"integer","minimum":0},"medianWaitSeconds":{"type":"number","nullable":true,"minimum":0}},"required":["at","started","finished","failed","peak","medianWaitSeconds"]}},"roads":{"type":"array","items":{"type":"object","properties":{"waiting":{"type":"integer","minimum":0},"running":{"type":"integer","minimum":0},"awaitingApproval":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0,"default":0},"oldestSeconds":{"type":"integer","nullable":true,"minimum":0},"startedLastHour":{"type":"integer","minimum":0},"finishedLastHour":{"type":"integer","minimum":0},"failedLastHour":{"type":"integer","minimum":0},"medianWaitSeconds":{"type":"number","nullable":true,"minimum":0},"deadLetters":{"type":"integer","minimum":0},"state":{"type":"string","enum":["clear","busy","slow","stuck"]},"automationId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]}},"required":["waiting","running","awaitingApproval","oldestSeconds","startedLastHour","finishedLastHour","failedLastHour","medianWaitSeconds","deadLetters","state","automationId","name","appId","appName","trigger"]}}},"required":["asOf","totals","hours","roads"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"queue.health"}}},"/v1/workspaces/{ws}/ai":{"get":{"summary":"Model connections, the default model and, for admins, each app’s AI budget","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"unavailable":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","enum":["no_connection","profile"]},"message":{"type":"string"},"hint":{"type":"string"}},"required":["reason","message","hint"]},"canManage":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["anthropic","openai","openai-compatible"]},"label":{"type":"string"},"baseUrl":{"type":"string"},"host":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"inputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"outputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000}},"required":["id","inputUsdPerMTok","outputUsdPerMTok"]}},"keyState":{"type":"string","enum":["write-only"]},"keyId":{"type":"string"},"status":{"type":"string","enum":["connected","error"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","provider","label","baseUrl","host","models","keyState","keyId","status","createdAt","updatedAt"]}},"defaultModel":{"type":"string","nullable":true,"minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"month":{"type":"object","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"}},"required":["start","end"]},"apps":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string"},"name":{"type":"string"},"declared":{"type":"object","properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}}},"required":["profile","monthlyBudgetUsd","models"]},"budgetUsd":{"type":"number","minimum":0},"budgetSource":{"type":"string","enum":["manifest","override"]},"manifestBudgetUsd":{"type":"number","minimum":0},"spentUsd":{"type":"number","minimum":0},"calls":{"type":"integer","minimum":0},"missingModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}}},"required":["appId","name","declared","budgetUsd","budgetSource","manifestBudgetUsd","spentUsd","calls","missingModels"]}},"timezone":{"type":"string"}},"required":["available","unavailable","canManage","connections","defaultModel","month","apps","timezone"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/ai/connections":{"post":{"summary":"Add a model provider: the key is sealed to the gate and never returned (admins)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai","openai-compatible"]},"label":{"type":"string","minLength":2,"maxLength":60},"baseUrl":{"type":"string","maxLength":300},"apiKey":{"type":"string","maxLength":576},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"inputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"outputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000}},"required":["id","inputUsdPerMTok","outputUsdPerMTok"]},"minItems":1,"maxItems":16}},"required":["provider","label","apiKey","models"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["anthropic","openai","openai-compatible"]},"label":{"type":"string"},"baseUrl":{"type":"string"},"host":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"inputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"outputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000}},"required":["id","inputUsdPerMTok","outputUsdPerMTok"]}},"keyState":{"type":"string","enum":["write-only"]},"keyId":{"type":"string"},"status":{"type":"string","enum":["connected","error"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","provider","label","baseUrl","host","models","keyState","keyId","status","createdAt","updatedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/ai/connections/{id}":{"put":{"summary":"Rename a connection, change its models and prices, or replace its key (admins)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":2,"maxLength":60},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"inputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"outputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000}},"required":["id","inputUsdPerMTok","outputUsdPerMTok"]},"minItems":1,"maxItems":16},"apiKey":{"type":"string","maxLength":576}},"required":["label","models"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["anthropic","openai","openai-compatible"]},"label":{"type":"string"},"baseUrl":{"type":"string"},"host":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"inputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"outputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000}},"required":["id","inputUsdPerMTok","outputUsdPerMTok"]}},"keyState":{"type":"string","enum":["write-only"]},"keyId":{"type":"string"},"status":{"type":"string","enum":["connected","error"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","provider","label","baseUrl","host","models","keyState","keyId","status","createdAt","updatedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Remove a connection and its sealed key (admins)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"affectedApps":{"type":"array","items":{"type":"string"}}},"required":["ok","affectedApps"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/ai/connections/{id}/test":{"post":{"summary":"Test the key: the gate asks the provider for its model list, no tokens (admins)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"checked":{"type":"string","enum":["gate","unreachable","mock"]},"ok":{"type":"boolean","nullable":true},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"latencyMs":{"type":"integer","nullable":true,"minimum":0},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","invalid_config",null]},"connection":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["anthropic","openai","openai-compatible"]},"label":{"type":"string"},"baseUrl":{"type":"string"},"host":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"inputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"outputUsdPerMTok":{"type":"number","minimum":0,"maximum":1000},"maxOutputTokens":{"type":"integer","minimum":1,"maximum":200000}},"required":["id","inputUsdPerMTok","outputUsdPerMTok"]}},"keyState":{"type":"string","enum":["write-only"]},"keyId":{"type":"string"},"status":{"type":"string","enum":["connected","error"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","provider","label","baseUrl","host","models","keyState","keyId","status","createdAt","updatedAt"]}},"required":["checked","ok","status","latencyMs","reason","connection"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/ai/default-model":{"put":{"summary":"The model apps use when their manifest names none (admins)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}},"required":["model"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"defaultModel":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}},"required":["defaultModel"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/ai/apps/{appId}/budget":{"put":{"summary":"Set an app’s monthly AI budget, or null to use the one its manifest names (admins)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"appId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyBudgetUsd":{"type":"number","nullable":true,"minimum":0,"maximum":10000}},"required":["monthlyBudgetUsd"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"},"name":{"type":"string"},"declared":{"type":"object","properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}}},"required":["profile","monthlyBudgetUsd","models"]},"budgetUsd":{"type":"number","minimum":0},"budgetSource":{"type":"string","enum":["manifest","override"]},"manifestBudgetUsd":{"type":"number","minimum":0},"spentUsd":{"type":"number","minimum":0},"calls":{"type":"integer","minimum":0},"missingModels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"}}},"required":["appId","name","declared","budgetUsd","budgetSource","manifestBudgetUsd","spentUsd","calls","missingModels"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/ai/usage":{"get":{"summary":"Model use by day, app and model: tokens and cost at your prices (apps you can view)","tags":["models"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d"},"required":false,"name":"range","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"appId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["7d","30d","90d"]},"appId":{"type":"string","nullable":true},"timezone":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"monthStart":{"type":"string","format":"date"},"totals":{"type":"object","properties":{"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0}},"required":["calls","refused","inputTokens","outputTokens","costUsd"]},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0}},"required":["day","calls","refused","inputTokens","outputTokens","costUsd"]}},"byApp":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string"},"name":{"type":"string","nullable":true},"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0},"budgetUsd":{"type":"number","nullable":true,"minimum":0},"budgetSource":{"type":"string","nullable":true,"enum":["manifest","override",null]},"monthSpentUsd":{"type":"number","minimum":0}},"required":["appId","name","calls","refused","inputTokens","outputTokens","costUsd","budgetUsd","budgetSource","monthSpentUsd"]}},"byModel":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0}},"required":["model","calls","refused","inputTokens","outputTokens","costUsd"]}}},"required":["range","appId","timezone","generatedAt","from","to","monthStart","totals","daily","byApp","byModel"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/analytics":{"get":{"summary":"Runs, failures, time saved, connector health and backend traffic (apps you can view)","tags":["analytics"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d"},"required":false,"name":"range","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"appId","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["7d","30d","90d"]},"days":{"type":"integer","minimum":1},"appId":{"type":"string","nullable":true},"timezone":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"truncated":{"type":"boolean"},"totals":{"type":"object","properties":{"runs":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"waiting":{"type":"integer","minimum":0},"hoursSaved":{"type":"number","minimum":0}},"required":["runs","succeeded","failed","blocked","waiting","hoursSaved"]},"tiles":{"type":"object","properties":{"runsToday":{"type":"object","properties":{"value":{"type":"number","minimum":0},"previous":{"type":"number","minimum":0}},"required":["value","previous"]},"failureRate":{"type":"object","properties":{"value":{"type":"number","nullable":true,"minimum":0},"previous":{"type":"number","nullable":true,"minimum":0}},"required":["value","previous"]},"hoursSaved":{"type":"object","properties":{"value":{"type":"number","minimum":0},"previous":{"type":"number","minimum":0}},"required":["value","previous"]},"medianMs":{"type":"object","properties":{"value":{"type":"number","nullable":true,"minimum":0},"previous":{"type":"number","nullable":true,"minimum":0}},"required":["value","previous"]},"p95Ms":{"type":"object","properties":{"value":{"type":"number","nullable":true,"minimum":0},"previous":{"type":"number","nullable":true,"minimum":0}},"required":["value","previous"]}},"required":["runsToday","failureRate","hoursSaved","medianMs","p95Ms"]},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"waiting":{"type":"integer","minimum":0},"hoursSaved":{"type":"number","minimum":0},"requests":{"type":"integer","minimum":0}},"required":["day","succeeded","failed","blocked","waiting","hoursSaved","requests"]}},"byApp":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"runs":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"hoursSaved":{"type":"number","minimum":0},"perDay":{"type":"array","items":{"type":"integer","minimum":0}}},"required":["appId","name","category","runs","failed","blocked","hoursSaved","perDay"]}},"heatmap":{"type":"array","items":{"type":"array","items":{"type":"integer","minimum":0}}},"hoursByCategory":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"hours":{"type":"number","minimum":0}},"required":["category","hours"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"connectorId":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"calls":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"lastCallAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","connectorId","name","calls","errors","blocked","lastCallAt"]}},"backend":{"type":"object","nullable":true,"properties":{"requests":{"type":"integer","minimum":0},"estimate":{"type":"boolean"}},"required":["requests","estimate"]},"recentFailures":{"type":"array","items":{"type":"object","properties":{"runId":{"type":"string"},"appId":{"type":"string"},"appName":{"type":"string"},"status":{"type":"string","enum":["failed","blocked"]},"startedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","nullable":true,"minimum":0},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true}},"required":["runId","appId","appName","status","startedAt","durationMs","errorCode","errorMessage"]}},"ai":{"type":"object","nullable":true,"properties":{"totals":{"type":"object","properties":{"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0}},"required":["calls","refused","inputTokens","outputTokens","costUsd"]},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0}},"required":["day","calls","refused","inputTokens","outputTokens","costUsd"]}},"byApp":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string"},"name":{"type":"string","nullable":true},"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0},"budgetUsd":{"type":"number","nullable":true,"minimum":0},"budgetSource":{"type":"string","nullable":true,"enum":["manifest","override",null]},"monthSpentUsd":{"type":"number","minimum":0}},"required":["appId","name","calls","refused","inputTokens","outputTokens","costUsd","budgetUsd","budgetSource","monthSpentUsd"]}},"byModel":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"calls":{"type":"integer","minimum":0},"refused":{"type":"integer","minimum":0},"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"costUsd":{"type":"number","minimum":0}},"required":["model","calls","refused","inputTokens","outputTokens","costUsd"]}}},"default":null,"required":["totals","daily","byApp","byModel"]}},"required":["range","days","appId","timezone","generatedAt","from","to","truncated","totals","tiles","daily","byApp","heatmap","hoursByCategory","connectors","backend","recentFailures"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"analytics.get"}}},"/v1/apps/{id}/share":{"get":{"summary":"Who can open, run and edit an app","tags":["share"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"owner":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"grants":{"type":"array","items":{"type":"object","properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},{"type":"object","properties":{"kind":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberCount":{"type":"integer","minimum":0}},"required":["kind","id","name","memberCount"]}]},"role":{"type":"string","enum":["viewer","runner","editor"]}},"required":["principal","role"]}},"generalAccess":{"type":"string","enum":["restricted","team","workspace","link"]},"generalRole":{"type":"string","enum":["viewer","runner","editor"]},"teamId":{"type":"string","nullable":true},"canShare":{"type":"boolean"},"linkAllowed":{"type":"boolean"},"linkDisabledReason":{"type":"string","nullable":true,"enum":["policy","app-type","not-admin",null]},"guests":{"type":"integer","minimum":0},"publicProbe":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_check","stale","running","blocked","unavailable"]},"probeId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"maxLength":400}},"required":["state","probeId","reason"]}},"required":["appId","owner","grants","generalAccess","generalRole","teamId","canShare","linkAllowed","linkDisabledReason"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"share.get"}},"patch":{"summary":"Change sharing (owner only; public links need admin + policy + a form)","tags":["share"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"generalAccess":{"type":"string","enum":["restricted","team","workspace","link"]},"generalRole":{"type":"string","enum":["viewer","runner","editor"]},"teamId":{"type":"string","nullable":true},"upsert":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["user","team"]},"id":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","runner","editor"]}},"required":["kind","id","role"]}},"remove":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["user","team"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]}},"publicConfirm":{"type":"object","properties":{"probeId":{"type":"string","minLength":1,"maxLength":128},"typed":{"type":"string","minLength":1,"maxLength":120}},"required":["probeId","typed"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"owner":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"grants":{"type":"array","items":{"type":"object","properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},{"type":"object","properties":{"kind":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberCount":{"type":"integer","minimum":0}},"required":["kind","id","name","memberCount"]}]},"role":{"type":"string","enum":["viewer","runner","editor"]}},"required":["principal","role"]}},"generalAccess":{"type":"string","enum":["restricted","team","workspace","link"]},"generalRole":{"type":"string","enum":["viewer","runner","editor"]},"teamId":{"type":"string","nullable":true},"canShare":{"type":"boolean"},"linkAllowed":{"type":"boolean"},"linkDisabledReason":{"type":"string","nullable":true,"enum":["policy","app-type","not-admin",null]},"guests":{"type":"integer","minimum":0},"publicProbe":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_check","stale","running","blocked","unavailable"]},"probeId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"maxLength":400}},"required":["state","probeId","reason"]}},"required":["appId","owner","grants","generalAccess","generalRole","teamId","canShare","linkAllowed","linkDisabledReason"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"share.update"}}},"/v1/apps/{id}/guests":{"get":{"summary":"An app's guests, and whether the workspace lets anyone invite one","tags":["guests"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"offReason":{"type":"string","nullable":true,"enum":["profile","policy",null]},"canTurnOn":{"type":"boolean"},"canInvite":{"type":"boolean"},"open":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string"},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["viewer","runner"]},"status":{"type":"string","enum":["invited","active","expired","revoked"]},"invitedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","nullable":true,"format":"date-time"},"opens":{"type":"integer","minimum":0},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","appId","appName","email","role","status","invitedBy","createdAt","expiresAt","lastOpenedAt","opens","revokedAt"]}}},"required":["enabled","offReason","canTurnOn","canInvite","open","limit","items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Invite people outside the workspace to open this one app","tags":["guests"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10},"role":{"type":"string","enum":["viewer","runner"],"default":"viewer"},"days":{"type":"integer","minimum":1,"maximum":30,"default":7},"deliver":{"type":"string","enum":["email","link"],"default":"email"},"locale":{"type":"string","enum":["en","ru","kk"]}},"required":["emails"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string"},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["viewer","runner"]},"status":{"type":"string","enum":["invited","active","expired","revoked"]},"invitedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","nullable":true,"format":"date-time"},"opens":{"type":"integer","minimum":0},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","appId","appName","email","role","status","invitedBy","createdAt","expiresAt","lastOpenedAt","opens","revokedAt"]}},"links":{"type":"array","items":{"type":"object","properties":{"guestId":{"type":"string","minLength":1},"email":{"type":"string"},"link":{"type":"string","format":"uri"}},"required":["guestId","email","link"]}},"delivery":{"type":"string","nullable":true,"enum":["email","dev-log",null]}},"required":["items","links","delivery"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/guests/{guestId}/resend":{"post":{"summary":"A fresh link for a guest whose access still runs (the old link stops working)","tags":["guests"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"guestId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deliver":{"type":"string","enum":["email","link"],"default":"email"},"locale":{"type":"string","enum":["en","ru","kk"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string"},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["viewer","runner"]},"status":{"type":"string","enum":["invited","active","expired","revoked"]},"invitedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","nullable":true,"format":"date-time"},"opens":{"type":"integer","minimum":0},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","appId","appName","email","role","status","invitedBy","createdAt","expiresAt","lastOpenedAt","opens","revokedAt"]}},"links":{"type":"array","items":{"type":"object","properties":{"guestId":{"type":"string","minLength":1},"email":{"type":"string"},"link":{"type":"string","format":"uri"}},"required":["guestId","email","link"]}},"delivery":{"type":"string","nullable":true,"enum":["email","dev-log",null]}},"required":["items","links","delivery"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/guests/{guestId}":{"delete":{"summary":"End a guest’s access now; for a guest whose access is over, forget them","tags":["guests"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"guestId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"},"guest":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string"},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["viewer","runner"]},"status":{"type":"string","enum":["invited","active","expired","revoked"]},"invitedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","nullable":true,"format":"date-time"},"opens":{"type":"integer","minimum":0},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","appId","appName","email","role","status","invitedBy","createdAt","expiresAt","lastOpenedAt","opens","revokedAt"]}},"required":["removed","guest"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/guests":{"get":{"summary":"Every guest of the workspace and whether guests are on (admins)","tags":["guests"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"offReason":{"type":"string","nullable":true,"enum":["profile","policy",null]},"canTurnOn":{"type":"boolean"},"canInvite":{"type":"boolean"},"open":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string"},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["viewer","runner"]},"status":{"type":"string","enum":["invited","active","expired","revoked"]},"invitedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","nullable":true,"format":"date-time"},"opens":{"type":"integer","minimum":0},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","appId","appName","email","role","status","invitedBy","createdAt","expiresAt","lastOpenedAt","opens","revokedAt"]}}},"required":["enabled","offReason","canTurnOn","canInvite","open","limit","items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/guests/policy":{"put":{"summary":"Turn guests on or off for the workspace (admins). Off ends every open guest.","tags":["guests"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean"}},"required":["allowed"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"offReason":{"type":"string","nullable":true,"enum":["profile","policy",null]},"canTurnOn":{"type":"boolean"},"canInvite":{"type":"boolean"},"open":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string"},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["viewer","runner"]},"status":{"type":"string","enum":["invited","active","expired","revoked"]},"invitedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","nullable":true,"format":"date-time"},"opens":{"type":"integer","minimum":0},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","appId","appName","email","role","status","invitedBy","createdAt","expiresAt","lastOpenedAt","opens","revokedAt"]}}},"required":["enabled","offReason","canTurnOn","canInvite","open","limit","items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/probe":{"get":{"summary":"The last exposure check of the current version, and whether a public link may open","tags":["probe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"},"currentVersionId":{"type":"string","nullable":true},"probe":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1,"maxLength":128},"appId":{"type":"string","minLength":1,"maxLength":128},"versionId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["running","complete","skipped","unavailable"]},"trigger":{"type":"string","enum":["deploy","owner","share"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"verdict":{"type":"string","nullable":true,"enum":["clear","review","blocked",null]},"internalVerdict":{"type":"string","nullable":true,"enum":["clear","review","blocked",null]},"counts":{"type":"object","nullable":true,"properties":{"high":{"type":"integer","minimum":0},"medium":{"type":"integer","minimum":0},"low":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["high","medium","low","info"]},"report":{"type":"object","nullable":true,"properties":{"engine":{"type":"string","minLength":1,"maxLength":60},"verdict":{"type":"string","enum":["clear","review","blocked"]},"counts":{"type":"object","properties":{"high":{"type":"integer","minimum":0},"medium":{"type":"integer","minimum":0},"low":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["high","medium","low","info"]},"internalVerdict":{"type":"string","enum":["clear","review","blocked"]},"internalCounts":{"type":"object","properties":{"high":{"type":"integer","minimum":0},"medium":{"type":"integer","minimum":0},"low":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["high","medium","low","info"]},"requests":{"type":"integer","minimum":0},"durationMs":{"type":"integer","minimum":0},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["anon-access","data-exposure","secret-reflection","cors","headers","injection","egress","oversized","unsafe-writes","manifest-tables"]},"label":{"type":"string","maxLength":80},"outcome":{"type":"string","enum":["passed","findings","skipped"]},"findings":{"type":"integer","minimum":0},"summary":{"type":"string","maxLength":240}},"required":["id","label","outcome","findings","summary"]},"maxItems":10},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"check":{"type":"string","enum":["anon-access","data-exposure","secret-reflection","cors","headers","injection","egress","oversized","unsafe-writes","manifest-tables"]},"code":{"type":"string","minLength":1,"maxLength":40},"severity":{"type":"string","enum":["high","medium","low","info"]},"exposure":{"type":"string","enum":["any","public"]},"title":{"type":"string","minLength":1,"maxLength":260},"detail":{"type":"string","maxLength":400},"fix":{"type":"string","maxLength":320},"route":{"type":"string","nullable":true,"maxLength":200},"method":{"type":"string","nullable":true,"maxLength":8},"persona":{"type":"string","nullable":true,"enum":["owner","viewer","anonymous",null]},"params":{"type":"object","additionalProperties":{"type":"string","maxLength":200}},"evidence":{"type":"object","properties":{"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"contentType":{"type":"string","nullable":true,"maxLength":80},"bytes":{"type":"integer","nullable":true,"minimum":0}},"required":["status","contentType","bytes"]}},"required":["id","check","code","severity","exposure","title","detail","fix","route","method","persona","params","evidence"]},"maxItems":60},"routes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["page","data","form","other"]},"owner":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"viewer":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"anonymous":{"type":"integer","nullable":true,"minimum":0,"maximum":999}},"required":["path","kind","owner","viewer","anonymous"]},"maxItems":40},"notes":{"type":"array","items":{"type":"string","maxLength":280},"maxItems":12}},"required":["engine","verdict","counts","internalVerdict","internalCounts","requests","durationMs","checks","findings","routes","notes"]},"note":{"type":"string","nullable":true,"maxLength":320},"errorCode":{"type":"string","nullable":true,"maxLength":64}},"required":["id","appId","versionId","status","trigger","startedAt","finishedAt","verdict","internalVerdict","counts","report","note","errorCode"]},"gate":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_check","stale","running","blocked","unavailable"]},"probeId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"maxLength":400}},"required":["state","probeId","reason"]},"canRun":{"type":"boolean"},"retryAfterSeconds":{"type":"integer","nullable":true,"minimum":0},"trust":{"type":"object","nullable":true,"properties":{"score":{"type":"integer","minimum":0,"maximum":100},"band":{"type":"string","enum":["pass","review","fail"]},"base":{"type":"integer","minimum":0,"maximum":100},"cap":{"type":"integer","nullable":true,"minimum":0,"maximum":100}},"required":["score","band","base","cap"]}},"required":["appId","currentVersionId","probe","gate","canRun","retryAfterSeconds","trust"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"probe.get"}},"post":{"summary":"Run the exposure check again on the current version (owner and editors)","tags":["probe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"},"currentVersionId":{"type":"string","nullable":true},"probe":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1,"maxLength":128},"appId":{"type":"string","minLength":1,"maxLength":128},"versionId":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["running","complete","skipped","unavailable"]},"trigger":{"type":"string","enum":["deploy","owner","share"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"verdict":{"type":"string","nullable":true,"enum":["clear","review","blocked",null]},"internalVerdict":{"type":"string","nullable":true,"enum":["clear","review","blocked",null]},"counts":{"type":"object","nullable":true,"properties":{"high":{"type":"integer","minimum":0},"medium":{"type":"integer","minimum":0},"low":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["high","medium","low","info"]},"report":{"type":"object","nullable":true,"properties":{"engine":{"type":"string","minLength":1,"maxLength":60},"verdict":{"type":"string","enum":["clear","review","blocked"]},"counts":{"type":"object","properties":{"high":{"type":"integer","minimum":0},"medium":{"type":"integer","minimum":0},"low":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["high","medium","low","info"]},"internalVerdict":{"type":"string","enum":["clear","review","blocked"]},"internalCounts":{"type":"object","properties":{"high":{"type":"integer","minimum":0},"medium":{"type":"integer","minimum":0},"low":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["high","medium","low","info"]},"requests":{"type":"integer","minimum":0},"durationMs":{"type":"integer","minimum":0},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["anon-access","data-exposure","secret-reflection","cors","headers","injection","egress","oversized","unsafe-writes","manifest-tables"]},"label":{"type":"string","maxLength":80},"outcome":{"type":"string","enum":["passed","findings","skipped"]},"findings":{"type":"integer","minimum":0},"summary":{"type":"string","maxLength":240}},"required":["id","label","outcome","findings","summary"]},"maxItems":10},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"check":{"type":"string","enum":["anon-access","data-exposure","secret-reflection","cors","headers","injection","egress","oversized","unsafe-writes","manifest-tables"]},"code":{"type":"string","minLength":1,"maxLength":40},"severity":{"type":"string","enum":["high","medium","low","info"]},"exposure":{"type":"string","enum":["any","public"]},"title":{"type":"string","minLength":1,"maxLength":260},"detail":{"type":"string","maxLength":400},"fix":{"type":"string","maxLength":320},"route":{"type":"string","nullable":true,"maxLength":200},"method":{"type":"string","nullable":true,"maxLength":8},"persona":{"type":"string","nullable":true,"enum":["owner","viewer","anonymous",null]},"params":{"type":"object","additionalProperties":{"type":"string","maxLength":200}},"evidence":{"type":"object","properties":{"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"contentType":{"type":"string","nullable":true,"maxLength":80},"bytes":{"type":"integer","nullable":true,"minimum":0}},"required":["status","contentType","bytes"]}},"required":["id","check","code","severity","exposure","title","detail","fix","route","method","persona","params","evidence"]},"maxItems":60},"routes":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["page","data","form","other"]},"owner":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"viewer":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"anonymous":{"type":"integer","nullable":true,"minimum":0,"maximum":999}},"required":["path","kind","owner","viewer","anonymous"]},"maxItems":40},"notes":{"type":"array","items":{"type":"string","maxLength":280},"maxItems":12}},"required":["engine","verdict","counts","internalVerdict","internalCounts","requests","durationMs","checks","findings","routes","notes"]},"note":{"type":"string","nullable":true,"maxLength":320},"errorCode":{"type":"string","nullable":true,"maxLength":64}},"required":["id","appId","versionId","status","trigger","startedAt","finishedAt","verdict","internalVerdict","counts","report","note","errorCode"]},"gate":{"type":"object","properties":{"state":{"type":"string","enum":["ready","needs_check","stale","running","blocked","unavailable"]},"probeId":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true,"maxLength":400}},"required":["state","probeId","reason"]},"canRun":{"type":"boolean"},"retryAfterSeconds":{"type":"integer","nullable":true,"minimum":0},"trust":{"type":"object","nullable":true,"properties":{"score":{"type":"integer","minimum":0,"maximum":100},"band":{"type":"string","enum":["pass","review","fail"]},"base":{"type":"integer","minimum":0,"maximum":100},"cap":{"type":"integer","nullable":true,"minimum":0,"maximum":100}},"required":["score","band","base","cap"]}},"required":["appId","currentVersionId","probe","gate","canRun","retryAfterSeconds","trust"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"probe.run"}}},"/v1/workspaces/{ws}/principals":{"get":{"summary":"People and teams of this workspace, for the share picker","tags":["share"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},{"type":"object","properties":{"kind":{"type":"string","enum":["team"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberCount":{"type":"integer","minimum":0}},"required":["kind","id","name","memberCount"]}]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"principals.search"}}},"/v1/templates":{"get":{"summary":"Gallery templates (hours per month are estimates)","tags":["build"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":2},"tagline":{"type":"string","minLength":4,"maxLength":120},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"manualMinutesPerRun":{"type":"number","minimum":0},"estRunsPerMonth":{"type":"number","minimum":0},"samplePrompt":{"type":"string","minLength":8},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"regions":{"type":"array","items":{"type":"string","enum":["global","kz"]},"minItems":1},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":4}},"required":["id","name","tagline","archetype","category","connectors","manualMinutesPerRun","estRunsPerMonth","samplePrompt","manifest","regions"]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"templates.list"}}},"/v1/workspaces/{ws}/builds":{"post":{"summary":"Plan a build: permission manifest + steps, nothing runs yet","tags":["build"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":4,"maxLength":2000},"templateId":{"type":"string"},"plot":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"buildId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"prompt":{"type":"string"},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"steps":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"builder":{"type":"string","enum":["claude","offline"]},"model":{"type":"string","nullable":true},"templateId":{"type":"string","nullable":true}},"required":["buildId","appId","prompt","manifest","steps","builder","model","templateId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"builds.plan"}}},"/v1/builds/{buildId}/approve":{"post":{"summary":"Approve the manifest: the building rises as the build progresses (events)","tags":["build"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"buildId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]}},"required":["manifest"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"}},"required":["appId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"builds.approve"}}},"/v1/workspaces/{ws}/roads":{"post":{"summary":"Draw a road (automation): from a gate or app, through apps (`via`), to a gate or app, with its trigger settings","tags":["world","automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6},"triggerConfig":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]}},"required":["name","from","to","trigger"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]}},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["active","paused","failing"]},"path":{"type":"array","nullable":true,"items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0}},"required":["x","y"]}}},"required":["id","name","from","to","via","category","trigger","status","path"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/roi":{"get":{"summary":"Hours saved this year, with the formula rows","tags":["roi"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","enum":["year"]},"hoursSaved":{"type":"number","minimum":0},"runs":{"type":"integer","minimum":0},"moneySavedMinor":{"type":"integer","minimum":0},"hourlyCostMinor":{"type":"integer","minimum":0},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"trees":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"runs":{"type":"integer","minimum":0},"manualMinutesPerRun":{"type":"number","minimum":0},"minutes":{"type":"number","minimum":0},"hours":{"type":"number","minimum":0},"overridden":{"type":"boolean"},"demoBaselineRuns":{"type":"integer","minimum":0,"default":0}},"required":["appId","appName","runs","manualMinutesPerRun","minutes","hours","overridden"]}}},"required":["period","hoursSaved","runs","moneySavedMinor","hourlyCostMinor","currency","trees","rows"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"roi.get"}}},"/v1/workspaces/{ws}/roi/overrides":{"put":{"summary":"Edit an app's manual minutes per run (admins)","tags":["roi"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["appId","manualMinutesPerRun"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"string","enum":["year"]},"hoursSaved":{"type":"number","minimum":0},"runs":{"type":"integer","minimum":0},"moneySavedMinor":{"type":"integer","minimum":0},"hourlyCostMinor":{"type":"integer","minimum":0},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"trees":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"runs":{"type":"integer","minimum":0},"manualMinutesPerRun":{"type":"number","minimum":0},"minutes":{"type":"number","minimum":0},"hours":{"type":"number","minimum":0},"overridden":{"type":"boolean"},"demoBaselineRuns":{"type":"integer","minimum":0,"default":0}},"required":["appId","appName","runs","manualMinutesPerRun","minutes","hours","overridden"]}}},"required":["period","hoursSaved","runs","moneySavedMinor","hourlyCostMinor","currency","trees","rows"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/settings":{"get":{"summary":"Workspace profile, policy, members, teams and connectors","tags":["settings"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]},"cell":{"type":"string","enum":["global","eu","kz"]},"locale":{"type":"string","enum":["en","ru","kk"]},"timezone":{"type":"string","minLength":1},"hourlyCostMinor":{"type":"integer","minimum":0},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"memberCount":{"type":"integer","minimum":0}},"required":["id","slug","name","profile","cell","locale","timezone","hourlyCostMinor","currency","memberCount"]},"policy":{"type":"object","properties":{"allowPublicLinks":{"type":"boolean"},"allowGuests":{"type":"boolean"},"allowedConnectors":{"type":"array","nullable":true,"items":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"allowedModelProviders":{"type":"array","nullable":true,"items":{"type":"string","enum":["anthropic","openai","google","open-weight-global","open-weight-eu","open-weight-kz"]}},"retentionDays":{"type":"integer","nullable":true,"minimum":1,"maximum":3650},"defaultSharing":{"type":"string","enum":["private","team","workspace"]},"domainJoin":{"type":"object","nullable":true,"properties":{"domain":{"type":"string","minLength":4,"maxLength":253},"token":{"type":"string","pattern":"^[A-Za-z0-9_-]{22,64}$"},"verifiedAt":{"type":"string","nullable":true,"format":"date-time"},"autoJoin":{"type":"boolean"},"role":{"type":"string","enum":["member","viewer"]}},"required":["domain","token","verifiedAt","autoJoin","role"]},"flow":{"type":"object","properties":{"sources":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["table"]},"appId":{"type":"string","minLength":1,"maxLength":128},"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","enum":["pii","financial","secret"]},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["kind","appId","table","label"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"connection":{"type":"string","pattern":"^(?:sheets|http:conn_[a-z0-9]{6,40})$"},"label":{"type":"string","enum":["pii","financial","secret"]}},"required":["kind","connection","label"]}]},"maxItems":200},"allow":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["pii","financial","secret"]},"to":{"type":"string","maxLength":300}},"required":["label","to"]},"maxItems":300},"limits":{"type":"object","properties":{"requestBytes":{"type":"integer","minimum":256,"maximum":262144},"runBytes":{"type":"integer","minimum":1024,"maximum":4194304}},"required":["requestBytes","runBytes"]},"revision":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["sources","allow","limits","revision"]}},"required":["allowPublicLinks","allowedConnectors","allowedModelProviders","retentionDays","defaultSharing"]},"members":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"teamId":{"type":"string","nullable":true},"online":{"type":"boolean"}},"required":["user","role","teamId","online"]}},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","memberIds"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId"]}}},"required":["workspace","policy","members","teams","connectors"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connectors":{"post":{"summary":"Connect a service: the secret is sealed to the gate and never returned (admins)","tags":["settings"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1,"maxLength":60},"secret":{"type":"string","minLength":1,"maxLength":4096}},"required":["connectorId","displayName","secret"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections":{"get":{"summary":"Connections with health and the apps that use them (members)","tags":["connectors"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"canManage":{"type":"boolean"},"allowed":{"type":"array","items":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true},"http":{"type":"object","nullable":true,"properties":{"baseUrl":{"type":"string","minLength":9,"maxLength":700},"host":{"type":"string","minLength":3,"maxLength":100},"auth":{"anyOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["query"]},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["style","name"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8},"testPath":{"type":"string","nullable":true,"maxLength":512},"testable":{"type":"boolean"},"preset":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"}},"required":["baseUrl","host","auth","methods","pathPrefix","headers","testPath"]},"serviceAccount":{"type":"object","nullable":true,"properties":{"email":{"type":"string","minLength":3,"maxLength":254}},"required":["email"]},"usedBy":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]}},"required":["appId","name","archetype","category","status"]}},"health":{"type":"object","properties":{"calls24h":{"type":"integer","minimum":0},"errors24h":{"type":"integer","minimum":0},"blocked24h":{"type":"integer","minimum":0},"lastCallAt":{"type":"string","nullable":true,"format":"date-time"},"lastStatus":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"lastError":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","status","reason"]},"lastTest":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"ok":{"type":"boolean","nullable":true},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","ok","status","reason"]}},"required":["calls24h","errors24h","blocked24h","lastCallAt","lastStatus","lastError","lastTest"]}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId","http","usedBy","health"]}},"oauthReady":{"type":"array","items":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"default":[]}},"required":["workspaceId","canManage","allowed","connections"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"connections.list"}}},"/v1/workspaces/{ws}/connectors/http":{"post":{"summary":"Add an HTTP API connection: base URL, auth style, write-only secret (admins)","tags":["connectors"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":60},"baseUrl":{"type":"string","minLength":9,"maxLength":700},"auth":{"oneOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512,"default":"/"},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8,"default":[]},"testPath":{"type":"string","nullable":true,"maxLength":512,"default":null},"testable":{"type":"boolean","default":true},"preset":{"type":"string","nullable":true,"pattern":"^[a-z0-9-]{2,32}$","default":null},"secret":{"type":"string","minLength":1,"maxLength":4096}},"required":["displayName","baseUrl","auth","methods"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true},"http":{"type":"object","nullable":true,"properties":{"baseUrl":{"type":"string","minLength":9,"maxLength":700},"host":{"type":"string","minLength":3,"maxLength":100},"auth":{"anyOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["query"]},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["style","name"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8},"testPath":{"type":"string","nullable":true,"maxLength":512},"testable":{"type":"boolean"},"preset":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"}},"required":["baseUrl","host","auth","methods","pathPrefix","headers","testPath"]},"serviceAccount":{"type":"object","nullable":true,"properties":{"email":{"type":"string","minLength":3,"maxLength":254}},"required":["email"]},"usedBy":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]}},"required":["appId","name","archetype","category","status"]}},"health":{"type":"object","properties":{"calls24h":{"type":"integer","minimum":0},"errors24h":{"type":"integer","minimum":0},"blocked24h":{"type":"integer","minimum":0},"lastCallAt":{"type":"string","nullable":true,"format":"date-time"},"lastStatus":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"lastError":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","status","reason"]},"lastTest":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"ok":{"type":"boolean","nullable":true},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","ok","status","reason"]}},"required":["calls24h","errors24h","blocked24h","lastCallAt","lastStatus","lastError","lastTest"]}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId","http","usedBy","health"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}/http":{"put":{"summary":"Change an HTTP API connection; a new host needs the secret again (admins)","tags":["connectors"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":60},"baseUrl":{"type":"string","minLength":9,"maxLength":700},"auth":{"oneOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512,"default":"/"},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8,"default":[]},"testPath":{"type":"string","nullable":true,"maxLength":512,"default":null},"testable":{"type":"boolean","default":true},"preset":{"type":"string","nullable":true,"pattern":"^[a-z0-9-]{2,32}$","default":null},"secret":{"type":"string","minLength":1,"maxLength":4096}},"required":["displayName","baseUrl","auth","methods"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true},"http":{"type":"object","nullable":true,"properties":{"baseUrl":{"type":"string","minLength":9,"maxLength":700},"host":{"type":"string","minLength":3,"maxLength":100},"auth":{"anyOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["query"]},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["style","name"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8},"testPath":{"type":"string","nullable":true,"maxLength":512},"testable":{"type":"boolean"},"preset":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"}},"required":["baseUrl","host","auth","methods","pathPrefix","headers","testPath"]},"serviceAccount":{"type":"object","nullable":true,"properties":{"email":{"type":"string","minLength":3,"maxLength":254}},"required":["email"]},"usedBy":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]}},"required":["appId","name","archetype","category","status"]}},"health":{"type":"object","properties":{"calls24h":{"type":"integer","minimum":0},"errors24h":{"type":"integer","minimum":0},"blocked24h":{"type":"integer","minimum":0},"lastCallAt":{"type":"string","nullable":true,"format":"date-time"},"lastStatus":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"lastError":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","status","reason"]},"lastTest":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"ok":{"type":"boolean","nullable":true},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","ok","status","reason"]}},"required":["calls24h","errors24h","blocked24h","lastCallAt","lastStatus","lastError","lastTest"]}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId","http","usedBy","health"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}/test":{"post":{"summary":"Test a connection with one harmless call through the gate (admins)","tags":["connectors"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","nullable":true},"checked":{"type":"string","enum":["gate","format","mock"]},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"latencyMs":{"type":"integer","nullable":true,"minimum":0},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"connection":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true},"http":{"type":"object","nullable":true,"properties":{"baseUrl":{"type":"string","minLength":9,"maxLength":700},"host":{"type":"string","minLength":3,"maxLength":100},"auth":{"anyOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["query"]},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["style","name"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8},"testPath":{"type":"string","nullable":true,"maxLength":512},"testable":{"type":"boolean"},"preset":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"}},"required":["baseUrl","host","auth","methods","pathPrefix","headers","testPath"]},"serviceAccount":{"type":"object","nullable":true,"properties":{"email":{"type":"string","minLength":3,"maxLength":254}},"required":["email"]},"usedBy":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]}},"required":["appId","name","archetype","category","status"]}},"health":{"type":"object","properties":{"calls24h":{"type":"integer","minimum":0},"errors24h":{"type":"integer","minimum":0},"blocked24h":{"type":"integer","minimum":0},"lastCallAt":{"type":"string","nullable":true,"format":"date-time"},"lastStatus":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"lastError":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","status","reason"]},"lastTest":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"ok":{"type":"boolean","nullable":true},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","ok","status","reason"]}},"required":["calls24h","errors24h","blocked24h","lastCallAt","lastStatus","lastError","lastTest"]}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId","http","usedBy","health"]}},"required":["ok","checked","status","latencyMs","reason","connection"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}":{"delete":{"summary":"Disconnect: delete the sealed secret; apps that use it stop calling (admins)","tags":["connectors"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"affectedApps":{"type":"array","items":{"type":"string"}},"connection":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"status":{"type":"string","enum":["connected","expired","error","disconnected"]},"connectedAt":{"type":"string","nullable":true,"format":"date-time"},"secret":{"type":"string","enum":["write-only","none"]},"keyId":{"type":"string","nullable":true},"http":{"type":"object","nullable":true,"properties":{"baseUrl":{"type":"string","minLength":9,"maxLength":700},"host":{"type":"string","minLength":3,"maxLength":100},"auth":{"anyOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["query"]},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["style","name"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1,"maxItems":5},"pathPrefix":{"type":"string","maxLength":512},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]},"maxItems":8},"testPath":{"type":"string","nullable":true,"maxLength":512},"testable":{"type":"boolean"},"preset":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"}},"required":["baseUrl","host","auth","methods","pathPrefix","headers","testPath"]},"serviceAccount":{"type":"object","nullable":true,"properties":{"email":{"type":"string","minLength":3,"maxLength":254}},"required":["email"]},"usedBy":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]}},"required":["appId","name","archetype","category","status"]}},"health":{"type":"object","properties":{"calls24h":{"type":"integer","minimum":0},"errors24h":{"type":"integer","minimum":0},"blocked24h":{"type":"integer","minimum":0},"lastCallAt":{"type":"string","nullable":true,"format":"date-time"},"lastStatus":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"lastError":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","status","reason"]},"lastTest":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"ok":{"type":"boolean","nullable":true},"status":{"type":"integer","nullable":true,"minimum":0,"maximum":999},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","ok","status","reason"]}},"required":["calls24h","errors24h","blocked24h","lastCallAt","lastStatus","lastError","lastTest"]}},"required":["id","connectorId","displayName","status","connectedAt","secret","keyId","http","usedBy","health"]}},"required":["ok","affectedApps","connection"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/approvals/{id}/decision":{"post":{"summary":"Approve or decline (only the person asked)","tags":["approvals"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]}},"required":["decision"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"approvals.decide"}}},"/v1/workspaces/{ws}/backend/projects":{"get":{"summary":"Backend projects you can see","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"url":{"type":"string","minLength":1},"tableCount":{"type":"integer","minimum":0},"keyCount":{"type":"integer","minimum":0},"rowCount":{"type":"integer","minimum":0},"requestsPerMin":{"type":"number","minimum":0}},"required":["id","name","slug","description","createdAt","url","tableCount","keyCount","rowCount","requestsPerMin"]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"backends.list"}},"post":{"summary":"New backend: a datacenter on the island, a sample table, no keys yet","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","maxLength":280,"default":""},"starter":{"type":"string","enum":["orders","waitlist","blank"],"default":"orders"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"url":{"type":"string","minLength":1},"tableCount":{"type":"integer","minimum":0},"keyCount":{"type":"integer","minimum":0},"rowCount":{"type":"integer","minimum":0},"requestsPerMin":{"type":"number","minimum":0},"workspaceId":{"type":"string","minLength":1},"createdBy":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"rateLimitPerMin":{"type":"integer","minimum":10,"maximum":100000},"ipRatePerMin":{"type":"integer","minimum":10,"maximum":100000},"maxBodyKb":{"type":"integer","minimum":1,"maximum":1024},"allowedOrigins":{"type":"array","items":{"type":"string","maxLength":200,"pattern":"^(\\*|https?:\\/\\/[a-z0-9.-]+(:\\d{1,5})?)$/i"},"maxItems":20},"identity":{"type":"object","nullable":true,"properties":{"issuer":{"type":"string","minLength":1,"maxLength":200},"audience":{"type":"string","minLength":1,"maxLength":200},"roleClaim":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,40}$","default":"role"},"keys":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["RSA"]},"alg":{"type":"string","enum":["RS256"]},"n":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"e":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","n","e"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["EC"]},"alg":{"type":"string","enum":["ES256"]},"crv":{"type":"string","enum":["P-256"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"y":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x","y"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["OKP"]},"alg":{"type":"string","enum":["EdDSA"]},"crv":{"type":"string","enum":["Ed25519"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x"],"additionalProperties":false}]},"minItems":1,"maxItems":8}},"required":["issuer","audience","keys"]}},"required":["rateLimitPerMin","ipRatePerMin","maxBodyKb","allowedOrigins","identity"]},"tables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}},"canEdit":{"type":"boolean"},"canAdmin":{"type":"boolean"}},"required":["id","name","slug","description","createdAt","url","tableCount","keyCount","rowCount","requestsPerMin","workspaceId","createdBy","settings","tables","canEdit","canAdmin"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"backends.create"}}},"/v1/backend/projects/{projectId}":{"get":{"summary":"One backend: tables, settings, counts and what you may change","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"url":{"type":"string","minLength":1},"tableCount":{"type":"integer","minimum":0},"keyCount":{"type":"integer","minimum":0},"rowCount":{"type":"integer","minimum":0},"requestsPerMin":{"type":"number","minimum":0},"workspaceId":{"type":"string","minLength":1},"createdBy":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"rateLimitPerMin":{"type":"integer","minimum":10,"maximum":100000},"ipRatePerMin":{"type":"integer","minimum":10,"maximum":100000},"maxBodyKb":{"type":"integer","minimum":1,"maximum":1024},"allowedOrigins":{"type":"array","items":{"type":"string","maxLength":200,"pattern":"^(\\*|https?:\\/\\/[a-z0-9.-]+(:\\d{1,5})?)$/i"},"maxItems":20},"identity":{"type":"object","nullable":true,"properties":{"issuer":{"type":"string","minLength":1,"maxLength":200},"audience":{"type":"string","minLength":1,"maxLength":200},"roleClaim":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,40}$","default":"role"},"keys":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["RSA"]},"alg":{"type":"string","enum":["RS256"]},"n":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"e":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","n","e"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["EC"]},"alg":{"type":"string","enum":["ES256"]},"crv":{"type":"string","enum":["P-256"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"y":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x","y"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["OKP"]},"alg":{"type":"string","enum":["EdDSA"]},"crv":{"type":"string","enum":["Ed25519"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x"],"additionalProperties":false}]},"minItems":1,"maxItems":8}},"required":["issuer","audience","keys"]}},"required":["rateLimitPerMin","ipRatePerMin","maxBodyKb","allowedOrigins","identity"]},"tables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}},"canEdit":{"type":"boolean"},"canAdmin":{"type":"boolean"}},"required":["id","name","slug","description","createdAt","url","tableCount","keyCount","rowCount","requestsPerMin","workspaceId","createdBy","settings","tables","canEdit","canAdmin"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"backends.get"}}},"/v1/backend/projects/{projectId}/settings":{"patch":{"summary":"Rate limit, allowed browser origins and public-read tables (owner)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rateLimitPerMin":{"type":"integer","minimum":10,"maximum":100000},"ipRatePerMin":{"type":"integer","minimum":10,"maximum":100000},"maxBodyKb":{"type":"integer","minimum":1,"maximum":1024},"allowedOrigins":{"type":"array","items":{"type":"string","maxLength":200,"pattern":"^(\\*|https?:\\/\\/[a-z0-9.-]+(:\\d{1,5})?)$/i"},"maxItems":20},"identity":{"type":"object","nullable":true,"properties":{"issuer":{"type":"string","minLength":1,"maxLength":200},"audience":{"type":"string","minLength":1,"maxLength":200},"roleClaim":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,40}$","default":"role"},"keys":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["RSA"]},"alg":{"type":"string","enum":["RS256"]},"n":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"e":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","n","e"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["EC"]},"alg":{"type":"string","enum":["ES256"]},"crv":{"type":"string","enum":["P-256"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"y":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x","y"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["OKP"]},"alg":{"type":"string","enum":["EdDSA"]},"crv":{"type":"string","enum":["Ed25519"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x"],"additionalProperties":false}]},"minItems":1,"maxItems":8}},"required":["issuer","audience","keys"]},"publicReadTables":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"maxItems":64},"confirmPublicRead":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"maxItems":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"url":{"type":"string","minLength":1},"tableCount":{"type":"integer","minimum":0},"keyCount":{"type":"integer","minimum":0},"rowCount":{"type":"integer","minimum":0},"requestsPerMin":{"type":"number","minimum":0},"workspaceId":{"type":"string","minLength":1},"createdBy":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"rateLimitPerMin":{"type":"integer","minimum":10,"maximum":100000},"ipRatePerMin":{"type":"integer","minimum":10,"maximum":100000},"maxBodyKb":{"type":"integer","minimum":1,"maximum":1024},"allowedOrigins":{"type":"array","items":{"type":"string","maxLength":200,"pattern":"^(\\*|https?:\\/\\/[a-z0-9.-]+(:\\d{1,5})?)$/i"},"maxItems":20},"identity":{"type":"object","nullable":true,"properties":{"issuer":{"type":"string","minLength":1,"maxLength":200},"audience":{"type":"string","minLength":1,"maxLength":200},"roleClaim":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,40}$","default":"role"},"keys":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["RSA"]},"alg":{"type":"string","enum":["RS256"]},"n":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"e":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","n","e"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["EC"]},"alg":{"type":"string","enum":["ES256"]},"crv":{"type":"string","enum":["P-256"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"},"y":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x","y"],"additionalProperties":false},{"type":"object","properties":{"kid":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"use":{"type":"string","enum":["sig"]},"d":{"type":"string","maxLength":0},"p":{"type":"string","maxLength":0},"q":{"type":"string","maxLength":0},"dp":{"type":"string","maxLength":0},"dq":{"type":"string","maxLength":0},"qi":{"type":"string","maxLength":0},"k":{"type":"string","maxLength":0},"kty":{"type":"string","enum":["OKP"]},"alg":{"type":"string","enum":["EdDSA"]},"crv":{"type":"string","enum":["Ed25519"]},"x":{"type":"string","minLength":1,"maxLength":1400,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["kid","kty","crv","x"],"additionalProperties":false}]},"minItems":1,"maxItems":8}},"required":["issuer","audience","keys"]}},"required":["rateLimitPerMin","ipRatePerMin","maxBodyKb","allowedOrigins","identity"]},"tables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}},"canEdit":{"type":"boolean"},"canAdmin":{"type":"boolean"}},"required":["id","name","slug","description","createdAt","url","tableCount","keyCount","rowCount","requestsPerMin","workspaceId","createdBy","settings","tables","canEdit","canAdmin"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/backend/projects/{projectId}/logs":{"get":{"summary":"Recent data API requests and the last hour of load","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"logs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"method":{"type":"string","minLength":1,"maxLength":10},"path":{"type":"string","maxLength":300},"table":{"type":"string","nullable":true},"status":{"type":"integer","minimum":100,"maximum":599},"durationMs":{"type":"integer","minimum":0},"keyPrefix":{"type":"string","nullable":true},"keyName":{"type":"string","nullable":true,"maxLength":60},"keyKind":{"type":"string","nullable":true,"enum":["publishable","secret",null]},"rows":{"type":"integer","nullable":true,"minimum":0},"errorCode":{"type":"string","nullable":true}},"required":["id","at","method","path","table","status","durationMs","keyPrefix","keyName","keyKind","rows","errorCode"]}},"metrics":{"type":"object","properties":{"windowMinutes":{"type":"integer","minimum":1},"perMinute":{"type":"array","items":{"type":"integer","minimum":0},"maxItems":120},"requestsPerMin":{"type":"number","minimum":0},"total":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"p50Ms":{"type":"number","nullable":true,"minimum":0},"p95Ms":{"type":"number","nullable":true,"minimum":0},"lastRequestAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["windowMinutes","perMinute","requestsPerMin","total","errors","p50Ms","p95Ms","lastRequestAt"]}},"required":["logs","metrics"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"backends.logs"}}},"/v1/backend/projects/{projectId}/tables":{"post":{"summary":"Create a table with typed columns (id and created_at are added)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean","default":true}},"required":["name","type"]},"maxItems":64,"default":[]},"publicRead":{"type":"boolean","default":false},"confirmPublic":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"tables.create"}}},"/v1/backend/projects/{projectId}/tables/{table}/columns":{"post":{"summary":"Add a column","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean","default":true}},"required":["name","type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"tables.add_column"}}},"/v1/backend/projects/{projectId}/tables/{table}":{"delete":{"summary":"Drop a table and its rows (the table's name typed back)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"}},"required":["confirm"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/backend/projects/{projectId}/tables/{table}/rows":{"get":{"summary":"A page of rows (same filters as the data API)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["rows","total","limit","offset"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"rows.list"}},"post":{"summary":"Insert rows","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":{"nullable":true}},{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}},"minItems":1,"maxItems":500}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"rows.insert"}}},"/v1/backend/projects/{projectId}/tables/{table}/rows/{id}":{"patch":{"summary":"Change one row","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":20},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"rows.update"}},"delete":{"summary":"Delete one row","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":20},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"rows.delete"}}},"/v1/backend/projects/{projectId}/tables/{table}/import":{"post":{"summary":"Append rows from CSV (header row = column names; all or nothing per check)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":1000000},"importId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"}},"required":["csv"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"inserted":{"type":"integer","minimum":0},"errors":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer","minimum":1},"message":{"type":"string"}},"required":["line","message"]},"maxItems":20}},"required":["inserted","errors"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/backend/projects/{projectId}/tables/{table}/export":{"get":{"summary":"Every row as CSV or JSON (up to 5,000)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"},{"schema":{"type":"string","enum":["csv","json"],"default":"csv"},"required":false,"name":"format","in":"query"}],"responses":{"200":{"description":"The file","content":{"text/csv":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}}}}},"x-qaldy-token":{"scope":"read","name":"rows.export"}}},"/v1/backend/projects/{projectId}/keys":{"get":{"summary":"Keys of a backend (prefixes only; owner)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"kind":{"type":"string","enum":["publishable","secret"]},"prefix":{"type":"string","minLength":1},"last4":{"type":"string","minLength":4,"maxLength":4},"scopes":{"type":"array","items":{"type":"string","enum":["rows:read","rows:write","schema:write"]},"minItems":1,"maxItems":3},"tables":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"maxItems":64},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","minLength":1},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","kind","prefix","last4","scopes","tables","createdAt","createdBy","lastUsedAt","revokedAt"]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Create a key; its value is in this answer only (owner)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["publishable","secret"]},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["rows:read","rows:write","schema:write"]},"minItems":1,"maxItems":3},"tables":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"minItems":1,"maxItems":64}},"required":["kind","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"kind":{"type":"string","enum":["publishable","secret"]},"prefix":{"type":"string","minLength":1},"last4":{"type":"string","minLength":4,"maxLength":4},"scopes":{"type":"array","items":{"type":"string","enum":["rows:read","rows:write","schema:write"]},"minItems":1,"maxItems":3},"tables":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"maxItems":64},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","minLength":1},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","kind","prefix","last4","scopes","tables","createdAt","createdBy","lastUsedAt","revokedAt"]},"secret":{"type":"string","pattern":"^qk_(pub|sec)_[A-Za-z0-9]{32}$"}},"required":["key","secret"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/backend/projects/{projectId}/keys/{keyId}":{"delete":{"summary":"Revoke a key at once (owner)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"keyId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/backend/projects/{projectId}/tables/{table}/policy":{"put":{"summary":"Set the rules of a table from their sentences (owner)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sentences":{"type":"array","items":{"type":"string","minLength":1,"maxLength":400},"maxItems":16},"confirmPublic":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"}},"required":["sentences"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"table":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,47}$"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"type":{"type":"string","enum":["text","integer","real","boolean","timestamp","json"]},"nullable":{"type":"boolean"},"system":{"type":"boolean"}},"required":["name","type","nullable","system"]},"minItems":2,"maxItems":66},"publicRead":{"type":"boolean"},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,31}$"},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["anyone"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["visitors"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["signed_in"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["role"]},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"required":["kind","role"]}]},"actions":{"type":"array","items":{"type":"string","enum":["read","insert","update","delete"]},"minItems":1,"maxItems":4},"where":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["all"]}},"required":["t"]},{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]},{"type":"object","properties":{"t":{"type":"string","enum":["or"]},"of":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]},{"type":"object","properties":{"t":{"type":"string","enum":["and"]},"of":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"t":{"type":"string","enum":["cmp"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"]},"value":{"oneOf":[{"type":"object","properties":{"k":{"type":"string","enum":["lit"]},"v":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"required":["k","v"]},{"type":"object","properties":{"k":{"type":"string","enum":["me"]}},"required":["k"]},{"type":"object","properties":{"k":{"type":"string","enum":["claim"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"}},"required":["k","name"]}]}},"required":["t","column","op","value"]},{"type":"object","properties":{"t":{"type":"string","enum":["in"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"values":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"minItems":1,"maxItems":20}},"required":["t","column","values"]},{"type":"object","properties":{"t":{"type":"string","enum":["null"]},"column":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"isNull":{"type":"boolean"}},"required":["t","column","isNull"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"minItems":2,"maxItems":8}},"required":["t","of"]}]},"columns":{"type":"array","nullable":true,"items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"minItems":1,"maxItems":66},"migrated":{"type":"boolean"},"sentence":{"type":"string","maxLength":400}},"required":["id","audience","actions","where","columns","sentence"]},"maxItems":16},"rowCount":{"type":"integer","nullable":true,"minimum":0},"createdAt":{"type":"string","format":"date-time"}},"required":["name","columns","publicRead","rules","rowCount","createdAt"]},"warnings":{"type":"array","items":{"type":"string","maxLength":400},"maxItems":20}},"required":["table","warnings"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/backend/projects/{projectId}/tables/{table}/policy/test":{"post":{"summary":"Try the rules as a visitor, a signed-in person or a key; nothing is written (owner)","tags":["backend"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":48},"required":true,"name":"table","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["visitor"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["person"]},"sub":{"type":"string","minLength":1,"maxLength":128},"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$","default":"member"},"claims":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"default":{}}},"required":["kind","sub"]},{"type":"object","properties":{"kind":{"type":"string","enum":["key"]},"keyId":{"type":"string","minLength":1,"maxLength":64}},"required":["kind","keyId"]}]},"action":{"type":"string","enum":["read","insert","update","delete"],"default":"read"},"query":{"type":"string","maxLength":500,"default":""},"row":{"type":"object","additionalProperties":{"nullable":true}},"rowId":{"type":"integer","minimum":1}},"required":["principal"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"who":{"type":"string"},"action":{"type":"string","enum":["read","insert","update","delete"]},"allowed":{"type":"boolean"},"reason":{"type":"string","nullable":true},"hint":{"type":"string","nullable":true},"matched":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sentence":{"type":"string"}},"required":["id","sentence"]}},"readableColumns":{"type":"array","items":{"type":"string"}},"hiddenColumns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}},"maxItems":20},"hiddenPerRow":{"type":"array","items":{"type":"array","items":{"type":"string"}},"maxItems":20},"totalRows":{"type":"integer","nullable":true,"minimum":0},"visibleRows":{"type":"integer","nullable":true,"minimum":0},"rowPasses":{"type":"boolean","nullable":true},"stamps":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"queryError":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["who","action","allowed","reason","hint","matched","readableColumns","hiddenColumns","rows","hiddenPerRow","totalRows","visibleRows","rowPasses","stamps","queryError"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/sites":{"get":{"summary":"Sites you can open: status, live version and page views for 14 days","tags":["sites"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","nullable":true},"status":{"type":"string","enum":["live","paused","empty"]},"sharing":{"type":"string","enum":["private","shared","workspace","public"]},"current":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]},"versionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"spark":{"type":"array","items":{"type":"integer","minimum":0}},"pages14d":{"type":"integer","minimum":0},"canEdit":{"type":"boolean"}},"required":["id","workspaceId","name","slug","url","status","sharing","current","versionCount","createdAt","updatedAt","spark","pages14d","canEdit"]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"sites.list"}}},"/v1/sites/{id}":{"get":{"summary":"One site: versions, traffic and storage","tags":["sites"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","nullable":true},"status":{"type":"string","enum":["live","paused","empty"]},"sharing":{"type":"string","enum":["private","shared","workspace","public"]},"current":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]},"versionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"spark":{"type":"array","items":{"type":"integer","minimum":0}},"pages14d":{"type":"integer","minimum":0},"canEdit":{"type":"boolean"},"description":{"type":"string"},"canDelete":{"type":"boolean"},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]}},"usage":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"pages":{"type":"integer","minimum":0},"requests":{"type":"integer","minimum":0},"bytes":{"type":"number","minimum":0},"errors":{"type":"integer","minimum":0},"viewers":{"type":"integer","minimum":0}},"required":["date","pages","requests","bytes","errors","viewers"]},"maxItems":14},"pages":{"type":"integer","minimum":0},"requests":{"type":"integer","minimum":0},"bytes":{"type":"number","minimum":0},"errors":{"type":"integer","minimum":0},"viewers":{"type":"integer","minimum":0},"approximate":{"type":"boolean","enum":[true]}},"required":["days","pages","requests","bytes","errors","viewers","approximate"]},"storage":{"type":"object","properties":{"usedBytes":{"type":"number","minimum":0},"limitBytes":{"type":"number","minimum":0}},"required":["usedBytes","limitBytes"]}},"required":["id","workspaceId","name","slug","url","status","sharing","current","versionCount","createdAt","updatedAt","spark","pages14d","canEdit","description","canDelete","versions","usage","storage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"sites.get"}},"delete":{"summary":"Delete a site, all its versions and the files only it used (owner; type its name)","tags":["sites"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","minLength":1,"maxLength":200}},"required":["confirm"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/sites/{id}/activate":{"post":{"summary":"Make a version live: the newest, or an older one to roll back","tags":["sites"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","minLength":1,"maxLength":128}},"required":["versionId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","nullable":true},"status":{"type":"string","enum":["live","paused","empty"]},"sharing":{"type":"string","enum":["private","shared","workspace","public"]},"current":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]},"versionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"spark":{"type":"array","items":{"type":"integer","minimum":0}},"pages14d":{"type":"integer","minimum":0},"canEdit":{"type":"boolean"},"description":{"type":"string"},"canDelete":{"type":"boolean"},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]}},"usage":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"pages":{"type":"integer","minimum":0},"requests":{"type":"integer","minimum":0},"bytes":{"type":"number","minimum":0},"errors":{"type":"integer","minimum":0},"viewers":{"type":"integer","minimum":0}},"required":["date","pages","requests","bytes","errors","viewers"]},"maxItems":14},"pages":{"type":"integer","minimum":0},"requests":{"type":"integer","minimum":0},"bytes":{"type":"number","minimum":0},"errors":{"type":"integer","minimum":0},"viewers":{"type":"integer","minimum":0},"approximate":{"type":"boolean","enum":[true]}},"required":["days","pages","requests","bytes","errors","viewers","approximate"]},"storage":{"type":"object","properties":{"usedBytes":{"type":"number","minimum":0},"limitBytes":{"type":"number","minimum":0}},"required":["usedBytes","limitBytes"]}},"required":["id","workspaceId","name","slug","url","status","sharing","current","versionCount","createdAt","updatedAt","spark","pages14d","canEdit","description","canDelete","versions","usage","storage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/sites/{id}/versions/{versionId}":{"delete":{"summary":"Delete a version that is not live, and the files only it used","tags":["sites"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","nullable":true},"status":{"type":"string","enum":["live","paused","empty"]},"sharing":{"type":"string","enum":["private","shared","workspace","public"]},"current":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]},"versionCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"spark":{"type":"array","items":{"type":"integer","minimum":0}},"pages14d":{"type":"integer","minimum":0},"canEdit":{"type":"boolean"},"description":{"type":"string"},"canDelete":{"type":"boolean"},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fileCount":{"type":"integer","minimum":0},"totalBytes":{"type":"integer","minimum":0},"spa":{"type":"boolean"},"hasIndex":{"type":"boolean"},"note":{"type":"string","nullable":true},"source":{"type":"string","enum":["console","api"]},"current":{"type":"boolean"}},"required":["id","number","createdAt","createdBy","bundleHash","fileCount","totalBytes","spa","hasIndex","note","source","current"]}},"usage":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"pages":{"type":"integer","minimum":0},"requests":{"type":"integer","minimum":0},"bytes":{"type":"number","minimum":0},"errors":{"type":"integer","minimum":0},"viewers":{"type":"integer","minimum":0}},"required":["date","pages","requests","bytes","errors","viewers"]},"maxItems":14},"pages":{"type":"integer","minimum":0},"requests":{"type":"integer","minimum":0},"bytes":{"type":"number","minimum":0},"errors":{"type":"integer","minimum":0},"viewers":{"type":"integer","minimum":0},"approximate":{"type":"boolean","enum":[true]}},"required":["days","pages","requests","bytes","errors","viewers","approximate"]},"storage":{"type":"object","properties":{"usedBytes":{"type":"number","minimum":0},"limitBytes":{"type":"number","minimum":0}},"required":["usedBytes","limitBytes"]}},"required":["id","workspaceId","name","slug","url","status","sharing","current","versionCount","createdAt","updatedAt","spark","pages14d","canEdit","description","canDelete","versions","usage","storage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/sites/{id}/versions/{versionId}/files":{"get":{"summary":"The files of one version: path, size and type","tags":["sites"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"spa":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0},"type":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["path","size","type","sha256"]}}},"required":["versionId","spa","files"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/domains":{"get":{"summary":"The custom hostnames of an app or site, with the DNS records to add","tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string"},"available":{"type":"boolean"},"unavailable":{"type":"object","nullable":true,"properties":{"code":{"type":"string","enum":["not_configured","disabled_for_workspace"]},"message":{"type":"string","maxLength":400},"hint":{"type":"string","maxLength":400}},"required":["code","message","hint"]},"canManage":{"type":"boolean"},"cnameTarget":{"type":"string","nullable":true},"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"appId":{"type":"string","minLength":1,"maxLength":64},"hostname":{"type":"string","minLength":4,"maxLength":253},"state":{"type":"string","enum":["pending_ownership","pending_dns","pending_cert","active","failed"]},"waiting":{"type":"string","nullable":true,"enum":["txt_missing","txt_mismatch","dns_unreachable","cname_missing","cname_elsewhere","cert_validating","cert_issuing","cert_deploying","provider_asks","provider_unavailable",null]},"observed":{"type":"string","nullable":true,"maxLength":300},"providerNotes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":5},"failure":{"type":"string","nullable":true,"enum":["timed_out","blocked","cert_failed","removed_upstream","provider_error",null]},"records":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["ownership","route","certificate"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"string","minLength":1,"maxLength":600},"seen":{"type":"string","enum":["done","waiting","unknown"]}},"required":["purpose","type","name","value","seen"]}},"url":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"stateSince":{"type":"string","format":"date-time"},"lastCheckedAt":{"type":"string","nullable":true,"format":"date-time"},"deadlineAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","appId","hostname","state","waiting","observed","providerNotes","failure","records","url","createdAt","stateSince","lastCheckedAt","deadlineAt","createdBy"]}},"limits":{"type":"object","properties":{"perApp":{"type":"integer","minimum":1},"perWorkspace":{"type":"integer","minimum":1},"usedInWorkspace":{"type":"integer","minimum":0}},"required":["perApp","perWorkspace","usedInWorkspace"]}},"required":["appId","available","unavailable","canManage","cnameTarget","domains","limits"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Attach a hostname to an app or site (owner); returns the DNS records to add","tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":300}},"required":["hostname"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"appId":{"type":"string","minLength":1,"maxLength":64},"hostname":{"type":"string","minLength":4,"maxLength":253},"state":{"type":"string","enum":["pending_ownership","pending_dns","pending_cert","active","failed"]},"waiting":{"type":"string","nullable":true,"enum":["txt_missing","txt_mismatch","dns_unreachable","cname_missing","cname_elsewhere","cert_validating","cert_issuing","cert_deploying","provider_asks","provider_unavailable",null]},"observed":{"type":"string","nullable":true,"maxLength":300},"providerNotes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":5},"failure":{"type":"string","nullable":true,"enum":["timed_out","blocked","cert_failed","removed_upstream","provider_error",null]},"records":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["ownership","route","certificate"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"string","minLength":1,"maxLength":600},"seen":{"type":"string","enum":["done","waiting","unknown"]}},"required":["purpose","type","name","value","seen"]}},"url":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"stateSince":{"type":"string","format":"date-time"},"lastCheckedAt":{"type":"string","nullable":true,"format":"date-time"},"deadlineAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","appId","hostname","state","waiting","observed","providerNotes","failure","records","url","createdAt","stateSince","lastCheckedAt","deadlineAt","createdBy"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/domains/{domainId}/check":{"post":{"summary":"Look at DNS and the certificate now; on a failed hostname, start over","tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"domainId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"appId":{"type":"string","minLength":1,"maxLength":64},"hostname":{"type":"string","minLength":4,"maxLength":253},"state":{"type":"string","enum":["pending_ownership","pending_dns","pending_cert","active","failed"]},"waiting":{"type":"string","nullable":true,"enum":["txt_missing","txt_mismatch","dns_unreachable","cname_missing","cname_elsewhere","cert_validating","cert_issuing","cert_deploying","provider_asks","provider_unavailable",null]},"observed":{"type":"string","nullable":true,"maxLength":300},"providerNotes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":5},"failure":{"type":"string","nullable":true,"enum":["timed_out","blocked","cert_failed","removed_upstream","provider_error",null]},"records":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["ownership","route","certificate"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"string","minLength":1,"maxLength":600},"seen":{"type":"string","enum":["done","waiting","unknown"]}},"required":["purpose","type","name","value","seen"]}},"url":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"stateSince":{"type":"string","format":"date-time"},"lastCheckedAt":{"type":"string","nullable":true,"format":"date-time"},"deadlineAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","appId","hostname","state","waiting","observed","providerNotes","failure","records","url","createdAt","stateSince","lastCheckedAt","deadlineAt","createdBy"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/domains/{domainId}":{"delete":{"summary":"Remove a hostname from an app or site (owner)","tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"domainId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/domains":{"get":{"summary":"Every custom hostname in the workspace on an app you can open","tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"unavailable":{"type":"object","nullable":true,"properties":{"code":{"type":"string","enum":["not_configured","disabled_for_workspace"]},"message":{"type":"string","maxLength":400},"hint":{"type":"string","maxLength":400}},"required":["code","message","hint"]},"cnameTarget":{"type":"string","nullable":true},"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"appId":{"type":"string","minLength":1,"maxLength":64},"hostname":{"type":"string","minLength":4,"maxLength":253},"state":{"type":"string","enum":["pending_ownership","pending_dns","pending_cert","active","failed"]},"waiting":{"type":"string","nullable":true,"enum":["txt_missing","txt_mismatch","dns_unreachable","cname_missing","cname_elsewhere","cert_validating","cert_issuing","cert_deploying","provider_asks","provider_unavailable",null]},"observed":{"type":"string","nullable":true,"maxLength":300},"providerNotes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":5},"failure":{"type":"string","nullable":true,"enum":["timed_out","blocked","cert_failed","removed_upstream","provider_error",null]},"records":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["ownership","route","certificate"]},"type":{"type":"string","enum":["TXT","CNAME"]},"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"string","minLength":1,"maxLength":600},"seen":{"type":"string","enum":["done","waiting","unknown"]}},"required":["purpose","type","name","value","seen"]}},"url":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"stateSince":{"type":"string","format":"date-time"},"lastCheckedAt":{"type":"string","nullable":true,"format":"date-time"},"deadlineAt":{"type":"string","nullable":true,"format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"appName":{"type":"string"},"appSlug":{"type":"string"},"kind":{"type":"string","enum":["app","site"]}},"required":["id","appId","hostname","state","waiting","observed","providerNotes","failure","records","url","createdAt","stateSince","lastCheckedAt","deadlineAt","createdBy","appName","appSlug","kind"]}},"limits":{"type":"object","properties":{"perWorkspace":{"type":"integer","minimum":1},"usedInWorkspace":{"type":"integer","minimum":0}},"required":["perWorkspace","usedInWorkspace"]}},"required":["available","unavailable","cnameTarget","domains","limits"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/sender-domain/check":{"post":{"summary":"Read the public DNS of the domain apps send email from (builders)","tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":300},"provider":{"type":"string","enum":["resend","postmark","other"]},"selector":{"type":"string","maxLength":80}},"required":["domain","provider"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"provider":{"type":"string","enum":["resend","postmark","other"]},"checkedAt":{"type":"string","format":"date-time"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["dkim","spf","return_path","dmarc"]},"status":{"type":"string","enum":["found","missing","unclear","skipped"]},"name":{"type":"string","maxLength":300},"found":{"type":"string","nullable":true,"maxLength":200},"note":{"type":"string","nullable":true,"enum":["dns_unreachable","selector_needed","other_policy","weak_policy",null]}},"required":["id","status","name","found","note"]}}},"required":["domain","provider","checkedAt","checks"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/me":{"get":{"summary":"Are you one of the Qaldy staff who review templates?","tags":["marketplace"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"staff":{"type":"boolean"}},"required":["staff"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/templates":{"get":{"summary":"Published partner templates, most installed first","tags":["marketplace"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt"]},"maxItems":200},"terms":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"publisherShareBps":{"type":"integer","minimum":0,"maximum":10000},"proposal":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["currency","publisherShareBps","proposal","billing"]}},"required":["items","terms"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/templates/{id}":{"get":{"summary":"One template: its words, pictures, permissions and Trust report","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"description":{"type":"string","maxLength":2000},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"trust":{"type":"object","properties":{"rubricVersion":{"type":"string","minLength":1},"score":{"type":"integer","minimum":0,"maximum":100},"band":{"type":"string","enum":["pass","review","fail"]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"passed":{"type":"boolean"},"weight":{"type":"number","minimum":0},"detail":{"type":"string"}},"required":["id","label","passed","weight","detail"]}}},"required":["rubricVersion","score","band","checks"]},"screenshots":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1,"maximum":3},"src":{"type":"string","minLength":1,"maxLength":400000}},"required":["n","src"]},"maxItems":3},"reviews":{"type":"array","items":{"type":"object","properties":{"stars":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","minLength":1,"maxLength":500},"at":{"type":"string","format":"date-time"}},"required":["stars","comment","at"]},"maxItems":5},"bundleBytes":{"type":"integer","minimum":0},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]},"mine":{"type":"boolean"}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","description","manifest","trust","screenshots","reviews","bundleBytes","decision","mine"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Edit a template you published, or send it for review again","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":60},"summary":{"type":"string","minLength":10,"maxLength":140},"description":{"type":"string","maxLength":2000},"publisherName":{"type":"string","minLength":2,"maxLength":60},"priceCents":{"type":"integer"},"screenshots":{"type":"array","items":{"type":"string","maxLength":273131,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$"},"maxItems":3},"refreshFromApp":{"type":"boolean"},"resubmit":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"appId":{"type":"string","nullable":true,"minLength":1},"appName":{"type":"string","nullable":true,"minLength":1},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]},"submittedAt":{"type":"string","format":"date-time"},"paidInstalls":{"type":"integer","minimum":0},"earnedCents":{"type":"integer","minimum":0}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","appId","appName","decision","submittedAt","paidInstalls","earnedCents"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/marketplace/templates/{id}/fit":{"get":{"summary":"What installing a published template would mean for this workspace","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"canInstall":{"type":"boolean"},"blocker":{"type":"string","nullable":true,"enum":["not_builder","needs_admin","policy","connections_missing","not_published",null]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"state":{"type":"string","enum":["ready","missing","blocked"]}},"required":["key","name","status","state"]},"maxItems":12},"installed":{"type":"object","nullable":true,"properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["appId","name"]},"chargeCents":{"type":"integer","minimum":0},"needsAdmin":{"type":"boolean"},"yourRating":{"type":"integer","nullable":true,"minimum":1,"maximum":5},"mayRate":{"type":"boolean"}},"required":["workspaceId","canInstall","blocker","connectors","installed","chargeCents","needsAdmin","yourRating","mayRate"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/marketplace/templates/{id}/install":{"post":{"summary":"Install a published template as a new, private app","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmPriceCents":{"type":"integer","minimum":0}},"required":["confirmPriceCents"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"chargedCents":{"type":"integer","minimum":0}},"required":["appId","chargedCents"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/marketplace/templates/{id}/rating":{"put":{"summary":"Rate a template your workspace installed","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stars":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":500}},"required":["stars"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"yours":{"type":"integer","minimum":1,"maximum":5}},"required":["rating","yours"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/marketplace/templates":{"post":{"summary":"Send an app of this workspace for review as a template","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":3,"maxLength":60},"summary":{"type":"string","minLength":10,"maxLength":140},"description":{"type":"string","maxLength":2000,"default":""},"publisherName":{"type":"string","minLength":2,"maxLength":60},"priceCents":{"type":"integer"},"screenshots":{"type":"array","items":{"type":"string","maxLength":273131,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$"},"maxItems":3,"default":[]},"acceptTerms":{"type":"boolean","enum":[true]}},"required":["appId","name","summary","publisherName","priceCents","acceptTerms"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"appId":{"type":"string","nullable":true,"minLength":1},"appName":{"type":"string","nullable":true,"minLength":1},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]},"submittedAt":{"type":"string","format":"date-time"},"paidInstalls":{"type":"integer","minimum":0},"earnedCents":{"type":"integer","minimum":0}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","appId","appName","decision","submittedAt","paidInstalls","earnedCents"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/marketplace/listings":{"get":{"summary":"This workspace’s templates in every status, with installs and earnings","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"appId":{"type":"string","nullable":true,"minLength":1},"appName":{"type":"string","nullable":true,"minLength":1},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]},"submittedAt":{"type":"string","format":"date-time"},"paidInstalls":{"type":"integer","minimum":0},"earnedCents":{"type":"integer","minimum":0}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","appId","appName","decision","submittedAt","paidInstalls","earnedCents"]},"maxItems":20}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/marketplace/earnings":{"get":{"summary":"The revenue-share ledger of this workspace’s templates (Preview: no money moves)","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"terms":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"publisherShareBps":{"type":"integer","minimum":0,"maximum":10000},"proposal":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["currency","publisherShareBps","proposal","billing"]},"totals":{"type":"object","properties":{"installs":{"type":"integer","minimum":0},"paidInstalls":{"type":"integer","minimum":0},"grossCents":{"type":"integer","minimum":0},"publisherCents":{"type":"integer","minimum":0},"qaldyCents":{"type":"integer","minimum":0}},"required":["installs","paidInstalls","grossCents","publisherCents","qaldyCents"]},"byTemplate":{"type":"array","items":{"type":"object","properties":{"templateId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"installs":{"type":"integer","minimum":0},"paidInstalls":{"type":"integer","minimum":0},"grossCents":{"type":"integer","minimum":0},"publisherCents":{"type":"integer","minimum":0}},"required":["templateId","name","installs","paidInstalls","grossCents","publisherCents"]},"maxItems":20},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"paidInstalls":{"type":"integer","minimum":0},"grossCents":{"type":"integer","minimum":0},"publisherCents":{"type":"integer","minimum":0}},"required":["month","paidInstalls","grossCents","publisherCents"]},"maxItems":36},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"templateId":{"type":"string","minLength":1},"templateName":{"type":"string","minLength":1},"grossCents":{"type":"integer","minimum":0},"publisherCents":{"type":"integer","minimum":0},"qaldyCents":{"type":"integer","minimum":0},"publisherBps":{"type":"integer","minimum":0,"maximum":10000},"status":{"type":"string","enum":["preview"]}},"required":["id","at","templateId","templateName","grossCents","publisherCents","qaldyCents","publisherBps","status"]},"maxItems":100}},"required":["terms","totals","byTemplate","months","entries"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/marketplace":{"get":{"summary":"Is this app listed as a template, and in which state?","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"listing":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"name":{"type":"string","minLength":1}},"required":["id","status","name"]}},"required":["listing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/templates/{id}/withdraw":{"post":{"summary":"Take a template down; apps already installed keep running","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"appId":{"type":"string","nullable":true,"minLength":1},"appName":{"type":"string","nullable":true,"minLength":1},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]},"submittedAt":{"type":"string","format":"date-time"},"paidInstalls":{"type":"integer","minimum":0},"earnedCents":{"type":"integer","minimum":0}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","appId","appName","decision","submittedAt","paidInstalls","earnedCents"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/review":{"get":{"summary":"Templates waiting for a reviewer, and the latest decisions (staff only)","tags":["marketplace"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workspaceName":{"type":"string","minLength":1},"submitterName":{"type":"string","minLength":1},"submitterEmail":{"type":"string","minLength":3,"maxLength":254},"submittedAt":{"type":"string","format":"date-time"},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","workspaceName","submitterName","submitterEmail","submittedAt","decision"]},"maxItems":200},"decided":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workspaceName":{"type":"string","minLength":1},"submitterName":{"type":"string","minLength":1},"submitterEmail":{"type":"string","minLength":3,"maxLength":254},"submittedAt":{"type":"string","format":"date-time"},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","workspaceName","submitterName","submitterEmail","submittedAt","decision"]},"maxItems":50}},"required":["pending","decided"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/review/{id}":{"get":{"summary":"A template as a reviewer reads it: permissions, Trust report and code (staff only)","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"description":{"type":"string","maxLength":2000},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"trust":{"type":"object","properties":{"rubricVersion":{"type":"string","minLength":1},"score":{"type":"integer","minimum":0,"maximum":100},"band":{"type":"string","enum":["pass","review","fail"]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"passed":{"type":"boolean"},"weight":{"type":"number","minimum":0},"detail":{"type":"string"}},"required":["id","label","passed","weight","detail"]}}},"required":["rubricVersion","score","band","checks"]},"screenshots":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1,"maximum":3},"src":{"type":"string","minLength":1,"maxLength":400000}},"required":["n","src"]},"maxItems":3},"reviews":{"type":"array","items":{"type":"object","properties":{"stars":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","minLength":1,"maxLength":500},"at":{"type":"string","format":"date-time"}},"required":["stars","comment","at"]},"maxItems":5},"bundleBytes":{"type":"integer","minimum":0},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]},"mine":{"type":"boolean"},"workspaceName":{"type":"string","minLength":1},"submitterName":{"type":"string","minLength":1},"submitterEmail":{"type":"string","minLength":3,"maxLength":254},"submittedAt":{"type":"string","format":"date-time"},"bundleHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"modules":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"bytes":{"type":"integer","minimum":0},"text":{"type":"string"},"truncated":{"type":"boolean"}},"required":["name","bytes","text","truncated"]},"maxItems":64},"ownWorkspace":{"type":"boolean"}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","description","manifest","trust","screenshots","reviews","bundleBytes","decision","mine","workspaceName","submitterName","submitterEmail","submittedAt","bundleHash","modules","ownWorkspace"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/marketplace/review/{id}/decision":{"post":{"summary":"Approve a template, ask for changes, or refuse it (staff only)","tags":["marketplace"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600,"default":""},"seenUpdatedAt":{"type":"string","format":"date-time"}},"required":["decision","seenUpdatedAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{2,70}$"},"name":{"type":"string","minLength":1,"maxLength":60},"summary":{"type":"string","minLength":1,"maxLength":140},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]}},"required":["key","name","status"]},"maxItems":12},"previewServices":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":12},"priceCents":{"type":"integer","minimum":0,"maximum":200000},"currency":{"type":"string","enum":["USD"]},"publisherName":{"type":"string","minLength":1,"maxLength":60},"installs":{"type":"integer","minimum":0},"rating":{"type":"object","properties":{"average":{"type":"number","nullable":true,"minimum":1,"maximum":5},"count":{"type":"integer","minimum":0}},"required":["average","count"]},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440},"status":{"type":"string","enum":["pending","published","changes_requested","rejected","withdrawn"]},"cover":{"type":"string","nullable":true,"minLength":1,"maxLength":400000},"screenshotCount":{"type":"integer","minimum":0,"maximum":3},"publishedAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workspaceName":{"type":"string","minLength":1},"submitterName":{"type":"string","minLength":1},"submitterEmail":{"type":"string","minLength":3,"maxLength":254},"submittedAt":{"type":"string","format":"date-time"},"decision":{"type":"object","nullable":true,"properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"note":{"type":"string","maxLength":600},"at":{"type":"string","format":"date-time"}},"required":["decision","note","at"]}},"required":["id","slug","name","summary","archetype","category","connectors","previewServices","priceCents","currency","publisherName","installs","rating","trustScore","trustBand","manualMinutesPerRun","status","cover","screenshotCount","publishedAt","updatedAt","workspaceName","submitterName","submitterEmail","submittedAt","decision"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/tokens/self":{"get":{"summary":"Who the presented token acts as: workspace, person, role and scopes (tokens only)","tags":["tokens"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]},"minItems":1,"maxItems":3},"prefix":{"type":"string","minLength":1},"last4":{"type":"string","minLength":4,"maxLength":4},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","scopes","prefix","last4","createdAt","lastUsedAt","expiresAt","revokedAt"]},"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1}},"required":["id","name","slug"]},"user":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3}},"required":["id","name","email"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"oauth":{"type":"object","properties":{"grantId":{"type":"string","minLength":1},"clientName":{"type":"string","minLength":1},"clientKind":{"type":"string","enum":["registered","metadata"]},"audience":{"type":"string","minLength":1}},"required":["grantId","clientName","clientKind","audience"]}},"required":["token","workspace","user","role"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"tokens.self"}},"delete":{"summary":"Revoke the token you present, at once (tokens only; `qaldy logout`)","tags":["tokens"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"tokens.revoke_self"}}},"/v1/workspaces/{ws}/tokens":{"get":{"summary":"Your personal access tokens in this workspace (prefixes only)","tags":["tokens"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]},"minItems":1,"maxItems":3},"prefix":{"type":"string","minLength":1},"last4":{"type":"string","minLength":4,"maxLength":4},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","scopes","prefix","last4","createdAt","lastUsedAt","expiresAt","revokedAt"]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Create a personal access token; its value is in this answer only","tags":["tokens"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]},"minItems":1,"maxItems":3},"expiresInDays":{"type":"integer","nullable":true,"minimum":1,"maximum":365,"default":90}},"required":["name","scopes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]},"minItems":1,"maxItems":3},"prefix":{"type":"string","minLength":1},"last4":{"type":"string","minLength":4,"maxLength":4},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","scopes","prefix","last4","createdAt","lastUsedAt","expiresAt","revokedAt"]},"secret":{"type":"string","pattern":"^qat_[A-Za-z0-9]{40}$"}},"required":["token","secret"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/tokens/{tokenId}":{"delete":{"summary":"Revoke one of your tokens at once","tags":["tokens"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"tokenId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/cli/device":{"post":{"summary":"Start a CLI sign-in: a device code to poll with and a user code to show (no sign-in)","tags":["cli"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client":{"type":"string","pattern":"^(mcp|cli|ci|sdk)\\/[0-9A-Za-z.+-]{1,24}$"},"purpose":{"type":"string","enum":["login","token"],"default":"login"},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write"]},"minItems":1,"maxItems":2,"default":["read","write"]},"expiresInDays":{"type":"integer","minimum":1,"maximum":365,"default":90},"host":{"type":"string","minLength":1,"maxLength":64}},"required":["client"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","pattern":"^qdc_[A-Za-z0-9]{40}$"},"userCode":{"type":"string","pattern":"^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$"},"verificationUri":{"type":"string","format":"uri"},"verificationUriComplete":{"type":"string","format":"uri"},"expiresIn":{"type":"integer","minimum":1},"interval":{"type":"integer","minimum":1}},"required":["deviceCode","userCode","verificationUri","verificationUriComplete","expiresIn","interval"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/cli/device/poll":{"post":{"summary":"Ask whether a CLI sign-in was approved; the token comes back once (no sign-in)","tags":["cli"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","pattern":"^qdc_[A-Za-z0-9]{40}$"}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"]},"interval":{"type":"integer","minimum":1}},"required":["status","interval"]},{"type":"object","properties":{"status":{"type":"string","enum":["slow_down"]},"interval":{"type":"integer","minimum":1}},"required":["status","interval"]},{"type":"object","properties":{"status":{"type":"string","enum":["denied"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["expired"]}},"required":["status"]},{"type":"object","properties":{"token":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","admin"]},"minItems":1,"maxItems":3},"prefix":{"type":"string","minLength":1},"last4":{"type":"string","minLength":4,"maxLength":4},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","scopes","prefix","last4","createdAt","lastUsedAt","expiresAt","revokedAt"]},"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1}},"required":["id","name","slug"]},"user":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3}},"required":["id","name","email"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"oauth":{"type":"object","properties":{"grantId":{"type":"string","minLength":1},"clientName":{"type":"string","minLength":1},"clientKind":{"type":"string","enum":["registered","metadata"]},"audience":{"type":"string","minLength":1}},"required":["grantId","clientName","clientKind","audience"]},"status":{"type":"string","enum":["approved"]},"secret":{"type":"string","pattern":"^qat_[A-Za-z0-9]{40}$"}},"required":["token","workspace","user","role","status","secret"]}]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/cli/device/{userCode}":{"get":{"summary":"What a waiting CLI sign-in asks for, and where you may approve it (console)","tags":["cli"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":32},"required":true,"name":"userCode","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","pattern":"^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$"},"client":{"type":"string","minLength":1},"purpose":{"type":"string","enum":["login","token"]},"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["read","write"]},"minItems":1,"maxItems":2},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"host":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","approved","denied","expired"]},"createdAt":{"type":"string","minLength":1},"expiresAt":{"type":"string","minLength":1},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]}},"required":["id","name","slug","role"]}}},"required":["userCode","client","purpose","name","scopes","expiresInDays","host","status","createdAt","expiresAt","workspaces"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/cli/device/{userCode}/approve":{"post":{"summary":"Approve a CLI sign-in for one workspace, with at most the scopes it asked for (console)","tags":["cli"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":32},"required":true,"name":"userCode","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"string","enum":["read","write"]},"minItems":1,"maxItems":2},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"required":["workspaceId","scopes","expiresInDays"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","pattern":"^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$"},"status":{"type":"string","enum":["approved","denied"]}},"required":["userCode","status"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/cli/device/{userCode}/deny":{"post":{"summary":"Refuse a CLI sign-in (console)","tags":["cli"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":32},"required":true,"name":"userCode","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","pattern":"^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$"},"status":{"type":"string","enum":["approved","denied"]}},"required":["userCode","status"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/oauth/authorizations/{id}":{"get":{"summary":"A pending sign-in request from an MCP client, for the consent screen","tags":["oauth"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"expiresAt":{"type":"string","format":"date-time"},"client":{"type":"object","properties":{"name":{"type":"string","minLength":1},"kind":{"type":"string","enum":["registered","metadata"]},"host":{"type":"string","nullable":true},"recognized":{"type":"string","nullable":true},"homepageHost":{"type":"string","nullable":true}},"required":["name","kind","host","recognized","homepageHost"]},"redirect":{"type":"object","properties":{"origin":{"type":"string","minLength":1},"host":{"type":"string"},"scheme":{"type":"string","minLength":1},"local":{"type":"boolean"}},"required":["origin","host","scheme","local"]},"resource":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"]},"requestedAccess":{"type":"string","enum":["read","write"]},"user":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]}},"required":["id","name","slug","role"]}}},"required":["id","expiresAt","client","redirect","resource","requestedAccess","user","workspaces"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/oauth/authorizations/{id}/decision":{"post":{"summary":"Allow or refuse an MCP client: the answer says where to send the browser next","tags":["oauth"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"decision":{"type":"string","enum":["allow"]},"workspaceId":{"type":"string","minLength":1,"maxLength":64},"access":{"type":"string","enum":["read","write"]}},"required":["decision","workspaceId","access"]},{"type":"object","properties":{"decision":{"type":"string","enum":["deny"]}},"required":["decision"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["allowed","denied"]},"redirectTo":{"type":"string","minLength":1}},"required":["outcome","redirectTo"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/oauth/grants":{"get":{"summary":"The apps and agents you have signed in to this workspace (never their tokens)","tags":["oauth"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"clientName":{"type":"string","minLength":1},"clientKind":{"type":"string","enum":["registered","metadata"]},"clientHost":{"type":"string","nullable":true},"recognized":{"type":"string","nullable":true},"access":{"type":"string","enum":["read","write"]},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","clientName","clientKind","clientHost","recognized","access","createdAt","lastUsedAt","expiresAt","revokedAt"]}}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/oauth/grants/{grantId}":{"delete":{"summary":"End one of your grants at once: its tokens stop working","tags":["oauth"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"grantId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces":{"get":{"summary":"Who is signed in and every workspace they are in","tags":["onboarding"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"memberCount":{"type":"integer","minimum":0}},"required":["id","name","slug","profile","role","memberCount"]}},"currentId":{"type":"string","nullable":true,"minLength":1}},"required":["user","items","currentId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Create a workspace with a starter world (a working sample app, gates, a road)","tags":["onboarding"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]},"teamSize":{"type":"string","enum":["solo","small","medium","large"]},"intents":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9-]{2,64}$"},"maxItems":3},"locale":{"type":"string","enum":["en","ru","kk"]},"timezone":{"type":"string","maxLength":64,"pattern":"^[A-Za-z_]+(\\/[A-Za-z0-9_+-]+){0,2}$"},"currency":{"type":"string","enum":["EUR","USD","KZT"]}},"required":["name","profile","teamSize","intents"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]},"cell":{"type":"string","enum":["global","eu","kz"]},"locale":{"type":"string","enum":["en","ru","kk"]},"timezone":{"type":"string","minLength":1},"hourlyCostMinor":{"type":"integer","minimum":0},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"memberCount":{"type":"integer","minimum":0}},"required":["id","slug","name","profile","cell","locale","timezone","hourlyCostMinor","currency","memberCount"]},"session":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"workspaceId":{"type":"string","minLength":1},"workspaceRole":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"devLogin":{"type":"boolean"}},"required":["user","workspaceId","workspaceRole","devLogin"]},"starter":{"type":"object","properties":{"sampleAppId":{"type":"string","nullable":true,"minLength":1},"appIds":{"type":"array","items":{"type":"string","minLength":1}},"gateIds":{"type":"array","items":{"type":"string","minLength":1}},"roadIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["sampleAppId","appIds","gateIds","roadIds"]}},"required":["workspace","session","starter"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/switch":{"post":{"summary":"Open another of your workspaces in this session","tags":["onboarding"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"workspaceId":{"type":"string","minLength":1},"workspaceRole":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"devLogin":{"type":"boolean"}},"required":["user","workspaceId","workspaceRole","devLogin"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/invites":{"get":{"summary":"Invites of a workspace, newest first (admins)","tags":["onboarding"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedBy":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"accessEndsAt":{"type":"string","nullable":true,"format":"date-time","default":null}},"required":["id","email","role","status","invitedBy","createdAt","expiresAt"]}}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Invite people by email with a role (admins); each gets a join link","tags":["onboarding"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":20},"role":{"type":"string","enum":["admin","builder","member","viewer"]},"expiresInDays":{"type":"integer","minimum":1,"maximum":30},"accessEndsAt":{"type":"string","format":"date-time"},"deliver":{"type":"string","enum":["email","link"]},"locale":{"type":"string","enum":["en","ru","kk"]}},"required":["emails","role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedBy":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"accessEndsAt":{"type":"string","nullable":true,"format":"date-time","default":null}},"required":["id","email","role","status","invitedBy","createdAt","expiresAt"]}},"delivery":{"type":"string","nullable":true,"enum":["email","dev-log",null]},"links":{"type":"array","items":{"type":"object","properties":{"inviteId":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"link":{"type":"string","minLength":10}},"required":["inviteId","email","link"]},"default":[]}},"required":["items","delivery"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/invites/{inviteId}":{"delete":{"summary":"Revoke an open invite (admins)","tags":["onboarding"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","pattern":"^inv_[0-9a-f]{64}$"},"required":true,"name":"inviteId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/invites/{inviteId}/resend":{"post":{"summary":"Send an open invite again with a fresh link; the old link stops working (admins)","tags":["onboarding"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","pattern":"^inv_[0-9a-f]{64}$"},"required":true,"name":"inviteId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deliver":{"type":"string","enum":["email","link"]},"locale":{"type":"string","enum":["en","ru","kk"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"role":{"type":"string","enum":["admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedBy":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"accessEndsAt":{"type":"string","nullable":true,"format":"date-time","default":null}},"required":["id","email","role","status","invitedBy","createdAt","expiresAt"]}},"delivery":{"type":"string","nullable":true,"enum":["email","dev-log",null]},"links":{"type":"array","items":{"type":"object","properties":{"inviteId":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"link":{"type":"string","minLength":10}},"required":["inviteId","email","link"]},"default":[]}},"required":["items","delivery"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/invites/{token}/accept":{"post":{"summary":"Join a workspace from an invite link (the invited, verified email only)","tags":["onboarding"],"parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"required":true,"name":"token","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"workspaceId":{"type":"string","minLength":1},"workspaceRole":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"devLogin":{"type":"boolean"}},"required":["user","workspaceId","workspaceRole","devLogin"]}},"required":["session"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/members":{"get":{"summary":"Everyone in the workspace with their role, the people with most say first","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"you":{"type":"string","minLength":1},"yourRole":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"items":{"type":"array","items":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"joinedAt":{"type":"string","format":"date-time"},"accessEndsAt":{"type":"string","nullable":true,"format":"date-time"},"online":{"type":"boolean"}},"required":["user","role","joinedAt","accessEndsAt","online"]}}},"required":["you","yourRole","items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/members/{userId}":{"patch":{"summary":"Change someone's role, or the date their access ends (admins)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._~-]{0,127}$"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"accessEndsAt":{"type":"string","nullable":true,"format":"date-time"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"joinedAt":{"type":"string","format":"date-time"},"accessEndsAt":{"type":"string","nullable":true,"format":"date-time"},"online":{"type":"boolean"}},"required":["user","role","joinedAt","accessEndsAt","online"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Remove someone (admins), or leave the workspace yourself (anyone but the last owner)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._~-]{0,127}$"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/members/{userId}/transfer-ownership":{"post":{"summary":"Hand the workspace to someone else and become an admin (the owner only)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._~-]{0,127}$"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmName":{"type":"string","minLength":1,"maxLength":120}},"required":["confirmName"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/join-domain":{"get":{"summary":"The company-domain rule: which domain, whether it is verified, who may join (admins)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true},"status":{"type":"string","enum":["none","pending","verified"]},"record":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["TXT"]},"host":{"type":"string"},"value":{"type":"string"}},"required":["type","host","value"]},"autoJoin":{"type":"boolean"},"role":{"type":"string","enum":["member","viewer"]},"verifiedAt":{"type":"string","nullable":true,"format":"date-time"},"suggestion":{"type":"string","nullable":true}},"required":["domain","status","record","autoJoin","role","verifiedAt","suggestion"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Claim a company domain: returns the DNS record that proves it is yours (admins)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253}},"required":["domain"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true},"status":{"type":"string","enum":["none","pending","verified"]},"record":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["TXT"]},"host":{"type":"string"},"value":{"type":"string"}},"required":["type","host","value"]},"autoJoin":{"type":"boolean"},"role":{"type":"string","enum":["member","viewer"]},"verifiedAt":{"type":"string","nullable":true,"format":"date-time"},"suggestion":{"type":"string","nullable":true}},"required":["domain","status","record","autoJoin","role","verifiedAt","suggestion"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Turn auto-join on or off and pick Member or Viewer, once verified (admins)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoJoin":{"type":"boolean"},"role":{"type":"string","enum":["member","viewer"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true},"status":{"type":"string","enum":["none","pending","verified"]},"record":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["TXT"]},"host":{"type":"string"},"value":{"type":"string"}},"required":["type","host","value"]},"autoJoin":{"type":"boolean"},"role":{"type":"string","enum":["member","viewer"]},"verifiedAt":{"type":"string","nullable":true,"format":"date-time"},"suggestion":{"type":"string","nullable":true}},"required":["domain","status","record","autoJoin","role","verifiedAt","suggestion"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Forget the company domain: nobody can join with it any more (admins)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/join-domain/verify":{"post":{"summary":"Look for the DNS record and, if it is there, verify the domain (admins)","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","nullable":true},"status":{"type":"string","enum":["none","pending","verified"]},"record":{"type":"object","nullable":true,"properties":{"type":{"type":"string","enum":["TXT"]},"host":{"type":"string"},"value":{"type":"string"}},"required":["type","host","value"]},"autoJoin":{"type":"boolean"},"role":{"type":"string","enum":["member","viewer"]},"verifiedAt":{"type":"string","nullable":true,"format":"date-time"},"suggestion":{"type":"string","nullable":true}},"required":["domain","status","record","autoJoin","role","verifiedAt","suggestion"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/me/join-suggestions":{"get":{"summary":"Workspaces your verified company address can join in one click","tags":["team"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"memberCount":{"type":"integer","minimum":0},"role":{"type":"string","enum":["member","viewer"]}},"required":["workspaceId","name","memberCount","role"]}}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/join":{"post":{"summary":"Join a workspace whose verified company domain matches your verified address","tags":["team"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"user":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":3},"initials":{"type":"string","minLength":1,"maxLength":3},"color":{"type":"string","enum":["sky","pool","bubblegum","leaf","lilac","sun","tangerine","tomato"]}},"required":["kind","id","name","email","initials","color"]},"workspaceId":{"type":"string","minLength":1},"workspaceRole":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"devLogin":{"type":"boolean"}},"required":["user","workspaceId","workspaceRole","devLogin"]}},"required":["session"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/telegram":{"get":{"summary":"Telegram for this workspace: the bot, your link, and for admins who is linked","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"ready":{"type":"boolean"},"notReady":{"type":"string","nullable":true,"enum":["keys_missing","pepper_missing","public_url_not_https",null]},"bot":{"type":"object","nullable":true,"properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","maxLength":128},"username":{"type":"string","nullable":true,"maxLength":64},"enabled":{"type":"boolean"},"webhook":{"type":"string","enum":["pending","set","failed","removed"]},"webhookError":{"type":"string","nullable":true,"maxLength":64},"alertsChat":{"type":"object","nullable":true,"properties":{"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"title":{"type":"string","nullable":true,"maxLength":128},"kind":{"type":"string","enum":["private","group","supergroup","channel"]},"setBy":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"setAt":{"type":"string","format":"date-time"}},"required":["chatId","title","kind","setBy","setAt"]},"digestToChat":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectorId","connectorName","username","enabled","webhook","webhookError","alertsChat","digestToChat","updatedAt"]},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"displayName":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["connected","expired","error","disconnected"]}},"required":["id","displayName","status"]},"maxItems":20},"canManage":{"type":"boolean"},"me":{"type":"object","properties":{"linked":{"type":"boolean"},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","nullable":true,"format":"date-time"},"codeExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["linked","telegramUsername","linkedAt","codeExpiresAt"]},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":200},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["userId","name","telegramUsername","linkedAt","lastSeenAt"]},"maxItems":500}},"required":["workspaceId","ready","notReady","bot","connections","canManage","me","people"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Turn Telegram on for a Telegram connection: sets the bot’s webhook (admins)","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"replaceExisting":{"type":"boolean"}},"required":["connectorId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"ready":{"type":"boolean"},"notReady":{"type":"string","nullable":true,"enum":["keys_missing","pepper_missing","public_url_not_https",null]},"bot":{"type":"object","nullable":true,"properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","maxLength":128},"username":{"type":"string","nullable":true,"maxLength":64},"enabled":{"type":"boolean"},"webhook":{"type":"string","enum":["pending","set","failed","removed"]},"webhookError":{"type":"string","nullable":true,"maxLength":64},"alertsChat":{"type":"object","nullable":true,"properties":{"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"title":{"type":"string","nullable":true,"maxLength":128},"kind":{"type":"string","enum":["private","group","supergroup","channel"]},"setBy":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"setAt":{"type":"string","format":"date-time"}},"required":["chatId","title","kind","setBy","setAt"]},"digestToChat":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectorId","connectorName","username","enabled","webhook","webhookError","alertsChat","digestToChat","updatedAt"]},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"displayName":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["connected","expired","error","disconnected"]}},"required":["id","displayName","status"]},"maxItems":20},"canManage":{"type":"boolean"},"me":{"type":"object","properties":{"linked":{"type":"boolean"},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","nullable":true,"format":"date-time"},"codeExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["linked","telegramUsername","linkedAt","codeExpiresAt"]},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":200},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["userId","name","telegramUsername","linkedAt","lastSeenAt"]},"maxItems":500}},"required":["workspaceId","ready","notReady","bot","connections","canManage","me","people"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Choose the alerts chat and whether the weekly digest goes there (admins)","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alertsChat":{"type":"string","nullable":true,"pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"digestToChat":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"ready":{"type":"boolean"},"notReady":{"type":"string","nullable":true,"enum":["keys_missing","pepper_missing","public_url_not_https",null]},"bot":{"type":"object","nullable":true,"properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","maxLength":128},"username":{"type":"string","nullable":true,"maxLength":64},"enabled":{"type":"boolean"},"webhook":{"type":"string","enum":["pending","set","failed","removed"]},"webhookError":{"type":"string","nullable":true,"maxLength":64},"alertsChat":{"type":"object","nullable":true,"properties":{"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"title":{"type":"string","nullable":true,"maxLength":128},"kind":{"type":"string","enum":["private","group","supergroup","channel"]},"setBy":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"setAt":{"type":"string","format":"date-time"}},"required":["chatId","title","kind","setBy","setAt"]},"digestToChat":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectorId","connectorName","username","enabled","webhook","webhookError","alertsChat","digestToChat","updatedAt"]},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"displayName":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["connected","expired","error","disconnected"]}},"required":["id","displayName","status"]},"maxItems":20},"canManage":{"type":"boolean"},"me":{"type":"object","properties":{"linked":{"type":"boolean"},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","nullable":true,"format":"date-time"},"codeExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["linked","telegramUsername","linkedAt","codeExpiresAt"]},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":200},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["userId","name","telegramUsername","linkedAt","lastSeenAt"]},"maxItems":500}},"required":["workspaceId","ready","notReady","bot","connections","canManage","me","people"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Turn Telegram off: removes the bot’s webhook; links are kept (admins)","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"ready":{"type":"boolean"},"notReady":{"type":"string","nullable":true,"enum":["keys_missing","pepper_missing","public_url_not_https",null]},"bot":{"type":"object","nullable":true,"properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","maxLength":128},"username":{"type":"string","nullable":true,"maxLength":64},"enabled":{"type":"boolean"},"webhook":{"type":"string","enum":["pending","set","failed","removed"]},"webhookError":{"type":"string","nullable":true,"maxLength":64},"alertsChat":{"type":"object","nullable":true,"properties":{"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"title":{"type":"string","nullable":true,"maxLength":128},"kind":{"type":"string","enum":["private","group","supergroup","channel"]},"setBy":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"setAt":{"type":"string","format":"date-time"}},"required":["chatId","title","kind","setBy","setAt"]},"digestToChat":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectorId","connectorName","username","enabled","webhook","webhookError","alertsChat","digestToChat","updatedAt"]},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"displayName":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["connected","expired","error","disconnected"]}},"required":["id","displayName","status"]},"maxItems":20},"canManage":{"type":"boolean"},"me":{"type":"object","properties":{"linked":{"type":"boolean"},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","nullable":true,"format":"date-time"},"codeExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["linked","telegramUsername","linkedAt","codeExpiresAt"]},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":200},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["userId","name","telegramUsername","linkedAt","lastSeenAt"]},"maxItems":500}},"required":["workspaceId","ready","notReady","bot","connections","canManage","me","people"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/telegram/check":{"post":{"summary":"Ask Telegram how delivery to the webhook is going (admins)","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"urlSet":{"type":"boolean"},"pending":{"type":"integer","minimum":0},"lastError":{"type":"string","nullable":true,"maxLength":400},"lastErrorAt":{"type":"string","nullable":true,"format":"date-time"},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["urlSet","pending","lastError","lastErrorAt","reason"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/telegram/link-code":{"post":{"summary":"A one-time code (10 minutes) to send to the bot to link your Telegram account","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locale":{"type":"string","enum":["en","ru","kk"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^QLD-[2-9A-HJKMNP-Z]{8}$"},"expiresAt":{"type":"string","format":"date-time"},"deepLink":{"type":"string","nullable":true,"maxLength":200},"botUsername":{"type":"string","nullable":true,"maxLength":64}},"required":["code","expiresAt","deepLink","botUsername"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/telegram/link":{"delete":{"summary":"Unlink your own Telegram account","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"ready":{"type":"boolean"},"notReady":{"type":"string","nullable":true,"enum":["keys_missing","pepper_missing","public_url_not_https",null]},"bot":{"type":"object","nullable":true,"properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","maxLength":128},"username":{"type":"string","nullable":true,"maxLength":64},"enabled":{"type":"boolean"},"webhook":{"type":"string","enum":["pending","set","failed","removed"]},"webhookError":{"type":"string","nullable":true,"maxLength":64},"alertsChat":{"type":"object","nullable":true,"properties":{"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"title":{"type":"string","nullable":true,"maxLength":128},"kind":{"type":"string","enum":["private","group","supergroup","channel"]},"setBy":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"setAt":{"type":"string","format":"date-time"}},"required":["chatId","title","kind","setBy","setAt"]},"digestToChat":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectorId","connectorName","username","enabled","webhook","webhookError","alertsChat","digestToChat","updatedAt"]},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"displayName":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["connected","expired","error","disconnected"]}},"required":["id","displayName","status"]},"maxItems":20},"canManage":{"type":"boolean"},"me":{"type":"object","properties":{"linked":{"type":"boolean"},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","nullable":true,"format":"date-time"},"codeExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["linked","telegramUsername","linkedAt","codeExpiresAt"]},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":200},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["userId","name","telegramUsername","linkedAt","lastSeenAt"]},"maxItems":500}},"required":["workspaceId","ready","notReady","bot","connections","canManage","me","people"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/telegram/people/{userId}":{"delete":{"summary":"Unlink someone’s Telegram account from this workspace (admins)","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._~-]{0,127}$"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"ready":{"type":"boolean"},"notReady":{"type":"string","nullable":true,"enum":["keys_missing","pepper_missing","public_url_not_https",null]},"bot":{"type":"object","nullable":true,"properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","maxLength":128},"username":{"type":"string","nullable":true,"maxLength":64},"enabled":{"type":"boolean"},"webhook":{"type":"string","enum":["pending","set","failed","removed"]},"webhookError":{"type":"string","nullable":true,"maxLength":64},"alertsChat":{"type":"object","nullable":true,"properties":{"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"},"title":{"type":"string","nullable":true,"maxLength":128},"kind":{"type":"string","enum":["private","group","supergroup","channel"]},"setBy":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"setAt":{"type":"string","format":"date-time"}},"required":["chatId","title","kind","setBy","setAt"]},"digestToChat":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["connectorId","connectorName","username","enabled","webhook","webhookError","alertsChat","digestToChat","updatedAt"]},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"displayName":{"type":"string","minLength":1,"maxLength":128},"status":{"type":"string","enum":["connected","expired","error","disconnected"]}},"required":["id","displayName","status"]},"maxItems":20},"canManage":{"type":"boolean"},"me":{"type":"object","properties":{"linked":{"type":"boolean"},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","nullable":true,"format":"date-time"},"codeExpiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["linked","telegramUsername","linkedAt","codeExpiresAt"]},"people":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":200},"telegramUsername":{"type":"string","nullable":true,"maxLength":64},"linkedAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["userId","name","telegramUsername","linkedAt","lastSeenAt"]},"maxItems":500}},"required":["workspaceId","ready","notReady","bot","connections","canManage","me","people"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/telegram/test":{"post":{"summary":"Send a test message to your own linked chat","tags":["telegram"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["sent","reason"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/automations":{"get":{"summary":"Every automation (road) in a workspace you can see, with this week’s numbers","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["active","paused","failing"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]},"appId":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookLive":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"stats":{"type":"object","properties":{"runsWeek":{"type":"integer","minimum":0},"failedWeek":{"type":"integer","minimum":0},"minutesSavedWeek":{"type":"number","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunStatus":{"type":"string","nullable":true,"enum":["queued","running","waiting_approval","succeeded","failed","blocked",null]}},"required":["runsWeek","failedWeek","minutesSavedWeek","lastRunAt","lastRunStatus"]},"heartbeat":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"canEdit":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","from","via","to","category","status","trigger","appId","webhookUrl","nextRunAt","stats","canEdit","createdAt","updatedAt"]}}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"automations.list"}}},"/v1/automations/{id}":{"get":{"summary":"One automation with its recent runs","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["active","paused","failing"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]},"appId":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookLive":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"stats":{"type":"object","properties":{"runsWeek":{"type":"integer","minimum":0},"failedWeek":{"type":"integer","minimum":0},"minutesSavedWeek":{"type":"number","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunStatus":{"type":"string","nullable":true,"enum":["queued","running","waiting_approval","succeeded","failed","blocked",null]}},"required":["runsWeek","failedWeek","minutesSavedWeek","lastRunAt","lastRunStatus"]},"heartbeat":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"canEdit":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"recentRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"roadId":{"type":"string","nullable":true},"roadName":{"type":"string","nullable":true},"trigger":{"type":"string","enum":["schedule","webhook","form","manual","event"]},"status":{"type":"string","enum":["queued","running","waiting_approval","succeeded","failed","blocked"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"durationMs":{"type":"integer","nullable":true,"minimum":0},"minutesSaved":{"type":"number","minimum":0},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"version":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"number":{"type":"integer","nullable":true,"minimum":1},"isCurrent":{"type":"boolean"}},"required":["id","number","isCurrent"]},"replayOf":{"type":"string","nullable":true}},"required":["id","workspaceId","appId","appName","roadId","roadName","trigger","status","startedAt","finishedAt","durationMs","minutesSaved","errorCode","errorMessage"]},"maxItems":10}},"required":["id","name","from","via","to","category","status","trigger","appId","webhookUrl","nextRunAt","stats","canEdit","createdAt","updatedAt","recentRuns"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"automations.get"}},"patch":{"summary":"Rename an automation, change its trigger or schedule, or redraw its stops","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["active","paused","failing"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]},"appId":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookLive":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"stats":{"type":"object","properties":{"runsWeek":{"type":"integer","minimum":0},"failedWeek":{"type":"integer","minimum":0},"minutesSavedWeek":{"type":"number","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunStatus":{"type":"string","nullable":true,"enum":["queued","running","waiting_approval","succeeded","failed","blocked",null]}},"required":["runsWeek","failedWeek","minutesSavedWeek","lastRunAt","lastRunStatus"]},"heartbeat":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"canEdit":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","from","via","to","category","status","trigger","appId","webhookUrl","nextRunAt","stats","canEdit","createdAt","updatedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Delete an automation: its road leaves the City, its past runs stay","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/automations/{id}/pause":{"post":{"summary":"Pause an automation: its road stays, nothing drives it","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["active","paused","failing"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]},"appId":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookLive":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"stats":{"type":"object","properties":{"runsWeek":{"type":"integer","minimum":0},"failedWeek":{"type":"integer","minimum":0},"minutesSavedWeek":{"type":"number","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunStatus":{"type":"string","nullable":true,"enum":["queued","running","waiting_approval","succeeded","failed","blocked",null]}},"required":["runsWeek","failedWeek","minutesSavedWeek","lastRunAt","lastRunStatus"]},"heartbeat":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"canEdit":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","from","via","to","category","status","trigger","appId","webhookUrl","nextRunAt","stats","canEdit","createdAt","updatedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/automations/{id}/resume":{"post":{"summary":"Resume a paused automation: it comes back as healthy or failing as its gates, app and last run say","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"from":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"via":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"maxItems":6},"to":{"type":"object","properties":{"kind":{"type":"string","enum":["gate","building"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"status":{"type":"string","enum":["active","paused","failing"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]}]},"appId":{"type":"string","nullable":true},"webhookUrl":{"type":"string","nullable":true},"webhookLive":{"type":"boolean"},"nextRunAt":{"type":"string","nullable":true,"format":"date-time"},"stats":{"type":"object","properties":{"runsWeek":{"type":"integer","minimum":0},"failedWeek":{"type":"integer","minimum":0},"minutesSavedWeek":{"type":"number","minimum":0},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunStatus":{"type":"string","nullable":true,"enum":["queued","running","waiting_approval","succeeded","failed","blocked",null]}},"required":["runsWeek","failedWeek","minutesSavedWeek","lastRunAt","lastRunStatus"]},"heartbeat":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"canEdit":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","from","via","to","category","status","trigger","appId","webhookUrl","nextRunAt","stats","canEdit","createdAt","updatedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/automations/{id}/runs":{"post":{"summary":"Run an automation now: a car drives its road","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"held":{"type":"boolean"}},"required":["runId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"automations.run"}}},"/v1/automations/{id}/agent-tool":{"get":{"summary":"What to read before publishing an automation as a tool: the permissions of the app that runs, a suggested name and schema, and the published tool if there is one","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"automationId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"blocked":{"type":"string","nullable":true,"enum":["no_app","not_deployed","no_input_path","not_runnable",null]},"manifest":{"type":"object","nullable":true,"properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"hash":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{64}$"},"suggested":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"title":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":400},"inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"description":{"type":"string","maxLength":300},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"minLength":{"type":"integer","minimum":0,"maximum":2000},"maxLength":{"type":"integer","minimum":1,"maximum":2000},"format":{"type":"string","enum":["date","date-time","email","uri"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number","integer"]},"description":{"type":"string","maxLength":300},"minimum":{"type":"number"},"maximum":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"description":{"type":"string","maxLength":300}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["array"]},"description":{"type":"string","maxLength":300},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","integer","boolean"]}},"required":["type"],"additionalProperties":false},"maxItems":{"type":"integer","minimum":1,"maximum":50}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9_]{0,39}$"},"maxItems":20},"additionalProperties":{"type":"boolean","enum":[false]}},"required":["type","properties"],"additionalProperties":false}},"required":["name","title","description","inputSchema"]},"startsAs":{"type":"string","nullable":true,"enum":["manual","webhook","form","schedule",null]},"published":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"automationId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"title":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":400},"inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"description":{"type":"string","maxLength":300},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"minLength":{"type":"integer","minimum":0,"maximum":2000},"maxLength":{"type":"integer","minimum":1,"maximum":2000},"format":{"type":"string","enum":["date","date-time","email","uri"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number","integer"]},"description":{"type":"string","maxLength":300},"minimum":{"type":"number"},"maximum":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"description":{"type":"string","maxLength":300}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["array"]},"description":{"type":"string","maxLength":300},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","integer","boolean"]}},"required":["type"],"additionalProperties":false},"maxItems":{"type":"integer","minimum":1,"maximum":50}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9_]{0,39}$"},"maxItems":20},"additionalProperties":{"type":"boolean","enum":[false]}},"required":["type","properties"],"additionalProperties":false},"state":{"type":"string","enum":["live","off","needs_review","paused"]},"canRun":{"type":"boolean"},"canEdit":{"type":"boolean"},"reviewedAt":{"type":"string","format":"date-time"},"reviewedBy":{"type":"string","minLength":1},"publishedAt":{"type":"string","format":"date-time"},"callsWeek":{"type":"integer","minimum":0},"lastCalledAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","automationId","automationName","appId","appName","name","title","description","inputSchema","state","canRun","canEdit","reviewedAt","reviewedBy","publishedAt","callsWeek","lastCalledAt"]}},"required":["automationId","automationName","appId","appName","blocked","manifest","hash","suggested","startsAs","published"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Publish an automation as a tool, or change the published one. The body carries the hash of the permissions the person read.","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"title":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":8,"maxLength":400},"inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"description":{"type":"string","maxLength":300},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"minLength":{"type":"integer","minimum":0,"maximum":2000},"maxLength":{"type":"integer","minimum":1,"maximum":2000},"format":{"type":"string","enum":["date","date-time","email","uri"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number","integer"]},"description":{"type":"string","maxLength":300},"minimum":{"type":"number"},"maximum":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"description":{"type":"string","maxLength":300}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["array"]},"description":{"type":"string","maxLength":300},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","integer","boolean"]}},"required":["type"],"additionalProperties":false},"maxItems":{"type":"integer","minimum":1,"maximum":50}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9_]{0,39}$"},"maxItems":20},"additionalProperties":{"type":"boolean","enum":[false]}},"required":["type","properties"],"additionalProperties":false},"reviewedHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"enabled":{"type":"boolean","default":true}},"required":["name","title","description","inputSchema","reviewedHash"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"automationId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"title":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":400},"inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"description":{"type":"string","maxLength":300},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"minLength":{"type":"integer","minimum":0,"maximum":2000},"maxLength":{"type":"integer","minimum":1,"maximum":2000},"format":{"type":"string","enum":["date","date-time","email","uri"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number","integer"]},"description":{"type":"string","maxLength":300},"minimum":{"type":"number"},"maximum":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"description":{"type":"string","maxLength":300}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["array"]},"description":{"type":"string","maxLength":300},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","integer","boolean"]}},"required":["type"],"additionalProperties":false},"maxItems":{"type":"integer","minimum":1,"maximum":50}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9_]{0,39}$"},"maxItems":20},"additionalProperties":{"type":"boolean","enum":[false]}},"required":["type","properties"],"additionalProperties":false},"state":{"type":"string","enum":["live","off","needs_review","paused"]},"canRun":{"type":"boolean"},"canEdit":{"type":"boolean"},"reviewedAt":{"type":"string","format":"date-time"},"reviewedBy":{"type":"string","minLength":1},"publishedAt":{"type":"string","format":"date-time"},"callsWeek":{"type":"integer","minimum":0},"lastCalledAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","automationId","automationName","appId","appName","name","title","description","inputSchema","state","canRun","canEdit","reviewedAt","reviewedBy","publishedAt","callsWeek","lastCalledAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Switch a published tool off or on. Switching on needs the permissions to be current.","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"automationId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"title":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":400},"inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"description":{"type":"string","maxLength":300},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"minLength":{"type":"integer","minimum":0,"maximum":2000},"maxLength":{"type":"integer","minimum":1,"maximum":2000},"format":{"type":"string","enum":["date","date-time","email","uri"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number","integer"]},"description":{"type":"string","maxLength":300},"minimum":{"type":"number"},"maximum":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"description":{"type":"string","maxLength":300}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["array"]},"description":{"type":"string","maxLength":300},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","integer","boolean"]}},"required":["type"],"additionalProperties":false},"maxItems":{"type":"integer","minimum":1,"maximum":50}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9_]{0,39}$"},"maxItems":20},"additionalProperties":{"type":"boolean","enum":[false]}},"required":["type","properties"],"additionalProperties":false},"state":{"type":"string","enum":["live","off","needs_review","paused"]},"canRun":{"type":"boolean"},"canEdit":{"type":"boolean"},"reviewedAt":{"type":"string","format":"date-time"},"reviewedBy":{"type":"string","minLength":1},"publishedAt":{"type":"string","format":"date-time"},"callsWeek":{"type":"integer","minimum":0},"lastCalledAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","automationId","automationName","appId","appName","name","title","description","inputSchema","state","canRun","canEdit","reviewedAt","reviewedBy","publishedAt","callsWeek","lastCalledAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Take an automation back from the agents: it stays an automation","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/agent-tools":{"get":{"summary":"Published tools you can see, with whether you can run each. An agent lists the live ones it can run.","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"automationId":{"type":"string","minLength":1},"automationName":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"title":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":400},"inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"description":{"type":"string","maxLength":300},"enum":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"minLength":{"type":"integer","minimum":0,"maximum":2000},"maxLength":{"type":"integer","minimum":1,"maximum":2000},"format":{"type":"string","enum":["date","date-time","email","uri"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number","integer"]},"description":{"type":"string","maxLength":300},"minimum":{"type":"number"},"maximum":{"type":"number"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["boolean"]},"description":{"type":"string","maxLength":300}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["array"]},"description":{"type":"string","maxLength":300},"items":{"type":"object","properties":{"type":{"type":"string","enum":["string","number","integer","boolean"]}},"required":["type"],"additionalProperties":false},"maxItems":{"type":"integer","minimum":1,"maximum":50}},"required":["type","items"],"additionalProperties":false}]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9_]{0,39}$"},"maxItems":20},"additionalProperties":{"type":"boolean","enum":[false]}},"required":["type","properties"],"additionalProperties":false},"state":{"type":"string","enum":["live","off","needs_review","paused"]},"canRun":{"type":"boolean"},"canEdit":{"type":"boolean"},"reviewedAt":{"type":"string","format":"date-time"},"reviewedBy":{"type":"string","minLength":1},"publishedAt":{"type":"string","format":"date-time"},"callsWeek":{"type":"integer","minimum":0},"lastCalledAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","automationId","automationName","appId","appName","name","title","description","inputSchema","state","canRun","canEdit","reviewedAt","reviewedBy","publishedAt","callsWeek","lastCalledAt"]}}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"agent_tools.list"}}},"/v1/automations/{id}/agent-tool/runs":{"post":{"summary":"Call a published tool: starts the automation through the normal run path, as the person asking","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"default":{}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","minLength":1},"toolName":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,47}$"},"automationId":{"type":"string","minLength":1},"held":{"type":"boolean"}},"required":["runId","toolName","automationId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"agent_tools.run"}}},"/v1/workspaces/{ws}/agent-events":{"get":{"summary":"What needs the connected agent: finished and failed runs, approvals, alerts","tags":["agent tools"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"integer","nullable":true,"minimum":0},"required":false,"name":"since","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":25,"default":0},"required":false,"name":"wait","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["run_finished","run_failed","approval_needed","alert"]},"alert":{"type":"string","nullable":true,"enum":["app_failing","automation_failing","connector_down","blocked_call","cap_reached",null]},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"approvalId":{"type":"string","nullable":true},"code":{"type":"string","nullable":true,"maxLength":64},"askedByAgent":{"type":"boolean"}},"required":["seq","at","kind","alert","appId","appName","runId","approvalId","code","askedByAgent"]},"maxItems":100},"cursor":{"type":"integer","minimum":0}},"required":["items","cursor"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"agent_events.list"}}},"/v1/automations/{id}/webhook":{"get":{"summary":"The webhook: its address, switches, secret hint and the last ten deliveries","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"configured":{"type":"boolean"},"url":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["signed","github","token","telegram","form","unsigned"]},"secretHint":{"type":"string","nullable":true},"ratePerMin":{"type":"integer","minimum":1,"maximum":600},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"form":{"type":"object","nullable":true,"properties":{"honeypot":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,39}$"},"redirect":{"type":"string","nullable":true,"maxLength":500},"origins":{"type":"array","items":{"type":"string","pattern":"^(https:\\/\\/[a-z0-9]([a-z0-9.-]{0,251}[a-z0-9])?(:\\d{1,5})?|http:\\/\\/localhost(:\\d{1,5})?)$"},"maxItems":5}},"default":null,"required":["honeypot","redirect","origins"]}},"required":["configured","url","enabled","mode","secretHint","ratePerMin","createdAt","rotatedAt"]},"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["accepted","duplicate","rejected"]},"status":{"type":"integer","minimum":100,"maximum":599},"reason":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"bytes":{"type":"integer","minimum":0},"sample":{"type":"boolean"},"deadLetterId":{"type":"string","nullable":true,"default":null}},"required":["id","at","outcome","status","reason","runId","bytes","sample"]},"maxItems":50}},"required":["webhook","deliveries"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Set the webhook up: creates its secret (or token), shown once","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["signed","github","token","telegram","form","unsigned"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"configured":{"type":"boolean"},"url":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["signed","github","token","telegram","form","unsigned"]},"secretHint":{"type":"string","nullable":true},"ratePerMin":{"type":"integer","minimum":1,"maximum":600},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"form":{"type":"object","nullable":true,"properties":{"honeypot":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,39}$"},"redirect":{"type":"string","nullable":true,"maxLength":500},"origins":{"type":"array","items":{"type":"string","pattern":"^(https:\\/\\/[a-z0-9]([a-z0-9.-]{0,251}[a-z0-9])?(:\\d{1,5})?|http:\\/\\/localhost(:\\d{1,5})?)$"},"maxItems":5}},"default":null,"required":["honeypot","redirect","origins"]}},"required":["configured","url","enabled","mode","secretHint","ratePerMin","createdAt","rotatedAt"]},"secret":{"type":"string","nullable":true,"minLength":1}},"required":["webhook","secret"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Switch the webhook on or off, change its proof mode or its rate limit","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["signed","github","token","telegram","form","unsigned"]},"ratePerMin":{"type":"integer","minimum":1,"maximum":600},"acknowledgeUnsigned":{"type":"boolean"},"form":{"type":"object","properties":{"honeypot":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,39}$"},"redirect":{"type":"string","nullable":true,"maxLength":500},"origins":{"type":"array","items":{"type":"string","pattern":"^(https:\\/\\/[a-z0-9]([a-z0-9.-]{0,251}[a-z0-9])?(:\\d{1,5})?|http:\\/\\/localhost(:\\d{1,5})?)$"},"maxItems":5}},"required":["honeypot","redirect","origins"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"configured":{"type":"boolean"},"url":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["signed","github","token","telegram","form","unsigned"]},"secretHint":{"type":"string","nullable":true},"ratePerMin":{"type":"integer","minimum":1,"maximum":600},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"form":{"type":"object","nullable":true,"properties":{"honeypot":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,39}$"},"redirect":{"type":"string","nullable":true,"maxLength":500},"origins":{"type":"array","items":{"type":"string","pattern":"^(https:\\/\\/[a-z0-9]([a-z0-9.-]{0,251}[a-z0-9])?(:\\d{1,5})?|http:\\/\\/localhost(:\\d{1,5})?)$"},"maxItems":5}},"default":null,"required":["honeypot","redirect","origins"]}},"required":["configured","url","enabled","mode","secretHint","ratePerMin","createdAt","rotatedAt"]},"secret":{"type":"string","nullable":true,"minLength":1}},"required":["webhook","secret"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/automations/{id}/webhook/rotate":{"post":{"summary":"Rotate the secret: a new one, shown once; the old one stops working at once","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"configured":{"type":"boolean"},"url":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["signed","github","token","telegram","form","unsigned"]},"secretHint":{"type":"string","nullable":true},"ratePerMin":{"type":"integer","minimum":1,"maximum":600},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"form":{"type":"object","nullable":true,"properties":{"honeypot":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,39}$"},"redirect":{"type":"string","nullable":true,"maxLength":500},"origins":{"type":"array","items":{"type":"string","pattern":"^(https:\\/\\/[a-z0-9]([a-z0-9.-]{0,251}[a-z0-9])?(:\\d{1,5})?|http:\\/\\/localhost(:\\d{1,5})?)$"},"maxItems":5}},"default":null,"required":["honeypot","redirect","origins"]}},"required":["configured","url","enabled","mode","secretHint","ratePerMin","createdAt","rotatedAt"]},"secret":{"type":"string","nullable":true,"minLength":1}},"required":["webhook","secret"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/automations/{id}/webhook/test":{"post":{"summary":"Send a signed sample event through the real webhook path (a run starts)","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"delivery":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["accepted","duplicate","rejected"]},"status":{"type":"integer","minimum":100,"maximum":599},"reason":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"bytes":{"type":"integer","minimum":0},"sample":{"type":"boolean"},"deadLetterId":{"type":"string","nullable":true,"default":null}},"required":["id","at","outcome","status","reason","runId","bytes","sample"]},"runId":{"type":"string","nullable":true}},"required":["delivery","runId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/automations/{id}/heartbeat":{"get":{"summary":"The heartbeat: what is expected, how it is doing, runs per day and who is told","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"notify":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["in-app"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["telegram"]},"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["kind","connectorId","chatId"]}]},"maxItems":4}},"required":["enabled","expect","notify"]},"status":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"series":{"type":"array","items":{"type":"integer","minimum":0}},"expectedPerDay":{"type":"number","nullable":true,"minimum":0},"windowCount":{"type":"integer","minimum":0},"alertedAt":{"type":"string","nullable":true,"format":"date-time"},"channels":{"type":"object","properties":{"telegram":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"connected":{"type":"boolean"}},"required":["id","name","connected"]}}},"required":["telegram"]}},"required":["settings","status","series","expectedPerDay","windowCount","alertedAt","channels"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Set how often it must run (at least N per hour or day) and who hears when it is quiet","tags":["automations"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"notify":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["in-app"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["telegram"]},"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["kind","connectorId","chatId"]}]},"maxItems":4}},"required":["enabled","expect","notify"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"notify":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["in-app"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["telegram"]},"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["kind","connectorId","chatId"]}]},"maxItems":4}},"required":["enabled","expect","notify"]},"status":{"type":"object","nullable":true,"properties":{"state":{"type":"string","enum":["healthy","quiet","alerting","off"]},"expect":{"type":"object","properties":{"atLeast":{"type":"integer","minimum":1,"maximum":10000},"per":{"type":"string","enum":["hour","day"]}},"required":["atLeast","per"]},"quietSince":{"type":"string","nullable":true,"format":"date-time"}},"required":["state","expect","quietSince"]},"series":{"type":"array","items":{"type":"integer","minimum":0}},"expectedPerDay":{"type":"number","nullable":true,"minimum":0},"windowCount":{"type":"integer","minimum":0},"alertedAt":{"type":"string","nullable":true,"format":"date-time"},"channels":{"type":"object","properties":{"telegram":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"connected":{"type":"boolean"}},"required":["id","name","connected"]}}},"required":["telegram"]}},"required":["settings","status","series","expectedPerDay","windowCount","alertedAt","channels"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/imports/analyze":{"post":{"summary":"Read an exported n8n, Zapier or Make workflow and report what maps, what needs a connection and what does not import. Keeps nothing.","tags":["imports"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":400000}},"required":["source"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"format":{"type":"string","enum":["n8n","zapier","make"]},"name":{"type":"string","maxLength":120},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","nullable":true,"maxLength":64}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]},"wanted":{"type":"string","nullable":true,"maxLength":120}},"required":["type","wanted"]}]},"starts":{"type":"string","maxLength":200},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","maxLength":120},"sourceType":{"type":"string","maxLength":160},"app":{"type":"string","maxLength":60},"role":{"type":"string","enum":["trigger","step"]},"status":{"type":"string","enum":["exact","partial","unsupported","ignored"]},"mapsTo":{"type":"string","nullable":true,"maxLength":120},"reason":{"type":"string","nullable":true,"maxLength":400},"notes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":8},"needs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"slot":{"type":"string"},"host":{"type":"string"}},"required":["kind","slot","host"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"required":["kind","connector"]},{"type":"object","properties":{"kind":{"type":"string","enum":["trigger"]},"wanted":{"type":"string"}},"required":["kind","wanted"]}]},"maxItems":4},"depth":{"type":"integer","minimum":0,"maximum":3},"branch":{"type":"string","nullable":true,"enum":["then","otherwise",null]}},"required":["id","name","sourceType","app","role","status","mapsTo","reason","notes","needs","depth","branch"]},"maxItems":260},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"connections":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"host":{"type":"string"},"preset":{"type":"string","nullable":true},"label":{"type":"string"},"auth":{"type":"string","enum":["none","bearer","header","basic","path_token","unknown"]},"headerName":{"type":"string","nullable":true},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}},"required":["slot","host","preset","label","auth","headerName","methods","pathPrefix","steps"]},"maxItems":12},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"name":{"type":"string"},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"steps":{"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true}},"required":["id","name","status","steps","note"]},"maxItems":6},"secrets":{"type":"array","items":{"type":"object","properties":{"where":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["header","query","url","field","code"]}},"required":["where","kind"]},"maxItems":40},"warnings":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"canCreate":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]},"maxItems":40},"sentences":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":40}},"required":["v","format","name","trigger","starts","items","totals","connections","connectors","secrets","warnings","canCreate","facts","sentences"]},"context":{"type":"object","properties":{"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connected":{"type":"boolean"}},"required":["id","connected"]}},"matches":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^conn_[a-z0-9]{6,40}$"},"name":{"type":"string"},"connected":{"type":"boolean"},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"fits":{"type":"boolean"},"problem":{"type":"string","nullable":true}},"required":["id","name","connected","methods","pathPrefix","fits","problem"]}}},"required":["slot","connections"]}}},"required":["connectors","matches"]}},"required":["report","context"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"imports.analyze"}}},"/v1/workspaces/{ws}/imports":{"post":{"summary":"Import a workflow: creates a disabled automation on a draft app, to be reviewed and enabled by its owner","tags":["imports"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":400000},"name":{"type":"string","minLength":2,"maxLength":60}},"required":["source"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"type":"string","enum":["n8n","zapier","make"]},"status":{"type":"string","enum":["review","enabled","discarded"]},"appId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"createdAt":{"type":"string","format":"date-time"},"report":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"format":{"type":"string","enum":["n8n","zapier","make"]},"name":{"type":"string","maxLength":120},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","nullable":true,"maxLength":64}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]},"wanted":{"type":"string","nullable":true,"maxLength":120}},"required":["type","wanted"]}]},"starts":{"type":"string","maxLength":200},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","maxLength":120},"sourceType":{"type":"string","maxLength":160},"app":{"type":"string","maxLength":60},"role":{"type":"string","enum":["trigger","step"]},"status":{"type":"string","enum":["exact","partial","unsupported","ignored"]},"mapsTo":{"type":"string","nullable":true,"maxLength":120},"reason":{"type":"string","nullable":true,"maxLength":400},"notes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":8},"needs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"slot":{"type":"string"},"host":{"type":"string"}},"required":["kind","slot","host"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"required":["kind","connector"]},{"type":"object","properties":{"kind":{"type":"string","enum":["trigger"]},"wanted":{"type":"string"}},"required":["kind","wanted"]}]},"maxItems":4},"depth":{"type":"integer","minimum":0,"maximum":3},"branch":{"type":"string","nullable":true,"enum":["then","otherwise",null]}},"required":["id","name","sourceType","app","role","status","mapsTo","reason","notes","needs","depth","branch"]},"maxItems":260},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"connections":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"host":{"type":"string"},"preset":{"type":"string","nullable":true},"label":{"type":"string"},"auth":{"type":"string","enum":["none","bearer","header","basic","path_token","unknown"]},"headerName":{"type":"string","nullable":true},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}},"required":["slot","host","preset","label","auth","headerName","methods","pathPrefix","steps"]},"maxItems":12},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"name":{"type":"string"},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"steps":{"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true}},"required":["id","name","status","steps","note"]},"maxItems":6},"secrets":{"type":"array","items":{"type":"object","properties":{"where":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["header","query","url","field","code"]}},"required":["where","kind"]},"maxItems":40},"warnings":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"canCreate":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]},"maxItems":40},"sentences":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":40}},"required":["v","format","name","trigger","starts","items","totals","connections","connectors","secrets","warnings","canCreate","facts","sentences"]},"context":{"type":"object","properties":{"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connected":{"type":"boolean"}},"required":["id","connected"]}},"matches":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^conn_[a-z0-9]{6,40}$"},"name":{"type":"string"},"connected":{"type":"boolean"},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"fits":{"type":"boolean"},"problem":{"type":"string","nullable":true}},"required":["id","name","connected","methods","pathPrefix","fits","problem"]}}},"required":["slot","connections"]}}},"required":["connectors","matches"]},"bindings":{"type":"object","additionalProperties":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["untranslated","connection","connector","policy","review_closed"]},"message":{"type":"string","maxLength":400},"ref":{"type":"string","nullable":true}},"required":["code","message","ref"]}},"canDecide":{"type":"boolean"},"needsAdmin":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]}},"decidedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","format","status","appId","automationId","totals","createdAt","report","context","bindings","skipped","blockers","canDecide","needsAdmin","facts","decidedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"imports.create"}},"get":{"summary":"Your imports (an admin sees every import in the workspace), newest first","tags":["imports"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"type":"string","enum":["n8n","zapier","make"]},"status":{"type":"string","enum":["review","enabled","discarded"]},"appId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","format","status","appId","automationId","totals","createdAt"]}}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/imports/{id}":{"get":{"summary":"One import with its report, what the workspace already has for it, and what blocks it","tags":["imports"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"type":"string","enum":["n8n","zapier","make"]},"status":{"type":"string","enum":["review","enabled","discarded"]},"appId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"createdAt":{"type":"string","format":"date-time"},"report":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"format":{"type":"string","enum":["n8n","zapier","make"]},"name":{"type":"string","maxLength":120},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","nullable":true,"maxLength":64}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]},"wanted":{"type":"string","nullable":true,"maxLength":120}},"required":["type","wanted"]}]},"starts":{"type":"string","maxLength":200},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","maxLength":120},"sourceType":{"type":"string","maxLength":160},"app":{"type":"string","maxLength":60},"role":{"type":"string","enum":["trigger","step"]},"status":{"type":"string","enum":["exact","partial","unsupported","ignored"]},"mapsTo":{"type":"string","nullable":true,"maxLength":120},"reason":{"type":"string","nullable":true,"maxLength":400},"notes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":8},"needs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"slot":{"type":"string"},"host":{"type":"string"}},"required":["kind","slot","host"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"required":["kind","connector"]},{"type":"object","properties":{"kind":{"type":"string","enum":["trigger"]},"wanted":{"type":"string"}},"required":["kind","wanted"]}]},"maxItems":4},"depth":{"type":"integer","minimum":0,"maximum":3},"branch":{"type":"string","nullable":true,"enum":["then","otherwise",null]}},"required":["id","name","sourceType","app","role","status","mapsTo","reason","notes","needs","depth","branch"]},"maxItems":260},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"connections":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"host":{"type":"string"},"preset":{"type":"string","nullable":true},"label":{"type":"string"},"auth":{"type":"string","enum":["none","bearer","header","basic","path_token","unknown"]},"headerName":{"type":"string","nullable":true},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}},"required":["slot","host","preset","label","auth","headerName","methods","pathPrefix","steps"]},"maxItems":12},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"name":{"type":"string"},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"steps":{"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true}},"required":["id","name","status","steps","note"]},"maxItems":6},"secrets":{"type":"array","items":{"type":"object","properties":{"where":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["header","query","url","field","code"]}},"required":["where","kind"]},"maxItems":40},"warnings":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"canCreate":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]},"maxItems":40},"sentences":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":40}},"required":["v","format","name","trigger","starts","items","totals","connections","connectors","secrets","warnings","canCreate","facts","sentences"]},"context":{"type":"object","properties":{"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connected":{"type":"boolean"}},"required":["id","connected"]}},"matches":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^conn_[a-z0-9]{6,40}$"},"name":{"type":"string"},"connected":{"type":"boolean"},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"fits":{"type":"boolean"},"problem":{"type":"string","nullable":true}},"required":["id","name","connected","methods","pathPrefix","fits","problem"]}}},"required":["slot","connections"]}}},"required":["connectors","matches"]},"bindings":{"type":"object","additionalProperties":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["untranslated","connection","connector","policy","review_closed"]},"message":{"type":"string","maxLength":400},"ref":{"type":"string","nullable":true}},"required":["code","message","ref"]}},"canDecide":{"type":"boolean"},"needsAdmin":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]}},"decidedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","format","status","appId","automationId","totals","createdAt","report","context","bindings","skipped","blockers","canDecide","needsAdmin","facts","decidedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/imports/{id}/enable":{"post":{"summary":"Enable an import: choose its connections, skip what could not be translated, and turn the automation on","tags":["imports"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bindings":{"type":"object","additionalProperties":{"type":"string","pattern":"^conn_[a-z0-9]{6,40}$"},"default":{}},"skip":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,31}$"},"maxItems":40,"default":[]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"type":"string","enum":["n8n","zapier","make"]},"status":{"type":"string","enum":["review","enabled","discarded"]},"appId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"createdAt":{"type":"string","format":"date-time"},"report":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"format":{"type":"string","enum":["n8n","zapier","make"]},"name":{"type":"string","maxLength":120},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","nullable":true,"maxLength":64}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]},"wanted":{"type":"string","nullable":true,"maxLength":120}},"required":["type","wanted"]}]},"starts":{"type":"string","maxLength":200},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","maxLength":120},"sourceType":{"type":"string","maxLength":160},"app":{"type":"string","maxLength":60},"role":{"type":"string","enum":["trigger","step"]},"status":{"type":"string","enum":["exact","partial","unsupported","ignored"]},"mapsTo":{"type":"string","nullable":true,"maxLength":120},"reason":{"type":"string","nullable":true,"maxLength":400},"notes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":8},"needs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"slot":{"type":"string"},"host":{"type":"string"}},"required":["kind","slot","host"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"required":["kind","connector"]},{"type":"object","properties":{"kind":{"type":"string","enum":["trigger"]},"wanted":{"type":"string"}},"required":["kind","wanted"]}]},"maxItems":4},"depth":{"type":"integer","minimum":0,"maximum":3},"branch":{"type":"string","nullable":true,"enum":["then","otherwise",null]}},"required":["id","name","sourceType","app","role","status","mapsTo","reason","notes","needs","depth","branch"]},"maxItems":260},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"connections":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"host":{"type":"string"},"preset":{"type":"string","nullable":true},"label":{"type":"string"},"auth":{"type":"string","enum":["none","bearer","header","basic","path_token","unknown"]},"headerName":{"type":"string","nullable":true},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}},"required":["slot","host","preset","label","auth","headerName","methods","pathPrefix","steps"]},"maxItems":12},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"name":{"type":"string"},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"steps":{"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true}},"required":["id","name","status","steps","note"]},"maxItems":6},"secrets":{"type":"array","items":{"type":"object","properties":{"where":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["header","query","url","field","code"]}},"required":["where","kind"]},"maxItems":40},"warnings":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"canCreate":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]},"maxItems":40},"sentences":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":40}},"required":["v","format","name","trigger","starts","items","totals","connections","connectors","secrets","warnings","canCreate","facts","sentences"]},"context":{"type":"object","properties":{"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connected":{"type":"boolean"}},"required":["id","connected"]}},"matches":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^conn_[a-z0-9]{6,40}$"},"name":{"type":"string"},"connected":{"type":"boolean"},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"fits":{"type":"boolean"},"problem":{"type":"string","nullable":true}},"required":["id","name","connected","methods","pathPrefix","fits","problem"]}}},"required":["slot","connections"]}}},"required":["connectors","matches"]},"bindings":{"type":"object","additionalProperties":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["untranslated","connection","connector","policy","review_closed"]},"message":{"type":"string","maxLength":400},"ref":{"type":"string","nullable":true}},"required":["code","message","ref"]}},"canDecide":{"type":"boolean"},"needsAdmin":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]}},"decidedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","format","status","appId","automationId","totals","createdAt","report","context","bindings","skipped","blockers","canDecide","needsAdmin","facts","decidedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/imports/{id}/discard":{"post":{"summary":"Discard an import that was never enabled: its draft app and paused road are removed","tags":["imports"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"format":{"type":"string","enum":["n8n","zapier","make"]},"status":{"type":"string","enum":["review","enabled","discarded"]},"appId":{"type":"string","nullable":true},"automationId":{"type":"string","nullable":true},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"createdAt":{"type":"string","format":"date-time"},"report":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"format":{"type":"string","enum":["n8n","zapier","make"]},"name":{"type":"string","maxLength":120},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","maxLength":120,"pattern":"^\\S+(\\s+\\S+){4}$"},"timezone":{"type":"string","nullable":true,"maxLength":64}},"required":["type","cron","timezone"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]},"wanted":{"type":"string","nullable":true,"maxLength":120}},"required":["type","wanted"]}]},"starts":{"type":"string","maxLength":200},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","maxLength":120},"sourceType":{"type":"string","maxLength":160},"app":{"type":"string","maxLength":60},"role":{"type":"string","enum":["trigger","step"]},"status":{"type":"string","enum":["exact","partial","unsupported","ignored"]},"mapsTo":{"type":"string","nullable":true,"maxLength":120},"reason":{"type":"string","nullable":true,"maxLength":400},"notes":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":8},"needs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"slot":{"type":"string"},"host":{"type":"string"}},"required":["kind","slot","host"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]}},"required":["kind","connector"]},{"type":"object","properties":{"kind":{"type":"string","enum":["trigger"]},"wanted":{"type":"string"}},"required":["kind","wanted"]}]},"maxItems":4},"depth":{"type":"integer","minimum":0,"maximum":3},"branch":{"type":"string","nullable":true,"enum":["then","otherwise",null]}},"required":["id","name","sourceType","app","role","status","mapsTo","reason","notes","needs","depth","branch"]},"maxItems":260},"totals":{"type":"object","properties":{"steps":{"type":"integer","minimum":0},"exact":{"type":"integer","minimum":0},"partial":{"type":"integer","minimum":0},"unsupported":{"type":"integer","minimum":0},"ignored":{"type":"integer","minimum":0},"needsConnection":{"type":"integer","minimum":0}},"required":["steps","exact","partial","unsupported","ignored","needsConnection"]},"connections":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"host":{"type":"string"},"preset":{"type":"string","nullable":true},"label":{"type":"string"},"auth":{"type":"string","enum":["none","bearer","header","basic","path_token","unknown"]},"headerName":{"type":"string","nullable":true},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}},"required":["slot","host","preset","label","auth","headerName","methods","pathPrefix","steps"]},"maxItems":12},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"name":{"type":"string"},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"steps":{"type":"array","items":{"type":"string"}},"note":{"type":"string","nullable":true}},"required":["id","name","status","steps","note"]},"maxItems":6},"secrets":{"type":"array","items":{"type":"object","properties":{"where":{"type":"string","maxLength":160},"kind":{"type":"string","enum":["header","query","url","field","code"]}},"required":["where","kind"]},"maxItems":40},"warnings":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"canCreate":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]},"maxItems":40},"sentences":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":40}},"required":["v","format","name","trigger","starts","items","totals","connections","connectors","secrets","warnings","canCreate","facts","sentences"]},"context":{"type":"object","properties":{"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connected":{"type":"boolean"}},"required":["id","connected"]}},"matches":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^conn_[a-z0-9]{6,40}$"},"name":{"type":"string"},"connected":{"type":"boolean"},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]}},"pathPrefix":{"type":"string"},"fits":{"type":"boolean"},"problem":{"type":"string","nullable":true}},"required":["id","name","connected","methods","pathPrefix","fits","problem"]}}},"required":["slot","connections"]}}},"required":["connectors","matches"]},"bindings":{"type":"object","additionalProperties":{"type":"string"}},"skipped":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["untranslated","connection","connector","policy","review_closed"]},"message":{"type":"string","maxLength":400},"ref":{"type":"string","nullable":true}},"required":["code","message","ref"]}},"canDecide":{"type":"boolean"},"needsAdmin":{"type":"boolean"},"facts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":20}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","maxLength":60},"action":{"type":"string","maxLength":60},"verb":{"type":"string","maxLength":120},"write":{"type":"boolean"},"scope":{"type":"string","maxLength":120}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","maxLength":253},"reason":{"type":"string","maxLength":200}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0,"maximum":200}},"required":["kind","extraDomains"]}]}},"decidedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","name","format","status","appId","automationId","totals","createdAt","report","context","bindings","skipped","blockers","canDecide","needsAdmin","facts","decidedAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/connector-catalog":{"get":{"summary":"Every connector, its auth scheme, actions, regions and status","tags":["connectors"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"},"connectorId":{"type":"string","nullable":true,"enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake",null]},"name":{"type":"string","minLength":1},"monogram":{"type":"string","minLength":1,"maxLength":3},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"group":{"type":"string","enum":["messaging","email","crm","commerce","data","developer"]},"summary":{"type":"string","minLength":1},"auth":{"type":"string","enum":["api_key","bot_token","oauth2","service_account","basic","webhook_url","none"]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-zA-Z]*$"},"kind":{"type":"string","enum":["secret","text","url","key_file"]},"label":{"type":"string","minLength":1},"help":{"type":"string","minLength":1},"link":{"type":"string","nullable":true,"format":"uri"},"required":{"type":"boolean"}},"required":["key","kind","label","help","link","required"]}},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"}},"required":["id","verb","write"]}},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["webhook","poll"]},"label":{"type":"string","minLength":1},"status":{"type":"string","enum":["available","planned"]}},"required":["id","kind","label","status"]}},"regions":{"type":"array","items":{"type":"string","enum":["global","kz"]},"minItems":1},"status":{"type":"string","enum":["available","beta","preview","needs-oauth-app","planned"]},"docsUrl":{"type":"string","format":"uri"},"guide":{"type":"string","nullable":true},"httpPreset":{"type":"object","nullable":true,"properties":{"baseUrl":{"type":"string"},"auth":{"oneOf":[{"type":"object","properties":{"style":{"type":"string","enum":["bearer"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["header"]},"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"}},"required":["style","name"]},{"type":"object","properties":{"style":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x39\\x3b-\\x7e]+$"}},"required":["style","username"]},{"type":"object","properties":{"style":{"type":"string","enum":["path_token"]}},"required":["style"]},{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"]}]},"methods":{"type":"array","items":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"minItems":1},"pathPrefix":{"type":"string"},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,64}$"},"value":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"}},"required":["name","value"]}},"testPath":{"type":"string","nullable":true},"editHost":{"type":"boolean"},"testable":{"type":"boolean","default":true},"secretPath":{"type":"object","nullable":true,"properties":{"segments":{"type":"integer","minimum":1,"maximum":8},"example":{"type":"string","minLength":1}},"default":null,"required":["segments","example"]},"example":{"type":"string","nullable":true,"default":null}},"required":["baseUrl","auth","methods","pathPrefix","headers","testPath","editHost"]}},"required":["id","connectorId","name","monogram","category","group","summary","auth","fields","actions","triggers","regions","status","docsUrl","guide","httpPreset"]}}},"required":["entries"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"connectors.catalog"}}},"/v1/workspaces/{ws}/capacity":{"get":{"summary":"Plan, allocations, usage, tips and list prices (MOCK billing)","tags":["capacity"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planSource":{"type":"string","enum":["default","set"]},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"timezone":{"type":"string","minLength":1},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["start","end","daysInPeriod","day"]},"allocations":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"gaugeKind":{"type":"string","enum":["period","instant","stock"]},"included":{"type":"number","minimum":0},"addOnSteps":{"type":"integer","minimum":0},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"total":{"type":"number","minimum":0},"periodTotal":{"type":"number","minimum":0}},"required":["kind","status","gaugeKind","included","addOnSteps","stepSize","total","periodTotal"]}},"usage":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"},"note":{"type":"string","nullable":true},"measuredAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["kind","used","source","estimate","note","measuredAt"]}},"quotas":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"limit":{"type":"number","minimum":0},"graceLimit":{"type":"number","minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"level":{"type":"string","enum":["ok","warn","limit"]},"notice":{"anyOf":[{"type":"number","enum":[80]},{"type":"number","enum":[90]},{"type":"number","enum":[100]},{"type":"number","enum":[110]},{"nullable":true}]},"action":{"type":"string","enum":["throttle","queue","read_only","hard_stop","refuse_start"]}},"required":["kind","used","limit","graceLimit","pct","band","level","notice","action"]}},"land":{"type":"object","properties":{"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"floor":{"type":"object","nullable":true,"properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"apps":{"type":"integer","minimum":0},"occupied":{"type":"object","nullable":true,"properties":{"maxX":{"type":"integer","minimum":0},"maxY":{"type":"integer","minimum":0}},"required":["maxX","maxY"]},"target":{"type":"object","properties":{"entitledPlots":{"type":"integer","minimum":0},"needPlots":{"type":"integer","minimum":0},"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"district":{"type":"object","properties":{"w":{"type":"integer","minimum":3,"maximum":8},"h":{"type":"integer","minimum":3,"maximum":6}},"required":["w","h"]},"held":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"w":{"type":"integer","minimum":1},"h":{"type":"integer","minimum":1}},"required":["x","y","w","h"]},"maxItems":2},"nextParcelEurMinor":{"type":"integer","nullable":true,"minimum":0}},"required":["entitledPlots","needPlots","island","district","held","nextParcelEurMinor"]}},"required":["island","floor","apps","occupied","target"]},"monthly":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"plan":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"addOns":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"steps":{"type":"integer","minimum":0},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","steps","monthly"]}}},"required":["currency","plan","addOns","total","lines"]},"budget":{"type":"object","nullable":true,"properties":{"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"ceilingEur":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["cap","ceilingEur"]},"canChange":{"type":"boolean"},"canChangePlan":{"type":"boolean"},"autoscale":{"type":"object","properties":{"enabled":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"minSteps":{"type":"integer","minimum":0,"maximum":1000},"maxSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","minSteps","maxSteps"]},"maxItems":17},"schedules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1,"maxItems":7},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"addOnSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","days","from","to","addOnSteps"]},"maxItems":8}},"required":["enabled","units","schedules"]},"recommendations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["upsize","downsize","allowance_ahead","allowance_idle","next_plan"]},"resource":{"type":"string","nullable":true,"enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz",null]},"evidence":{"type":"object","properties":{"window":{"type":"string","enum":["7d","14d","period","60d","price"]},"series":{"type":"array","items":{"type":"number"},"maxItems":64},"peakRatio":{"type":"number","nullable":true},"p95Ratio":{"type":"number","nullable":true},"daysOver":{"type":"integer","nullable":true},"projectedRatio":{"type":"number","nullable":true}},"required":["window","series","peakRatio","p95Ratio","daysOver","projectedRatio"]},"proposal":{"type":"object","properties":{"plan":{"type":"string","nullable":true,"enum":["free","maker","team","business","sovereign",null]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"addOnSteps":{"type":"integer","minimum":0}},"required":["kind","addOnSteps"]},"maxItems":17}},"required":["plan","lines"]},"monthlyDelta":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"summary":{"type":"string","minLength":1}},"required":["id","kind","resource","evidence","proposal","monthlyDelta","summary"]}},"prices":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"label":{"type":"string"},"status":{"type":"string","enum":["available","planned"]},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"stepLabel":{"type":"string"},"stepPrice":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","label","status","stepSize","stepLabel","stepPrice"]}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["free","maker","team","business","sovereign"]},"name":{"type":"string"},"price":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"note":{"type":"string","nullable":true}},"required":["id","name","price","note"]}}},"required":["currency","units","plans"]},"catalog":{"type":"object","properties":{"version":{"type":"string"},"checkedAt":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["version","checkedAt","status"]},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","version","plan","planSource","currency","timezone","period","allocations","usage","quotas","land","monthly","budget","canChange","canChangePlan","autoscale","recommendations","prices","catalog","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"capacity.get"}},"post":{"summary":"Apply a capacity change (admins; the plan needs the owner). MOCK billing","tags":["capacity"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"basedOnVersion":{"type":"integer","minimum":0},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"addOnSteps":{"type":"integer","minimum":0,"maximum":100000}},"required":["kind","addOnSteps"]},"maxItems":17}},"required":["basedOnVersion","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"change":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":1},"actor":{"type":"object","properties":{"kind":{"type":"string","enum":["person","autopilot","staff"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"plan":{"type":"object","properties":{"from":{"type":"string","enum":["free","maker","team","business","sovereign"]},"to":{"type":"string","enum":["free","maker","team","business","sovereign"]}},"required":["from","to"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"fromSteps":{"type":"integer","minimum":0},"toSteps":{"type":"integer","minimum":0},"fromTotal":{"type":"number","minimum":0},"toTotal":{"type":"number","minimum":0},"monthlyDelta":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"today":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"effective":{"type":"string","enum":["now"]},"periodFromTotal":{"type":"number","minimum":0},"periodToTotal":{"type":"number","minimum":0}},"required":["kind","fromSteps","toSteps","fromTotal","toTotal","monthlyDelta","today","effective"]}},"monthlyDelta":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"today":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"island":{"type":"object","properties":{"from":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"to":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]}},"required":["from","to"]},"billing":{"type":"object","properties":{"provider":{"type":"string","enum":["mock"]},"ref":{"type":"string","minLength":1},"note":{"type":"string","minLength":1}},"required":["provider","ref","note"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","version","actor","plan","lines","monthlyDelta","today","island","billing","createdAt"]},"state":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planSource":{"type":"string","enum":["default","set"]},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"timezone":{"type":"string","minLength":1},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["start","end","daysInPeriod","day"]},"allocations":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"gaugeKind":{"type":"string","enum":["period","instant","stock"]},"included":{"type":"number","minimum":0},"addOnSteps":{"type":"integer","minimum":0},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"total":{"type":"number","minimum":0},"periodTotal":{"type":"number","minimum":0}},"required":["kind","status","gaugeKind","included","addOnSteps","stepSize","total","periodTotal"]}},"usage":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"},"note":{"type":"string","nullable":true},"measuredAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["kind","used","source","estimate","note","measuredAt"]}},"quotas":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"limit":{"type":"number","minimum":0},"graceLimit":{"type":"number","minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"level":{"type":"string","enum":["ok","warn","limit"]},"notice":{"anyOf":[{"type":"number","enum":[80]},{"type":"number","enum":[90]},{"type":"number","enum":[100]},{"type":"number","enum":[110]},{"nullable":true}]},"action":{"type":"string","enum":["throttle","queue","read_only","hard_stop","refuse_start"]}},"required":["kind","used","limit","graceLimit","pct","band","level","notice","action"]}},"land":{"type":"object","properties":{"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"floor":{"type":"object","nullable":true,"properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"apps":{"type":"integer","minimum":0},"occupied":{"type":"object","nullable":true,"properties":{"maxX":{"type":"integer","minimum":0},"maxY":{"type":"integer","minimum":0}},"required":["maxX","maxY"]},"target":{"type":"object","properties":{"entitledPlots":{"type":"integer","minimum":0},"needPlots":{"type":"integer","minimum":0},"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"district":{"type":"object","properties":{"w":{"type":"integer","minimum":3,"maximum":8},"h":{"type":"integer","minimum":3,"maximum":6}},"required":["w","h"]},"held":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"w":{"type":"integer","minimum":1},"h":{"type":"integer","minimum":1}},"required":["x","y","w","h"]},"maxItems":2},"nextParcelEurMinor":{"type":"integer","nullable":true,"minimum":0}},"required":["entitledPlots","needPlots","island","district","held","nextParcelEurMinor"]}},"required":["island","floor","apps","occupied","target"]},"monthly":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"plan":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"addOns":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"steps":{"type":"integer","minimum":0},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","steps","monthly"]}}},"required":["currency","plan","addOns","total","lines"]},"budget":{"type":"object","nullable":true,"properties":{"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"ceilingEur":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["cap","ceilingEur"]},"canChange":{"type":"boolean"},"canChangePlan":{"type":"boolean"},"autoscale":{"type":"object","properties":{"enabled":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"minSteps":{"type":"integer","minimum":0,"maximum":1000},"maxSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","minSteps","maxSteps"]},"maxItems":17},"schedules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1,"maxItems":7},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"addOnSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","days","from","to","addOnSteps"]},"maxItems":8}},"required":["enabled","units","schedules"]},"recommendations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["upsize","downsize","allowance_ahead","allowance_idle","next_plan"]},"resource":{"type":"string","nullable":true,"enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz",null]},"evidence":{"type":"object","properties":{"window":{"type":"string","enum":["7d","14d","period","60d","price"]},"series":{"type":"array","items":{"type":"number"},"maxItems":64},"peakRatio":{"type":"number","nullable":true},"p95Ratio":{"type":"number","nullable":true},"daysOver":{"type":"integer","nullable":true},"projectedRatio":{"type":"number","nullable":true}},"required":["window","series","peakRatio","p95Ratio","daysOver","projectedRatio"]},"proposal":{"type":"object","properties":{"plan":{"type":"string","nullable":true,"enum":["free","maker","team","business","sovereign",null]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"addOnSteps":{"type":"integer","minimum":0}},"required":["kind","addOnSteps"]},"maxItems":17}},"required":["plan","lines"]},"monthlyDelta":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"summary":{"type":"string","minLength":1}},"required":["id","kind","resource","evidence","proposal","monthlyDelta","summary"]}},"prices":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"label":{"type":"string"},"status":{"type":"string","enum":["available","planned"]},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"stepLabel":{"type":"string"},"stepPrice":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","label","status","stepSize","stepLabel","stepPrice"]}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["free","maker","team","business","sovereign"]},"name":{"type":"string"},"price":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"note":{"type":"string","nullable":true}},"required":["id","name","price","note"]}}},"required":["currency","units","plans"]},"catalog":{"type":"object","properties":{"version":{"type":"string"},"checkedAt":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["version","checkedAt","status"]},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","version","plan","planSource","currency","timezone","period","allocations","usage","quotas","land","monthly","budget","canChange","canChangePlan","autoscale","recommendations","prices","catalog","billing","notes"]}},"required":["change","state"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/capacity/preview":{"post":{"summary":"Price, land and problems of a capacity change; writes nothing","tags":["capacity"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"basedOnVersion":{"type":"integer","minimum":0},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"addOnSteps":{"type":"integer","minimum":0,"maximum":100000}},"required":["kind","addOnSteps"]},"maxItems":17}},"required":["basedOnVersion","lines"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"basedOnVersion":{"type":"integer","minimum":0},"plan":{"type":"object","properties":{"from":{"type":"string","enum":["free","maker","team","business","sovereign"]},"to":{"type":"string","enum":["free","maker","team","business","sovereign"]}},"required":["from","to"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"fromSteps":{"type":"integer","minimum":0},"toSteps":{"type":"integer","minimum":0},"fromTotal":{"type":"number","minimum":0},"toTotal":{"type":"number","minimum":0},"monthlyDelta":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"today":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"effective":{"type":"string","enum":["now"]},"periodFromTotal":{"type":"number","minimum":0},"periodToTotal":{"type":"number","minimum":0}},"required":["kind","fromSteps","toSteps","fromTotal","toTotal","monthlyDelta","today","effective"]}},"monthly":{"type":"object","nullable":true,"properties":{"from":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"to":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"delta":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["from","to","delta"]},"today":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"proration":{"type":"object","properties":{"daysCharged":{"type":"integer","minimum":0},"daysCredited":{"type":"integer","minimum":0},"daysInPeriod":{"type":"integer"}},"required":["daysCharged","daysCredited","daysInPeriod"]},"land":{"type":"object","properties":{"from":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"to":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"entitledFrom":{"type":"integer","minimum":0},"entitledTo":{"type":"integer","minimum":0},"held":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"w":{"type":"integer","minimum":1},"h":{"type":"integer","minimum":1}},"required":["x","y","w","h"]},"maxItems":2},"nextParcelEur":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["from","to","entitledFrom","entitledTo","held","nextParcelEur"]},"problems":{"type":"array","items":{"type":"string","enum":["below_use","planned_unit","not_on_plan","over_budget_cap","over_add_on_ceiling","free_plan","needs_owner","needs_admin","contract_plan","apps_over_plan"]}},"warnings":{"type":"array","items":{"type":"string","minLength":1}},"suggestPlan":{"type":"string","nullable":true,"enum":["free","maker","team","business","sovereign",null]},"billing":{"type":"string","enum":["mock"]}},"required":["basedOnVersion","plan","lines","monthly","today","proration","land","problems","warnings","suggestPlan","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/capacity/budget":{"put":{"summary":"Set the monthly add-on budget cap (owner). Nothing is bought above it","tags":["capacity"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["cap"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planSource":{"type":"string","enum":["default","set"]},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"timezone":{"type":"string","minLength":1},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["start","end","daysInPeriod","day"]},"allocations":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"gaugeKind":{"type":"string","enum":["period","instant","stock"]},"included":{"type":"number","minimum":0},"addOnSteps":{"type":"integer","minimum":0},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"total":{"type":"number","minimum":0},"periodTotal":{"type":"number","minimum":0}},"required":["kind","status","gaugeKind","included","addOnSteps","stepSize","total","periodTotal"]}},"usage":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"},"note":{"type":"string","nullable":true},"measuredAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["kind","used","source","estimate","note","measuredAt"]}},"quotas":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"limit":{"type":"number","minimum":0},"graceLimit":{"type":"number","minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"level":{"type":"string","enum":["ok","warn","limit"]},"notice":{"anyOf":[{"type":"number","enum":[80]},{"type":"number","enum":[90]},{"type":"number","enum":[100]},{"type":"number","enum":[110]},{"nullable":true}]},"action":{"type":"string","enum":["throttle","queue","read_only","hard_stop","refuse_start"]}},"required":["kind","used","limit","graceLimit","pct","band","level","notice","action"]}},"land":{"type":"object","properties":{"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"floor":{"type":"object","nullable":true,"properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"apps":{"type":"integer","minimum":0},"occupied":{"type":"object","nullable":true,"properties":{"maxX":{"type":"integer","minimum":0},"maxY":{"type":"integer","minimum":0}},"required":["maxX","maxY"]},"target":{"type":"object","properties":{"entitledPlots":{"type":"integer","minimum":0},"needPlots":{"type":"integer","minimum":0},"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"district":{"type":"object","properties":{"w":{"type":"integer","minimum":3,"maximum":8},"h":{"type":"integer","minimum":3,"maximum":6}},"required":["w","h"]},"held":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"w":{"type":"integer","minimum":1},"h":{"type":"integer","minimum":1}},"required":["x","y","w","h"]},"maxItems":2},"nextParcelEurMinor":{"type":"integer","nullable":true,"minimum":0}},"required":["entitledPlots","needPlots","island","district","held","nextParcelEurMinor"]}},"required":["island","floor","apps","occupied","target"]},"monthly":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"plan":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"addOns":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"steps":{"type":"integer","minimum":0},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","steps","monthly"]}}},"required":["currency","plan","addOns","total","lines"]},"budget":{"type":"object","nullable":true,"properties":{"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"ceilingEur":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["cap","ceilingEur"]},"canChange":{"type":"boolean"},"canChangePlan":{"type":"boolean"},"autoscale":{"type":"object","properties":{"enabled":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"minSteps":{"type":"integer","minimum":0,"maximum":1000},"maxSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","minSteps","maxSteps"]},"maxItems":17},"schedules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1,"maxItems":7},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"addOnSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","days","from","to","addOnSteps"]},"maxItems":8}},"required":["enabled","units","schedules"]},"recommendations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["upsize","downsize","allowance_ahead","allowance_idle","next_plan"]},"resource":{"type":"string","nullable":true,"enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz",null]},"evidence":{"type":"object","properties":{"window":{"type":"string","enum":["7d","14d","period","60d","price"]},"series":{"type":"array","items":{"type":"number"},"maxItems":64},"peakRatio":{"type":"number","nullable":true},"p95Ratio":{"type":"number","nullable":true},"daysOver":{"type":"integer","nullable":true},"projectedRatio":{"type":"number","nullable":true}},"required":["window","series","peakRatio","p95Ratio","daysOver","projectedRatio"]},"proposal":{"type":"object","properties":{"plan":{"type":"string","nullable":true,"enum":["free","maker","team","business","sovereign",null]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"addOnSteps":{"type":"integer","minimum":0}},"required":["kind","addOnSteps"]},"maxItems":17}},"required":["plan","lines"]},"monthlyDelta":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"summary":{"type":"string","minLength":1}},"required":["id","kind","resource","evidence","proposal","monthlyDelta","summary"]}},"prices":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"label":{"type":"string"},"status":{"type":"string","enum":["available","planned"]},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"stepLabel":{"type":"string"},"stepPrice":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","label","status","stepSize","stepLabel","stepPrice"]}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["free","maker","team","business","sovereign"]},"name":{"type":"string"},"price":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"note":{"type":"string","nullable":true}},"required":["id","name","price","note"]}}},"required":["currency","units","plans"]},"catalog":{"type":"object","properties":{"version":{"type":"string"},"checkedAt":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["version","checkedAt","status"]},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","version","plan","planSource","currency","timezone","period","allocations","usage","quotas","land","monthly","budget","canChange","canChangePlan","autoscale","recommendations","prices","catalog","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/capacity/autoscale":{"put":{"summary":"Save autopilot settings (admins). Planned: nothing acts on them yet","tags":["capacity"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"minSteps":{"type":"integer","minimum":0,"maximum":1000},"maxSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","minSteps","maxSteps"]},"maxItems":17},"schedules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1,"maxItems":7},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"addOnSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","days","from","to","addOnSteps"]},"maxItems":8}},"required":["enabled","units","schedules"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planSource":{"type":"string","enum":["default","set"]},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"timezone":{"type":"string","minLength":1},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["start","end","daysInPeriod","day"]},"allocations":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"gaugeKind":{"type":"string","enum":["period","instant","stock"]},"included":{"type":"number","minimum":0},"addOnSteps":{"type":"integer","minimum":0},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"total":{"type":"number","minimum":0},"periodTotal":{"type":"number","minimum":0}},"required":["kind","status","gaugeKind","included","addOnSteps","stepSize","total","periodTotal"]}},"usage":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"},"note":{"type":"string","nullable":true},"measuredAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["kind","used","source","estimate","note","measuredAt"]}},"quotas":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"limit":{"type":"number","minimum":0},"graceLimit":{"type":"number","minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"level":{"type":"string","enum":["ok","warn","limit"]},"notice":{"anyOf":[{"type":"number","enum":[80]},{"type":"number","enum":[90]},{"type":"number","enum":[100]},{"type":"number","enum":[110]},{"nullable":true}]},"action":{"type":"string","enum":["throttle","queue","read_only","hard_stop","refuse_start"]}},"required":["kind","used","limit","graceLimit","pct","band","level","notice","action"]}},"land":{"type":"object","properties":{"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"floor":{"type":"object","nullable":true,"properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"apps":{"type":"integer","minimum":0},"occupied":{"type":"object","nullable":true,"properties":{"maxX":{"type":"integer","minimum":0},"maxY":{"type":"integer","minimum":0}},"required":["maxX","maxY"]},"target":{"type":"object","properties":{"entitledPlots":{"type":"integer","minimum":0},"needPlots":{"type":"integer","minimum":0},"island":{"type":"object","properties":{"width":{"type":"integer","minimum":6,"maximum":64},"height":{"type":"integer","minimum":6,"maximum":64}},"required":["width","height"]},"district":{"type":"object","properties":{"w":{"type":"integer","minimum":3,"maximum":8},"h":{"type":"integer","minimum":3,"maximum":6}},"required":["w","h"]},"held":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"w":{"type":"integer","minimum":1},"h":{"type":"integer","minimum":1}},"required":["x","y","w","h"]},"maxItems":2},"nextParcelEurMinor":{"type":"integer","nullable":true,"minimum":0}},"required":["entitledPlots","needPlots","island","district","held","nextParcelEurMinor"]}},"required":["island","floor","apps","occupied","target"]},"monthly":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"plan":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"addOns":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"steps":{"type":"integer","minimum":0},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","steps","monthly"]}}},"required":["currency","plan","addOns","total","lines"]},"budget":{"type":"object","nullable":true,"properties":{"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"ceilingEur":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["cap","ceilingEur"]},"canChange":{"type":"boolean"},"canChangePlan":{"type":"boolean"},"autoscale":{"type":"object","properties":{"enabled":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"minSteps":{"type":"integer","minimum":0,"maximum":1000},"maxSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","minSteps","maxSteps"]},"maxItems":17},"schedules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"minItems":1,"maxItems":7},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"to":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"addOnSteps":{"type":"integer","minimum":0,"maximum":1000}},"required":["kind","days","from","to","addOnSteps"]},"maxItems":8}},"required":["enabled","units","schedules"]},"recommendations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["upsize","downsize","allowance_ahead","allowance_idle","next_plan"]},"resource":{"type":"string","nullable":true,"enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz",null]},"evidence":{"type":"object","properties":{"window":{"type":"string","enum":["7d","14d","period","60d","price"]},"series":{"type":"array","items":{"type":"number"},"maxItems":64},"peakRatio":{"type":"number","nullable":true},"p95Ratio":{"type":"number","nullable":true},"daysOver":{"type":"integer","nullable":true},"projectedRatio":{"type":"number","nullable":true}},"required":["window","series","peakRatio","p95Ratio","daysOver","projectedRatio"]},"proposal":{"type":"object","properties":{"plan":{"type":"string","nullable":true,"enum":["free","maker","team","business","sovereign",null]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"addOnSteps":{"type":"integer","minimum":0}},"required":["kind","addOnSteps"]},"maxItems":17}},"required":["plan","lines"]},"monthlyDelta":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"summary":{"type":"string","minLength":1}},"required":["id","kind","resource","evidence","proposal","monthlyDelta","summary"]}},"prices":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"label":{"type":"string"},"status":{"type":"string","enum":["available","planned"]},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"stepLabel":{"type":"string"},"stepPrice":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","label","status","stepSize","stepLabel","stepPrice"]}},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["free","maker","team","business","sovereign"]},"name":{"type":"string"},"price":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"note":{"type":"string","nullable":true}},"required":["id","name","price","note"]}}},"required":["currency","units","plans"]},"catalog":{"type":"object","properties":{"version":{"type":"string"},"checkedAt":{"type":"string","format":"date"},"status":{"type":"string"}},"required":["version","checkedAt","status"]},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","version","plan","planSource","currency","timezone","period","allocations","usage","quotas","land","monthly","budget","canChange","canChangePlan","autoscale","recommendations","prices","catalog","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/usage":{"get":{"summary":"Daily usage per resource (measured or labelled estimate)","tags":["capacity"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d"},"required":false,"name":"range","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["7d","30d","90d"]},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"},"note":{"type":"string","nullable":true},"points":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"value":{"type":"number","minimum":0}},"required":["day","value"]},"maxItems":93}},"required":["kind","source","estimate","note","points"]}}},"required":["range","from","to","timezone","units"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/infrastructure":{"get":{"summary":"Providers, regions, where this workspace sits and how its apps scale","tags":["infrastructure"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["cloudflare","aws","gcp","azure","alem-ai"]},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["live","deploy-ready","planned"]},"role":{"type":"string","enum":["edge-runtime","control-plane","cloud","ai-cloud"]},"summary":{"type":"string","minLength":1,"maxLength":200}},"required":["id","name","status","role","summary"]}},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,40}$"},"city":{"type":"string","minLength":1},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"precision":{"type":"string","enum":["city","country"]},"provider":{"type":"string","nullable":true,"enum":["cloudflare","aws","gcp","azure","alem-ai",null]},"role":{"type":"string","enum":["edge","control-plane","residency-cell"]},"status":{"type":"string","enum":["live","deploy-ready","planned"]},"residency":{"type":"string","minLength":1,"maxLength":260}},"required":["id","city","country","lat","lon","precision","provider","role","status","residency"]}},"placement":{"type":"object","properties":{"cell":{"type":"string","enum":["global","eu","kz"]},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]},"controlPlaneRegionId":{"type":"string"},"runsAt":{"type":"string","enum":["edge"]},"residency":{"type":"string","enum":["planned"]}},"required":["cell","profile","controlPlaneRegionId","runsAt","residency"]},"scaling":{"type":"object","properties":{"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"concurrencyCap":{"type":"integer","minimum":1},"defaults":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]},"limits":{"type":"object","properties":{"maxConcurrency":{"type":"integer","minimum":1},"warmAllowed":{"type":"boolean"},"placements":{"type":"array","items":{"type":"string","enum":["auto","region-pin"]},"minItems":1}},"required":["maxConcurrency","warmAllowed","placements"]},"spendCap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"apps":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"policy":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]},"source":{"type":"string","enum":["default","custom"]}},"required":["appId","name","policy","source"]}},"enforcement":{"type":"string","enum":["preview"]},"note":{"type":"string","minLength":1}},"required":["plan","concurrencyCap","defaults","limits","spendCap","apps","enforcement","note"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["providers","regions","placement","scaling","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/apps/{appId}/scaling":{"get":{"summary":"One app's scaling policy, the plan default and the limits (Preview)","tags":["infrastructure"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"appId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"policy":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]},"source":{"type":"string","enum":["default","custom"]},"defaults":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]},"limits":{"type":"object","properties":{"maxConcurrency":{"type":"integer","minimum":1},"warmAllowed":{"type":"boolean"},"placements":{"type":"array","items":{"type":"string","enum":["auto","region-pin"]},"minItems":1}},"required":["maxConcurrency","warmAllowed","placements"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"canEdit":{"type":"boolean"},"enforcement":{"type":"string","enum":["preview"]},"note":{"type":"string","minLength":1}},"required":["appId","policy","source","defaults","limits","plan","canEdit","enforcement","note"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Set an app's scaling policy (editors). Checked against the workspace's runs at once. Preview: saved, not applied yet","tags":["infrastructure"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"appId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"policy":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]},"source":{"type":"string","enum":["default","custom"]},"defaults":{"type":"object","properties":{"minWarm":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"maxConcurrency":{"type":"integer","minimum":1,"maximum":100000},"sleepAfterIdleMin":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[5]},{"type":"number","enum":[15]},{"type":"number","enum":[30]},{"type":"number","enum":[60]}]},"placement":{"type":"string","enum":["auto","region-pin"]},"burst":{"type":"boolean"}},"required":["minWarm","maxConcurrency","sleepAfterIdleMin","placement","burst"]},"limits":{"type":"object","properties":{"maxConcurrency":{"type":"integer","minimum":1},"warmAllowed":{"type":"boolean"},"placements":{"type":"array","items":{"type":"string","enum":["auto","region-pin"]},"minItems":1}},"required":["maxConcurrency","warmAllowed","placements"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"canEdit":{"type":"boolean"},"enforcement":{"type":"string","enum":["preview"]},"note":{"type":"string","minLength":1}},"required":["appId","policy","source","defaults","limits","plan","canEdit","enforcement","note"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/plan":{"get":{"summary":"The plan, what it includes, the headline meters and the spend cap (MOCK billing)","tags":["plan"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planSource":{"type":"string","enum":["default","set"]},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["start","end","daysInPeriod","day"]},"entitlements":{"type":"object","properties":{"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"name":{"type":"string","minLength":1},"apps":{"type":"integer","nullable":true},"builders":{"type":"integer","nullable":true},"contract":{"type":"boolean"},"viewers":{"type":"string","enum":["free"]},"addOns":{"type":"object","properties":{"allowed":{"type":"boolean"},"ceilingEurMinor":{"type":"integer","nullable":true}},"required":["allowed","ceilingEurMinor"]},"headline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["runs","requests","storage","ai"]},"measure":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"total":{"type":"number","minimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"included":{"type":"number","minimum":0},"total":{"type":"number"}},"required":["kind","included","total"]}}},"required":["id","measure","total","parts"]}},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"headline":{"type":"string","nullable":true,"enum":["runs","requests","storage","ai",null]},"included":{"type":"number","minimum":0},"addOnSteps":{"type":"integer","minimum":0},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"total":{"type":"number","minimum":0},"canBuy":{"type":"boolean"}},"required":["kind","status","headline","included","addOnSteps","stepSize","total","canBuy"]}}},"required":["plan","name","apps","builders","contract","viewers","addOns","headline","units"]},"headline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["runs","requests","storage","ai"]},"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"projected":{"type":"number","nullable":true,"minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"}},"required":["id","kind","used","allowance","projected","pct","band","source","estimate"]}},"spend":{"type":"object","properties":{"hardCap":{"type":"boolean"},"alerts":{"type":"array","items":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]}]}},"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"ceiling":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"atCap":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string","enum":["apps","runs","builds"]},"does":{"type":"string","enum":["sleep","queue","pause"]},"maxQueueHours":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"enforced":{"type":"boolean"}},"required":["what","does","maxQueueHours","enforced"]}}},"required":["hardCap","alerts","cap","ceiling","atCap"]},"monthly":{"type":"object","nullable":true,"properties":{"plan":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"addOns":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["plan","addOns","total"]},"canChange":{"type":"boolean"},"canChangeCap":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","version","plan","planSource","currency","period","entitlements","headline","spend","monthly","canChange","canChangeCap","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Change the plan and the spend cap settings (admins; the cap amount needs the owner)","tags":["plan"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"basedOnVersion":{"type":"integer","minimum":0},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"spend":{"type":"object","properties":{"hardCap":{"type":"boolean"},"alerts":{"type":"array","items":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]}]},"maxItems":4},"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}}}},"required":["basedOnVersion"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planSource":{"type":"string","enum":["default","set"]},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["start","end","daysInPeriod","day"]},"entitlements":{"type":"object","properties":{"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"name":{"type":"string","minLength":1},"apps":{"type":"integer","nullable":true},"builders":{"type":"integer","nullable":true},"contract":{"type":"boolean"},"viewers":{"type":"string","enum":["free"]},"addOns":{"type":"object","properties":{"allowed":{"type":"boolean"},"ceilingEurMinor":{"type":"integer","nullable":true}},"required":["allowed","ceilingEurMinor"]},"headline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["runs","requests","storage","ai"]},"measure":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"total":{"type":"number","minimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"included":{"type":"number","minimum":0},"total":{"type":"number"}},"required":["kind","included","total"]}}},"required":["id","measure","total","parts"]}},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"status":{"type":"string","enum":["available","planned"]},"headline":{"type":"string","nullable":true,"enum":["runs","requests","storage","ai",null]},"included":{"type":"number","minimum":0},"addOnSteps":{"type":"integer","minimum":0},"stepSize":{"type":"number","minimum":0,"exclusiveMinimum":true},"total":{"type":"number","minimum":0},"canBuy":{"type":"boolean"}},"required":["kind","status","headline","included","addOnSteps","stepSize","total","canBuy"]}}},"required":["plan","name","apps","builders","contract","viewers","addOns","headline","units"]},"headline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["runs","requests","storage","ai"]},"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"projected":{"type":"number","nullable":true,"minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"band":{"type":"string","nullable":true,"enum":["ok","near","at",null]},"source":{"type":"string","enum":["runs_table","baas_log","row_estimate","ledger","mock","none"]},"estimate":{"type":"boolean"}},"required":["id","kind","used","allowance","projected","pct","band","source","estimate"]}},"spend":{"type":"object","properties":{"hardCap":{"type":"boolean"},"alerts":{"type":"array","items":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]}]}},"cap":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"ceiling":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"atCap":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string","enum":["apps","runs","builds"]},"does":{"type":"string","enum":["sleep","queue","pause"]},"maxQueueHours":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"enforced":{"type":"boolean"}},"required":["what","does","maxQueueHours","enforced"]}}},"required":["hardCap","alerts","cap","ceiling","atCap"]},"monthly":{"type":"object","nullable":true,"properties":{"plan":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"addOns":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["plan","addOns","total"]},"canChange":{"type":"boolean"},"canChangeCap":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","version","plan","planSource","currency","period","entitlements","headline","spend","monthly","canChange","canChangeCap","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/price-tags":{"get":{"summary":"What each app and automation you can open uses this month, at add-on list prices (MOCK billing)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"day":{"type":"integer","minimum":1,"maximum":31},"daysInPeriod":{"type":"integer","minimum":28,"maximum":31}},"required":["start","end","day","daysInPeriod"]},"runs":{"type":"object","properties":{"allowance":{"type":"number","minimum":0},"used":{"type":"number","minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"inside":{"type":"boolean"},"perThousand":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]}},"required":["allowance","used","pct","inside","perThousand"]},"apps":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app","automation"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"appId":{"type":"string","nullable":true},"runs":{"type":"number","minimum":0},"aiCredits":{"type":"number","nullable":true,"minimum":0},"runsShare":{"type":"number","nullable":true,"minimum":0},"listValue":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]},"projectedRuns":{"type":"number","nullable":true,"minimum":0},"projection":{"type":"string","nullable":true,"enum":["schedule","pace",null]},"projectedListValue":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]}},"required":["kind","id","name","appId","runs","aiCredits","runsShare","listValue","projectedRuns","projection","projectedListValue"]}},"automations":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app","automation"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"appId":{"type":"string","nullable":true},"runs":{"type":"number","minimum":0},"aiCredits":{"type":"number","nullable":true,"minimum":0},"runsShare":{"type":"number","nullable":true,"minimum":0},"listValue":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]},"projectedRuns":{"type":"number","nullable":true,"minimum":0},"projection":{"type":"string","nullable":true,"enum":["schedule","pace",null]},"projectedListValue":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]}},"required":["kind","id","name","appId","runs","aiCredits","runsShare","listValue","projectedRuns","projection","projectedListValue"]}},"build":{"type":"object","properties":{"credits":{"type":"number","minimum":0},"basis":{"type":"string","enum":["measured","assumed"]},"listValue":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]},"builds":{"type":"integer","nullable":true,"minimum":0},"spentCredits":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"left":{"type":"number","nullable":true}},"required":["credits","basis","listValue","builds","spentCredits","allowance","left"]},"hiddenApps":{"type":"integer","minimum":0},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","currency","period","runs","apps","automations","build","hiddenApps","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/quote":{"post":{"summary":"Before switching a schedule on: how many runs it takes and what that does to the month (read-only)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cron":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":64},"perDay":{"type":"number","minimum":0,"maximum":100000000},"appId":{"type":"string","minLength":1,"maxLength":128},"automationId":{"type":"string","minLength":1,"maxLength":128}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"basis":{"type":"string","enum":["schedule","rate"]},"cron":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"periodRuns":{"type":"integer","minimum":0},"remainingRuns":{"type":"integer","minimum":0},"replacedRuns":{"type":"integer","minimum":0},"perDay":{"type":"number","minimum":0},"allowance":{"type":"number","nullable":true,"minimum":0},"used":{"type":"number","nullable":true,"minimum":0},"after":{"type":"number","nullable":true,"minimum":0},"pctAfter":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"shareOfAllowance":{"type":"number","nullable":true,"minimum":0},"verdict":{"type":"string","enum":["fits","near","passes_allowance","refused","unknown"]},"extra":{"type":"object","nullable":true,"properties":{"runs":{"type":"number","minimum":0},"steps":{"type":"integer","minimum":1},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"canBuy":{"type":"boolean"}},"required":["runs","steps","monthly","canBuy"]},"listValue":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]},"budgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","enum":["app","automation","member","agent_token"]},"scopeName":{"type":"string","nullable":true},"mode":{"type":"string","enum":["soft","hard"]},"limit":{"type":"integer","minimum":0},"used":{"type":"number","minimum":0},"after":{"type":"number","minimum":0},"pctAfter":{"type":"number","minimum":0,"maximum":1000},"state":{"type":"string","enum":["ok","near","reached"]},"stops":{"type":"boolean"}},"required":["id","scope","scopeName","mode","limit","used","after","pctAfter","state","stops"]}},"sentence":{"type":"string","minLength":1},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["basis","cron","timezone","periodRuns","remainingRuns","replacedRuns","perDay","allowance","used","after","pctAfter","shareOfAllowance","verdict","extra","listValue","budgets","sentence","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"get":{"summary":"What an invoice or an act for a month would say, before it is issued","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","enum":["invoice","act"]},"required":true,"name":"kind","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"required":true,"name":"period","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["invoice","act"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","add_on"]},"ref":{"type":"string","minLength":1,"maxLength":40},"qty":{"type":"integer","minimum":1,"maximum":100000},"unitMinor":{"type":"integer","minimum":0,"maximum":1000000000},"amountMinor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["kind","ref","qty","unitMinor","amountMinor"]}},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]},"usage":{"type":"array","nullable":true,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"estimate":{"type":"boolean"}},"required":["kind","used","allowance","estimate"]}},"relatedNumber":{"type":"string","nullable":true},"problem":{"type":"object","nullable":true,"properties":{"code":{"type":"string","enum":["bad_period","before_workspace","too_old","too_far_ahead","period_not_finished","contract_plan","nothing_to_invoice"]},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message","hint"]},"preview":{"type":"boolean"}},"required":["kind","period","periodStart","periodEnd","plan","lines","vat","totals","usage","relatedNumber","problem","preview"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/changes":{"get":{"summary":"Why did my bill change: this month so far against the same days of last month, by meter, app and automation (MOCK billing)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":8},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"currency":{"type":"string","enum":["EUR","USD","KZT"]},"window":{"type":"object","properties":{"thisStart":{"type":"string","format":"date-time"},"thisEnd":{"type":"string","format":"date-time"},"lastStart":{"type":"string","format":"date-time"},"lastEnd":{"type":"string","format":"date-time"},"days":{"type":"integer","minimum":1,"maximum":31}},"required":["thisStart","thisEnd","lastStart","lastEnd","days"]},"bill":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"last":{"type":"object","properties":{"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["plan","total"]},"now":{"type":"object","properties":{"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"total":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["plan","total"]},"delta":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"causes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"period":{"type":"string","enum":["last","this"]},"actor":{"type":"string","enum":["person","autopilot","staff"]},"actorName":{"type":"string","nullable":true},"planFrom":{"type":"string","enum":["free","maker","team","business","sovereign"]},"planTo":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"fromSteps":{"type":"integer","minimum":0},"toSteps":{"type":"integer","minimum":0},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["kind","fromSteps","toSteps","monthly"]}},"monthly":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]},"explains":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"integer"}},"required":["currency","minor"]}},"required":["at","period","actor","actorName","planFrom","planTo","lines","monthly","explains"]}},"unchanged":{"type":"boolean"}},"required":["currency","last","now","delta","causes","unchanged"]},"units":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["runs","ai_credits","requests"]},"now":{"type":"number","minimum":0},"before":{"type":"number","minimum":0},"lastMonth":{"type":"number","minimum":0},"change":{"type":"number"},"changePct":{"type":"number","nullable":true},"basis":{"type":"string","enum":["counted","lower_bound","builds_only"]}},"required":["unit","now","before","lastMonth","change","changePct","basis"]}},"movers":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["app","automation"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"appId":{"type":"string","nullable":true},"unit":{"type":"string","enum":["runs","ai_credits"]},"now":{"type":"number","minimum":0},"before":{"type":"number","minimum":0},"change":{"type":"number"},"changePct":{"type":"number","nullable":true},"listChange":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","USD","KZT"]},"minor":{"type":"number"}},"required":["currency","minor"]}},"required":["kind","id","name","appId","unit","now","before","change","changePct","listChange"]}},"hiddenApps":{"type":"integer","minimum":0},"billing":{"type":"string","enum":["mock"]},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","currency","window","bill","units","movers","hiddenApps","billing","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/budgets":{"get":{"summary":"Budgets under the workspace cap: admins see all of them, a member sees the ones set on them","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]},"budgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","enum":["app","automation","member","agent_token"]},"scopeId":{"type":"string","minLength":1},"scopeName":{"type":"string","nullable":true},"meter":{"type":"string","enum":["runs","ai_credits"]},"limit":{"type":"integer","minimum":0},"mode":{"type":"string","enum":["soft","hard"]},"alerts":{"type":"array","items":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]}]}},"coverage":{"type":"string","enum":["enforced","tracked"]},"used":{"type":"number","nullable":true,"minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"state":{"type":"string","nullable":true,"enum":["ok","near","reached",null]},"alerted":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]},{"nullable":true}]},"blocking":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string","nullable":true}},"required":["id","scope","scopeId","scopeName","meter","limit","mode","alerts","coverage","used","pct","state","alerted","blocking","updatedAt","updatedByName"]}},"cells":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","enum":["app","automation","member","agent_token"]},"meter":{"type":"string","enum":["runs","ai_credits"]},"coverage":{"type":"string","enum":["enforced","tracked"]},"stops":{"type":"string","enum":["run_start","build_start","nothing_yet"]}},"required":["scope","meter","coverage","stops"]}},"targets":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","enum":["app","automation","member","agent_token"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"detail":{"type":"string","nullable":true}},"required":["scope","id","name","detail"]}},"maxBudgets":{"type":"integer","minimum":0,"exclusiveMinimum":true},"canChange":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","period","budgets","cells","targets","maxBudgets","canChange","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Set the budget on an app, automation, agent token or member (admins; creates or changes it)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["app","automation","member","agent_token"]},"scopeId":{"type":"string","minLength":1,"maxLength":128},"meter":{"type":"string","enum":["runs","ai_credits"]},"limit":{"type":"integer","minimum":0,"maximum":1000000000},"mode":{"type":"string","enum":["soft","hard"]},"alerts":{"type":"array","items":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]}]},"maxItems":4}},"required":["scope","scopeId","meter","limit","mode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","enum":["app","automation","member","agent_token"]},"scopeId":{"type":"string","minLength":1},"scopeName":{"type":"string","nullable":true},"meter":{"type":"string","enum":["runs","ai_credits"]},"limit":{"type":"integer","minimum":0},"mode":{"type":"string","enum":["soft","hard"]},"alerts":{"type":"array","items":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]}]}},"coverage":{"type":"string","enum":["enforced","tracked"]},"used":{"type":"number","nullable":true,"minimum":0},"pct":{"type":"number","nullable":true,"minimum":0,"maximum":1000},"state":{"type":"string","nullable":true,"enum":["ok","near","reached",null]},"alerted":{"anyOf":[{"type":"number","enum":[50]},{"type":"number","enum":[75]},{"type":"number","enum":[90]},{"type":"number","enum":[100]},{"nullable":true}]},"blocking":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string","nullable":true}},"required":["id","scope","scopeId","scopeName","meter","limit","mode","alerts","coverage","used","pct","state","alerted","blocking","updatedAt","updatedByName"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/budgets/{budgetId}":{"delete":{"summary":"Remove a budget (admins)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"budgetId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]}},"required":["removed"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/capguard":{"get":{"summary":"What the spending cap holds right now, what waits, and what is asleep","tags":["capguard"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"asOf":{"type":"string","format":"date-time"},"hardCap":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["requests","runs","ai_credits"]},"stops":{"type":"string","enum":["apps","runs","builds"]},"used":{"type":"number","minimum":0},"limit":{"type":"number","minimum":0},"graceLimit":{"type":"number","minimum":0},"remaining":{"type":"number","minimum":0},"pct":{"type":"number","minimum":0,"maximum":1000},"level":{"type":"string","enum":["ok","warn","held","off"]}},"required":["kind","stops","used","limit","graceLimit","remaining","pct","level"]}},"holds":{"type":"object","properties":{"apps":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"resumesAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","resumesAt"]},"runs":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"resumesAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","resumesAt"]},"builds":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"resumesAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","resumesAt"]}},"required":["apps","runs","builds"]},"runs":{"type":"object","properties":{"waiting":{"type":"integer","minimum":0},"oldestAt":{"type":"string","nullable":true,"format":"date-time"},"dropsAt":{"type":"string","nullable":true,"format":"date-time"},"droppedLastWeek":{"type":"integer","minimum":0},"folded":{"type":"integer","minimum":0}},"required":["waiting","oldestAt","dropsAt","droppedLastWeek","folded"]},"sleepingApps":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"reason":{"type":"string","enum":["cap","daily_cap","attack"]},"until":{"type":"string","nullable":true,"format":"date-time"}},"required":["appId","name","reason","until"]}},"enforcedWithinSeconds":{"type":"integer","minimum":1},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["workspaceId","asOf","hardCap","units","holds","runs","sleepingApps","enforcedWithinSeconds","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/shield":{"get":{"summary":"An app's limits against floods and its traffic over the last week","tags":["capguard"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"dailyCap":{"type":"integer","nullable":true,"minimum":100,"maximum":1000000000},"perVisitorPerMin":{"type":"integer","minimum":10,"maximum":6000},"perAppPerMin":{"type":"integer","minimum":60,"maximum":120000},"blockCrawlers":{"type":"boolean"},"sleepUnderAttack":{"type":"boolean"}},"required":["dailyCap","perVisitorPerMin","perAppPerMin","blockCrawlers","sleepUnderAttack"]},"isDefault":{"type":"boolean"},"suggestedDailyCap":{"type":"integer","minimum":100},"asleep":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","enum":["cap","daily_cap","attack"]},"until":{"type":"string","nullable":true,"format":"date-time"}},"required":["reason","until"]},"today":{"type":"object","properties":{"day":{"type":"string","format":"date"},"forwarded":{"type":"integer","minimum":0},"throttled":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"asleep":{"type":"integer","minimum":0},"dailyCapped":{"type":"integer","minimum":0}},"required":["day","forwarded","throttled","blocked","asleep","dailyCapped"]},"last7":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"forwarded":{"type":"integer","minimum":0},"throttled":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"asleep":{"type":"integer","minimum":0},"dailyCapped":{"type":"integer","minimum":0}},"required":["day","forwarded","throttled","blocked","asleep","dailyCapped"]},"maxItems":14},"canChange":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["appId","settings","isDefault","suggestedDailyCap","asleep","today","last7","canChange","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Change an app's limits, or wake it after a flood (workspace admins)","tags":["capguard"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"dailyCap":{"type":"integer","nullable":true,"minimum":100,"maximum":1000000000},"perVisitorPerMin":{"type":"integer","minimum":10,"maximum":6000},"perAppPerMin":{"type":"integer","minimum":60,"maximum":120000},"blockCrawlers":{"type":"boolean"},"sleepUnderAttack":{"type":"boolean"}},"additionalProperties":false},"wake":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"settings":{"type":"object","properties":{"dailyCap":{"type":"integer","nullable":true,"minimum":100,"maximum":1000000000},"perVisitorPerMin":{"type":"integer","minimum":10,"maximum":6000},"perAppPerMin":{"type":"integer","minimum":60,"maximum":120000},"blockCrawlers":{"type":"boolean"},"sleepUnderAttack":{"type":"boolean"}},"required":["dailyCap","perVisitorPerMin","perAppPerMin","blockCrawlers","sleepUnderAttack"]},"isDefault":{"type":"boolean"},"suggestedDailyCap":{"type":"integer","minimum":100},"asleep":{"type":"object","nullable":true,"properties":{"reason":{"type":"string","enum":["cap","daily_cap","attack"]},"until":{"type":"string","nullable":true,"format":"date-time"}},"required":["reason","until"]},"today":{"type":"object","properties":{"day":{"type":"string","format":"date"},"forwarded":{"type":"integer","minimum":0},"throttled":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"asleep":{"type":"integer","minimum":0},"dailyCapped":{"type":"integer","minimum":0}},"required":["day","forwarded","throttled","blocked","asleep","dailyCapped"]},"last7":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date"},"forwarded":{"type":"integer","minimum":0},"throttled":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"asleep":{"type":"integer","minimum":0},"dailyCapped":{"type":"integer","minimum":0}},"required":["day","forwarded","throttled","blocked","asleep","dailyCapped"]},"maxItems":14},"canChange":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string","minLength":1}}},"required":["appId","settings","isDefault","suggestedDailyCap","asleep","today","last7","canChange","notes"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/builder":{"get":{"summary":"The AI builder: its state, this month’s spend and the ledger (admins)","tags":["builder"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["on","paused","workspace_budget","platform_budget","kill_switch","profile","not_enabled"]},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"resetsAt":{"type":"string","format":"date-time"},"spentUsd":{"type":"number","minimum":0},"capUsd":{"type":"number","minimum":0},"defaultCapUsd":{"type":"number","minimum":0},"perBuildCapUsd":{"type":"number","minimum":0},"ownCap":{"type":"boolean"},"paused":{"type":"boolean"},"operations":{"type":"integer","minimum":0},"ledger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["plan","build","edit-plan","edit"]},"userId":{"type":"string","nullable":true},"userName":{"type":"string","nullable":true},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"model":{"type":"string"},"calls":{"type":"integer","minimum":1},"tokens":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"cacheWrite":{"type":"integer","minimum":0},"cacheRead":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0}},"required":["input","cacheWrite","cacheRead","output"]},"costUsd":{"type":"number","minimum":0},"capReached":{"type":"boolean"}},"required":["id","at","kind","userId","userName","appId","appName","model","calls","tokens","costUsd","capReached"]},"maxItems":100},"ledgerTruncated":{"type":"boolean"}},"required":["state","month","resetsAt","spentUsd","capUsd","defaultCapUsd","perBuildCapUsd","ownCap","paused","operations","ledger","ledgerTruncated"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Pause the AI builder, or lower the workspace’s monthly budget (admins)","tags":["builder"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"},"monthlyCapUsd":{"type":"number","nullable":true,"minimum":0,"maximum":1000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["on","paused","workspace_budget","platform_budget","kill_switch","profile","not_enabled"]},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"resetsAt":{"type":"string","format":"date-time"},"spentUsd":{"type":"number","minimum":0},"capUsd":{"type":"number","minimum":0},"defaultCapUsd":{"type":"number","minimum":0},"perBuildCapUsd":{"type":"number","minimum":0},"ownCap":{"type":"boolean"},"paused":{"type":"boolean"},"operations":{"type":"integer","minimum":0},"ledger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["plan","build","edit-plan","edit"]},"userId":{"type":"string","nullable":true},"userName":{"type":"string","nullable":true},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"model":{"type":"string"},"calls":{"type":"integer","minimum":1},"tokens":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"cacheWrite":{"type":"integer","minimum":0},"cacheRead":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0}},"required":["input","cacheWrite","cacheRead","output"]},"costUsd":{"type":"number","minimum":0},"capReached":{"type":"boolean"}},"required":["id","at","kind","userId","userName","appId","appName","model","calls","tokens","costUsd","capReached"]},"maxItems":100},"ledgerTruncated":{"type":"boolean"}},"required":["state","month","resetsAt","spentUsd","capUsd","defaultCapUsd","perBuildCapUsd","ownCap","paused","operations","ledger","ledgerTruncated"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/audit":{"get":{"summary":"The audit log, newest first: ids and metadata only (workspace admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","maxLength":64,"pattern":"^[a-z]+(?:\\.[a-z_]+)*(?:\\.\\*)?$"},"required":false,"name":"action","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"appId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time"},"actor":{"type":"object","properties":{"kind":{"type":"string","enum":["user","system","gate","app","builder","mcp","guest"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"action":{"type":"string","minLength":1,"maxLength":64},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["workspace","app","version","connector","run","share","approval","user"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"data":{"type":"object","additionalProperties":{"nullable":true}},"prevHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["seq","at","actor","action","target","data","prevHash","hash"]}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"audit.list"}}},"/v1/workspaces/{ws}/audit/verify":{"get":{"summary":"Recompute this workspace's audit chain now (workspace admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"count":{"type":"integer","minimum":0},"headPrefix":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{12}$"},"checkedAt":{"type":"string","format":"date-time"},"broken":{"type":"object","nullable":true,"properties":{"seq":{"type":"integer","minimum":0},"reason":{"type":"string","enum":["seq-gap","prev-hash","hash","invalid-row","head"]}},"required":["seq","reason"]},"checkpoint":{"type":"object","properties":{"state":{"type":"string","enum":["ok","none","not_configured","failed"]},"total":{"type":"integer","minimum":0},"last":{"type":"object","nullable":true,"properties":{"seq":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time"},"keyId":{"type":"string","pattern":"^[0-9a-f]{16}$"},"hashPrefix":{"type":"string","pattern":"^[0-9a-f]{12}$"},"anchored":{"type":"boolean"}},"required":["seq","at","keyId","hashPrefix"]},"failure":{"type":"object","nullable":true,"properties":{"seq":{"type":"integer","minimum":1},"reason":{"type":"string","enum":["signature","unknown_key","hash_mismatch","tail_dropped"]}},"required":["seq","reason"]}},"required":["state","total","last","failure"]}},"required":["ok","count","headPrefix","checkedAt","broken"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"audit.verify"}}},"/v1/workspaces/{ws}/security/egress":{"get":{"summary":"What each app may reach, and the calls the gate refused (workspace admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"windowDays":{"type":"integer","minimum":1},"apps":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"name":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"string","minLength":1}},"scope":{"type":"string","nullable":true}},"required":["id","name","actions","scope"]}},"extraDomains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3},"reason":{"type":"string","minLength":1}},"required":["domain","reason"]}},"blocked":{"type":"integer","minimum":0},"lastBlockedAt":{"type":"string","nullable":true,"format":"date-time"},"lastBlockedHost":{"type":"string","nullable":true}},"required":["appId","name","status","category","connectors","extraDomains","blocked","lastBlockedAt","lastBlockedHost"]}}},"required":["workspaceId","windowDays","apps"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/audit/checkpoints":{"get":{"summary":"Signed daily checkpoints of the audit chain, and the key that checks them (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":30},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"keyId":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"publicKey":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{64}$"},"keySource":{"type":"string","nullable":true,"enum":["dedicated","derived","dev",null]},"vault":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"at":{"type":"string","format":"date-time"},"keyId":{"type":"string","pattern":"^[0-9a-f]{16}$"},"signature":{"type":"string","pattern":"^[A-Za-z0-9_-]{86}$"},"anchoredAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["workspaceId","seq","hash","at","keyId","signature"]}}},"required":["configured","keyId","publicKey","keySource","vault","items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Sign a checkpoint of the chain now, if it moved since the last one (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"keyId":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"publicKey":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{64}$"},"keySource":{"type":"string","nullable":true,"enum":["dedicated","derived","dev",null]},"vault":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"at":{"type":"string","format":"date-time"},"keyId":{"type":"string","pattern":"^[0-9a-f]{16}$"},"signature":{"type":"string","pattern":"^[A-Za-z0-9_-]{86}$"},"anchoredAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["workspaceId","seq","hash","at","keyId","signature"]}}},"required":["configured","keyId","publicKey","keySource","vault","items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/audit/export":{"get":{"summary":"The audit chain as JSON Lines, oldest first, up to 10,000 events (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"fromSeq","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":5000},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"JSON Lines (served as application/x-ndjson): one event per line. `x-qaldy-export-next` names the next `fromSeq`, if any.","content":{"text/plain":{"schema":{"type":"string"}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/audit/sinks":{"get":{"summary":"Where this workspace streams its audit log (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["webhook","s3"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","paused","failing"]},"preview":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","nullable":true,"format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true,"enum":["rejected","unreachable","timeout","private_address","dns_failed","tls","credentials_unavailable","role_denied","bucket_denied","bad_config",null]},"failures":{"type":"integer","minimum":0},"deliveredSeq":{"type":"integer","minimum":0},"behind":{"type":"integer","minimum":0},"externalId":{"type":"string","nullable":true}},"required":["id","kind","name","target","status","preview","createdAt","lastOkAt","lastAttemptAt","lastError","failures","deliveredSeq","behind","externalId"]}},"s3Available":{"type":"boolean"},"s3Principal":{"type":"string","nullable":true},"max":{"type":"integer","minimum":1}},"required":["items","s3Available","s3Principal","max"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"post":{"summary":"Stream the audit log to an HTTPS webhook or an S3 bucket (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]},"name":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"string","enum":["beginning","now"],"default":"beginning"},"url":{"type":"string","maxLength":600}},"required":["kind","name","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["s3"]},"name":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"string","enum":["beginning","now"],"default":"beginning"},"bucket":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$"},"region":{"type":"string","pattern":"^[a-z]{2}(-[a-z]+)+-\\d$"},"prefix":{"type":"string","pattern":"^[A-Za-z0-9._\\-/]{0,200}$","default":""},"roleArn":{"type":"string","pattern":"^arn:aws:iam::\\d{12}:role\\/[A-Za-z0-9+=,.@_/-]{1,512}$"}},"required":["kind","name","bucket","region","roleArn"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sink":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["webhook","s3"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","paused","failing"]},"preview":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","nullable":true,"format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true,"enum":["rejected","unreachable","timeout","private_address","dns_failed","tls","credentials_unavailable","role_denied","bucket_denied","bad_config",null]},"failures":{"type":"integer","minimum":0},"deliveredSeq":{"type":"integer","minimum":0},"behind":{"type":"integer","minimum":0},"externalId":{"type":"string","nullable":true}},"required":["id","kind","name","target","status","preview","createdAt","lastOkAt","lastAttemptAt","lastError","failures","deliveredSeq","behind","externalId"]},"signingSecret":{"type":"string","nullable":true}},"required":["sink","signingSecret"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/audit/sinks/{id}":{"patch":{"summary":"Rename, pause or resume a destination (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"state":{"type":"string","enum":["active","paused"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["webhook","s3"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","paused","failing"]},"preview":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","nullable":true,"format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true,"enum":["rejected","unreachable","timeout","private_address","dns_failed","tls","credentials_unavailable","role_denied","bucket_denied","bad_config",null]},"failures":{"type":"integer","minimum":0},"deliveredSeq":{"type":"integer","minimum":0},"behind":{"type":"integer","minimum":0},"externalId":{"type":"string","nullable":true}},"required":["id","kind","name","target","status","preview","createdAt","lastOkAt","lastAttemptAt","lastError","failures","deliveredSeq","behind","externalId"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Stop streaming to a destination and forget it (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/audit/sinks/{id}/test":{"post":{"summary":"Send one test message to a destination (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string","nullable":true,"enum":["rejected","unreachable","timeout","private_address","dns_failed","tls","credentials_unavailable","role_denied","bucket_denied","bad_config",null]},"sink":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["webhook","s3"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","paused","failing"]},"preview":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","nullable":true,"format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true,"enum":["rejected","unreachable","timeout","private_address","dns_failed","tls","credentials_unavailable","role_denied","bucket_denied","bad_config",null]},"failures":{"type":"integer","minimum":0},"deliveredSeq":{"type":"integer","minimum":0},"behind":{"type":"integer","minimum":0},"externalId":{"type":"string","nullable":true}},"required":["id","kind","name","target","status","preview","createdAt","lastOkAt","lastAttemptAt","lastError","failures","deliveredSeq","behind","externalId"]}},"required":["ok","error","sink"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/security/keys":{"get":{"summary":"Sealed keys: when stored, rotated and due to expire, never the keys (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"sealedTo":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"storedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"expiry":{"type":"string","enum":["none","ok","soon","expired"]},"daysLeft":{"type":"integer","nullable":true},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotation":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checkedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","reason","checkedAt"]}},"required":["connectionId","connectorId","displayName","sealedTo","storedAt","rotatedAt","expiresAt","expiry","daysLeft","revokedAt","rotation"]}}},"required":["items"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}/expiry":{"put":{"summary":"Record the day a connection’s key stops working, or clear it (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["expiresAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"sealedTo":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"storedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"expiry":{"type":"string","enum":["none","ok","soon","expired"]},"daysLeft":{"type":"integer","nullable":true},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotation":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checkedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","reason","checkedAt"]}},"required":["connectionId","connectorId","displayName","sealedTo","storedAt","rotatedAt","expiresAt","expiry","daysLeft","revokedAt","rotation"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}/rotation":{"post":{"summary":"Replace a connection’s key in place: the old one serves until the new one works (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","minLength":1,"maxLength":4096},"expiresAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["secret"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["rotated","pending","rejected"]},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checked":{"type":"string","enum":["gate","format","none"]},"key":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"sealedTo":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"storedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"expiry":{"type":"string","enum":["none","ok","soon","expired"]},"daysLeft":{"type":"integer","nullable":true},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotation":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checkedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","reason","checkedAt"]}},"required":["connectionId","connectorId","displayName","sealedTo","storedAt","rotatedAt","expiresAt","expiry","daysLeft","revokedAt","rotation"]}},"required":["outcome","reason","checked","key"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Throw the waiting key away; the old one stays (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"sealedTo":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"storedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"expiry":{"type":"string","enum":["none","ok","soon","expired"]},"daysLeft":{"type":"integer","nullable":true},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotation":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checkedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","reason","checkedAt"]}},"required":["connectionId","connectorId","displayName","sealedTo","storedAt","rotatedAt","expiresAt","expiry","daysLeft","revokedAt","rotation"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}/rotation/check":{"post":{"summary":"Try the waiting key again (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["rotated","pending","rejected"]},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checked":{"type":"string","enum":["gate","format","none"]},"key":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"sealedTo":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"storedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"expiry":{"type":"string","enum":["none","ok","soon","expired"]},"daysLeft":{"type":"integer","nullable":true},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotation":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checkedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","reason","checkedAt"]}},"required":["connectionId","connectorId","displayName","sealedTo","storedAt","rotatedAt","expiresAt","expiry","daysLeft","revokedAt","rotation"]}},"required":["outcome","reason","checked","key"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/connections/{id}/rotation/switch":{"post":{"summary":"Use the waiting key without a successful check; the audit log says so (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["rotated","pending","rejected"]},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checked":{"type":"string","enum":["gate","format","none"]},"key":{"type":"object","properties":{"connectionId":{"type":"string","minLength":1},"connectorId":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"displayName":{"type":"string","minLength":1},"sealedTo":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{16}$"},"storedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"expiry":{"type":"string","enum":["none","ok","soon","expired"]},"daysLeft":{"type":"integer","nullable":true},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotation":{"type":"object","nullable":true,"properties":{"since":{"type":"string","format":"date-time"},"reason":{"type":"string","nullable":true,"enum":["auth_rejected","upstream_error","upstream_failed","dns_failed","private_address","secret_unavailable","not_connected","gate_unreachable","no_probe","invalid_config","query_auth_removed",null]},"checkedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["since","reason","checkedAt"]}},"required":["connectionId","connectorId","displayName","sealedTo","storedAt","rotatedAt","expiresAt","expiry","daysLeft","revokedAt","rotation"]}},"required":["outcome","reason","checked","key"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/security/panic":{"post":{"summary":"Revoke every token, session, backend key, connection key and webhook secret at once (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","minLength":1,"maxLength":80},"reason":{"type":"string","maxLength":200}},"required":["confirm"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"revoked":{"type":"object","properties":{"accessTokens":{"type":"integer","minimum":0},"backendKeys":{"type":"integer","minimum":0},"sessions":{"type":"integer","minimum":0},"connectorKeys":{"type":"integer","minimum":0},"webhookSecrets":{"type":"integer","minimum":0}},"required":["accessTokens","backendKeys","sessions","connectorKeys","webhookSecrets"]},"others":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"default":{}},"connections":{"type":"array","items":{"type":"string"}}},"required":["at","revoked","connections"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/flow":{"get":{"summary":"The information-flow policy, what can be labelled and what the gate decided (admins)","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"policy":{"type":"object","properties":{"sources":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["table"]},"appId":{"type":"string","minLength":1,"maxLength":128},"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","enum":["pii","financial","secret"]},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["kind","appId","table","label"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"connection":{"type":"string","pattern":"^(?:sheets|http:conn_[a-z0-9]{6,40})$"},"label":{"type":"string","enum":["pii","financial","secret"]}},"required":["kind","connection","label"]}]},"maxItems":200},"allow":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["pii","financial","secret"]},"to":{"type":"string","maxLength":300}},"required":["label","to"]},"maxItems":300},"limits":{"type":"object","properties":{"requestBytes":{"type":"integer","minimum":256,"maximum":262144},"runBytes":{"type":"integer","minimum":1024,"maximum":4194304}},"required":["requestBytes","runBytes"]},"revision":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["sources","allow","limits","revision"]},"apps":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]},"tables":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string"},"access":{"type":"string","enum":["read","write"]},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["table","access","labels","columns"]}},"held":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}}},"required":["appId","name","status","tables","held"]}},"connections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(?:sheets|http:conn_[a-z0-9]{6,40})$"},"name":{"type":"string","minLength":1,"maxLength":120},"provider":{"type":"string","enum":["sheets","http"]},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"apps":{"type":"integer","minimum":0}},"required":["key","name","provider","labels","apps"]}},"destinations":{"type":"array","items":{"type":"object","properties":{"destination":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["connector","http","host","ai"]},"name":{"type":"string","minLength":1,"maxLength":253},"action":{"type":"string","nullable":true,"maxLength":64},"apps":{"type":"integer","minimum":1}},"required":["destination","kind","name","action","apps"]}},"decisions":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"decision":{"type":"string","enum":["blocked","allowed"]},"appId":{"type":"string","minLength":1},"appName":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"destination":{"type":"string","maxLength":300},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","decision","appId","appName","runId","labels","destination","reason"]}},"blocked":{"type":"integer","minimum":0},"windowDays":{"type":"integer","minimum":1}},"required":["workspaceId","policy","apps","connections","destinations","decisions","blocked","windowDays"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"put":{"summary":"Replace the information-flow policy (admins). The revision you started from must still be current","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["table"]},"appId":{"type":"string","minLength":1,"maxLength":128},"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","enum":["pii","financial","secret"]},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["kind","appId","table","label"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"connection":{"type":"string","pattern":"^(?:sheets|http:conn_[a-z0-9]{6,40})$"},"label":{"type":"string","enum":["pii","financial","secret"]}},"required":["kind","connection","label"]}]},"maxItems":200},"allow":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["pii","financial","secret"]},"to":{"type":"string","maxLength":300}},"required":["label","to"]},"maxItems":300},"limits":{"type":"object","properties":{"requestBytes":{"type":"integer","minimum":256,"maximum":262144},"runBytes":{"type":"integer","minimum":1024,"maximum":4194304}},"required":["requestBytes","runBytes"]},"revision":{"type":"integer","minimum":0}},"required":["sources","allow","limits","revision"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"policy":{"type":"object","properties":{"sources":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["table"]},"appId":{"type":"string","minLength":1,"maxLength":128},"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"label":{"type":"string","enum":["pii","financial","secret"]},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["kind","appId","table","label"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connection"]},"connection":{"type":"string","pattern":"^(?:sheets|http:conn_[a-z0-9]{6,40})$"},"label":{"type":"string","enum":["pii","financial","secret"]}},"required":["kind","connection","label"]}]},"maxItems":200},"allow":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["pii","financial","secret"]},"to":{"type":"string","maxLength":300}},"required":["label","to"]},"maxItems":300},"limits":{"type":"object","properties":{"requestBytes":{"type":"integer","minimum":256,"maximum":262144},"runBytes":{"type":"integer","minimum":1024,"maximum":4194304}},"required":["requestBytes","runBytes"]},"revision":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["sources","allow","limits","revision"]},"apps":{"type":"array","items":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]},"tables":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string"},"access":{"type":"string","enum":["read","write"]},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["table","access","labels","columns"]}},"held":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}}},"required":["appId","name","status","tables","held"]}},"connections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(?:sheets|http:conn_[a-z0-9]{6,40})$"},"name":{"type":"string","minLength":1,"maxLength":120},"provider":{"type":"string","enum":["sheets","http"]},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"apps":{"type":"integer","minimum":0}},"required":["key","name","provider","labels","apps"]}},"destinations":{"type":"array","items":{"type":"object","properties":{"destination":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["connector","http","host","ai"]},"name":{"type":"string","minLength":1,"maxLength":253},"action":{"type":"string","nullable":true,"maxLength":64},"apps":{"type":"integer","minimum":1}},"required":["destination","kind","name","action","apps"]}},"decisions":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"decision":{"type":"string","enum":["blocked","allowed"]},"appId":{"type":"string","minLength":1},"appName":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"destination":{"type":"string","maxLength":300},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","decision","appId","appName","runId","labels","destination","reason"]}},"blocked":{"type":"integer","minimum":0},"windowDays":{"type":"integer","minimum":1}},"required":["workspaceId","policy","apps","connections","destinations","decisions","blocked","windowDays"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/flow":{"get":{"summary":"One app's data flow: what it reads, where it can send, and the policy in words","tags":["security"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","building","healthy","warning","failing","paused"]},"active":{"type":"boolean"},"held":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"sources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["table","connection"]},"key":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":120},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"columns":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,62}$"},"maxItems":32}},"required":["kind","key","name","labels","columns"]}},"sinks":{"type":"array","items":{"type":"object","properties":{"destination":{"type":"string","maxLength":300},"kind":{"type":"string","enum":["connector","http","host","ai"]},"name":{"type":"string","minLength":1,"maxLength":253},"action":{"type":"string","nullable":true,"maxLength":64},"scope":{"type":"string","nullable":true,"maxLength":100},"reason":{"type":"string","nullable":true,"maxLength":200},"verdicts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["pii","financial","secret"]},"allowed":{"type":"boolean"},"way":{"type":"string","nullable":true,"enum":["rule","same-label",null]}},"required":["label","allowed","way"]}}},"required":["destination","kind","name","action","scope","reason","verdicts"]}},"limits":{"type":"object","properties":{"requestBytes":{"type":"integer","minimum":256,"maximum":262144},"runBytes":{"type":"integer","minimum":1024,"maximum":4194304}},"required":["requestBytes","runBytes"]},"decisions":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"decision":{"type":"string","enum":["blocked","allowed"]},"appId":{"type":"string","minLength":1},"appName":{"type":"string","nullable":true},"runId":{"type":"string","nullable":true},"labels":{"type":"array","items":{"type":"string","enum":["pii","financial","secret"]}},"destination":{"type":"string","maxLength":300},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["at","decision","appId","appName","runId","labels","destination","reason"]}},"blocked":{"type":"integer","minimum":0},"windowDays":{"type":"integer","minimum":1}},"required":["appId","name","status","active","held","sources","sinks","limits","decisions","blocked","windowDays"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/apps/{id}/versions":{"get":{"summary":"An app’s versions, newest first, and its rollbacks","tags":["versions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"currentVersionId":{"type":"string","nullable":true},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","minLength":1},"createdByName":{"type":"string","nullable":true},"bundleHash":{"type":"string","minLength":1},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"kind":{"type":"string","enum":["build","edit","seed"]},"summary":{"type":"string","minLength":1,"maxLength":300},"instruction":{"type":"string","nullable":true},"baseVersionId":{"type":"string","nullable":true},"isCurrent":{"type":"boolean"},"runnable":{"type":"boolean"},"builder":{"type":"string","nullable":true,"enum":["claude","offline",null]}},"required":["id","appId","number","createdAt","createdBy","createdByName","bundleHash","trustScore","trustBand","kind","summary","instruction","baseVersionId","isCurrent","runnable","builder"]}},"rollbacks":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"byName":{"type":"string","nullable":true},"fromVersionId":{"type":"string","minLength":1},"toVersionId":{"type":"string","minLength":1}},"required":["at","byName","fromVersionId","toVersionId"]}},"canEdit":{"type":"boolean"}},"required":["appId","currentVersionId","versions","rollbacks","canEdit"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"versions.list"}}},"/v1/apps/{id}/versions/compare":{"get":{"summary":"What one version may do that another could not, in permission sentences","tags":["versions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"from","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","minLength":1},"createdByName":{"type":"string","nullable":true},"bundleHash":{"type":"string","minLength":1},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"kind":{"type":"string","enum":["build","edit","seed"]},"summary":{"type":"string","minLength":1,"maxLength":300},"instruction":{"type":"string","nullable":true},"baseVersionId":{"type":"string","nullable":true},"isCurrent":{"type":"boolean"},"runnable":{"type":"boolean"},"builder":{"type":"string","nullable":true,"enum":["claude","offline",null]}},"required":["id","appId","number","createdAt","createdBy","createdByName","bundleHash","trustScore","trustBand","kind","summary","instruction","baseVersionId","isCurrent","runnable","builder"]},"to":{"type":"object","properties":{"id":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"number":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","minLength":1},"createdByName":{"type":"string","nullable":true},"bundleHash":{"type":"string","minLength":1},"trustScore":{"type":"integer","minimum":0,"maximum":100},"trustBand":{"type":"string","enum":["pass","review","fail"]},"kind":{"type":"string","enum":["build","edit","seed"]},"summary":{"type":"string","minLength":1,"maxLength":300},"instruction":{"type":"string","nullable":true},"baseVersionId":{"type":"string","nullable":true},"isCurrent":{"type":"boolean"},"runnable":{"type":"boolean"},"builder":{"type":"string","nullable":true,"enum":["claude","offline",null]}},"required":["id","appId","number","createdAt","createdBy","createdByName","bundleHash","trustScore","trustBand","kind","summary","instruction","baseVersionId","isCurrent","runnable","builder"]},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]},"trust":{"type":"object","properties":{"from":{"type":"integer","minimum":0},"to":{"type":"integer","minimum":0},"delta":{"type":"integer"}},"required":["from","to","delta"]},"codeChanged":{"type":"boolean"},"newConnectors":{"type":"array","items":{"type":"string"}}},"required":["from","to","diff","trust","codeChanged","newConnectors"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"versions.compare"}}},"/v1/apps/{id}/versions/{versionId}/rollback":{"post":{"summary":"Go back to an older version: one pointer move, no rebuild","tags":["versions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"versionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectCurrentVersionId":{"type":"string","minLength":1}},"required":["expectCurrentVersionId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"fromVersionId":{"type":"string","minLength":1},"toVersionId":{"type":"string","minLength":1},"trustScore":{"type":"integer","minimum":0,"maximum":100},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]}},"required":["appId","fromVersionId","toVersionId","trustScore","diff"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"versions.rollback"}}},"/v1/apps/{id}/changes":{"post":{"summary":"Plan a change to an app from a sentence: the permission diff, nothing built yet","tags":["versions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","minLength":4,"maxLength":2000}},"required":["instruction"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"baseVersionId":{"type":"string","minLength":1},"instruction":{"type":"string"},"summary":{"type":"string","minLength":1,"maxLength":300},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]},"steps":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"rebuildsCode":{"type":"boolean"},"builder":{"type":"string","enum":["claude","offline"]},"model":{"type":"string","nullable":true},"templateId":{"type":"string","nullable":true},"notes":{"type":"array","items":{"type":"string","minLength":1},"maxItems":8},"adminApproval":{"type":"object","properties":{"required":{"type":"boolean"},"connectors":{"type":"array","items":{"type":"string"}}},"required":["required","connectors"]},"needsConsole":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["changeId","appId","appName","baseVersionId","instruction","summary","manifest","diff","steps","rebuildsCode","builder","model","templateId","notes","adminApproval","needsConsole","expiresAt"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"changes.plan"}}},"/v1/changes/{changeId}/approve":{"post":{"summary":"Approve a planned change: the new version is written and the app moves to it","tags":["versions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"changeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]}},"required":["manifest"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"state":{"type":"string","enum":["planned","building","live","failed","expired"]},"message":{"type":"string","nullable":true},"versionId":{"type":"string","nullable":true},"trustScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"stage":{"type":"string","nullable":true},"plan":{"type":"object","nullable":true,"properties":{"changeId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"baseVersionId":{"type":"string","minLength":1},"instruction":{"type":"string"},"summary":{"type":"string","minLength":1,"maxLength":300},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]},"steps":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"rebuildsCode":{"type":"boolean"},"builder":{"type":"string","enum":["claude","offline"]},"model":{"type":"string","nullable":true},"templateId":{"type":"string","nullable":true},"notes":{"type":"array","items":{"type":"string","minLength":1},"maxItems":8},"adminApproval":{"type":"object","properties":{"required":{"type":"boolean"},"connectors":{"type":"array","items":{"type":"string"}}},"required":["required","connectors"]},"needsConsole":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["changeId","appId","appName","baseVersionId","instruction","summary","manifest","diff","steps","rebuildsCode","builder","model","templateId","notes","adminApproval","needsConsole","expiresAt"]}},"required":["changeId","appId","state","message","versionId","trustScore","stage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"write","name":"changes.approve"}}},"/v1/changes/{changeId}":{"get":{"summary":"Where a change is: planned, building, live or failed","tags":["versions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"changeId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"changeId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"state":{"type":"string","enum":["planned","building","live","failed","expired"]},"message":{"type":"string","nullable":true},"versionId":{"type":"string","nullable":true},"trustScore":{"type":"integer","nullable":true,"minimum":0,"maximum":100},"stage":{"type":"string","nullable":true},"plan":{"type":"object","nullable":true,"properties":{"changeId":{"type":"string","minLength":1},"appId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"baseVersionId":{"type":"string","minLength":1},"instruction":{"type":"string"},"summary":{"type":"string","minLength":1,"maxLength":300},"manifest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":60},"description":{"type":"string","minLength":4,"maxLength":280},"archetype":{"type":"string","enum":["kiosk","tower","warehouse","workshop","bank","townhall","clocktower","printhouse","postoffice","radiotower","datacenter","silo","lighthouse","market"]},"category":{"type":"string","enum":["interface","data","messaging","money","ai","time","people","growth"]},"permissions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":48,"pattern":"^[a-z][a-z0-9_]*$"},"access":{"type":"string","enum":["read","write"]}},"required":["table","access"]}},"connectors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"actions":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"scope":{"type":"string","maxLength":80}},"required":["id","actions"]}},"egress":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"reason":{"type":"string","minLength":8,"maxLength":200}},"required":["domain","reason"]}},"ai":{"type":"object","nullable":true,"properties":{"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0,"maximum":10000},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]*$"},"maxItems":8}},"required":["profile","monthlyBudgetUsd"]}},"required":["data","connectors","egress","ai"]},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]},"minItems":1},"sharing":{"type":"object","properties":{"default":{"type":"string","enum":["private","team","workspace"]}},"required":["default"]},"roi":{"type":"object","properties":{"manualMinutesPerRun":{"type":"number","minimum":0,"maximum":1440}},"required":["manualMinutesPerRun"]}},"required":["name","description","archetype","category","permissions","triggers","sharing","roi"]},"diff":{"type":"object","properties":{"gains":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"losses":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["data"]},"access":{"type":"string","enum":["read","write"]},"tables":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["kind","access","tables"]},{"type":"object","properties":{"kind":{"type":"string","enum":["connector"]},"connector":{"type":"string","enum":["shop","stripe","gmail","telegram","sheets","slack","kaspi","1c","bitrix24","http","fake"]},"connectorName":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"verb":{"type":"string","minLength":1},"write":{"type":"boolean"},"scope":{"type":"string"}},"required":["kind","connector","connectorName","action","verb","write"]},{"type":"object","properties":{"kind":{"type":"string","enum":["egress"]},"domain":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["kind","domain","reason"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ai"]},"profile":{"type":"string","enum":["standard","private"]},"monthlyBudgetUsd":{"type":"number","minimum":0}},"required":["kind","profile","monthlyBudgetUsd"]},{"type":"object","properties":{"kind":{"type":"string","enum":["no-ai"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["internet-closed"]},"extraDomains":{"type":"integer","minimum":0}},"required":["kind","extraDomains"]}]}},"triggersAdded":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"triggersRemoved":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"cron":{"type":"string","pattern":"^(\\S+\\s+){4}\\S+$"}},"required":["type","cron"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["form"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"source":{"type":"string","minLength":1,"maxLength":64}},"required":["type","source"]}]}},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","description","minutesPerRun","sharing","archetype","category"]},"from":{"anyOf":[{"type":"string"},{"type":"number"}]},"to":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["field","from","to"]}}},"required":["gains","losses","triggersAdded","triggersRemoved","details"]},"steps":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"rebuildsCode":{"type":"boolean"},"builder":{"type":"string","enum":["claude","offline"]},"model":{"type":"string","nullable":true},"templateId":{"type":"string","nullable":true},"notes":{"type":"array","items":{"type":"string","minLength":1},"maxItems":8},"adminApproval":{"type":"object","properties":{"required":{"type":"boolean"},"connectors":{"type":"array","items":{"type":"string"}}},"required":["required","connectors"]},"needsConsole":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["changeId","appId","appName","baseVersionId","instruction","summary","manifest","diff","steps","rebuildsCode","builder","model","templateId","notes","adminApproval","needsConsole","expiresAt"]}},"required":["changeId","appId","state","message","versionId","trustScore","stage"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"changes.get"}}},"/v1/apps/{id}/logs":{"get":{"summary":"The last log lines of an app (its own output, runs and gate decisions)","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["debug","info","warn","error"]},"required":false,"name":"level","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"runId","in":"query"},{"schema":{"type":"integer","minimum":1},"required":false,"name":"before","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time"},"appId":{"type":"string","minLength":1},"runId":{"type":"string","nullable":true,"minLength":1},"level":{"type":"string","enum":["debug","info","warn","error"]},"source":{"type":"string","enum":["app","platform","gate"]},"message":{"type":"string","maxLength":2000}},"required":["id","at","appId","runId","level","source","message"]}},"hasMore":{"type":"boolean"},"keepDays":{"type":"integer","minimum":1}},"required":["lines","hasMore","keepDays"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"apps.logs"}}},"/v1/apps/{id}/metrics":{"get":{"summary":"Requests, errors, latency, CPU time and runs of an app, with the period before","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["24h","7d"],"default":"24h"},"required":false,"name":"range","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"appId":{"type":"string","minLength":1},"range":{"type":"string","enum":["24h","7d"]},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"bucketMs":{"type":"integer","minimum":60000},"buckets":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"p50Ms":{"type":"number","nullable":true,"minimum":0},"p95Ms":{"type":"number","nullable":true,"minimum":0},"cpuMs":{"type":"number","nullable":true,"minimum":0},"runs":{"type":"integer","minimum":0},"failedRuns":{"type":"integer","minimum":0}},"required":["at","requests","errors","p50Ms","p95Ms","cpuMs","runs","failedRuns"]}},"totals":{"type":"object","properties":{"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"errorRate":{"type":"number","nullable":true,"minimum":0,"maximum":1},"p50Ms":{"type":"number","nullable":true,"minimum":0},"p95Ms":{"type":"number","nullable":true,"minimum":0},"cpuMs":{"type":"number","nullable":true,"minimum":0},"runs":{"type":"integer","minimum":0},"failedRuns":{"type":"integer","minimum":0},"runP50Ms":{"type":"number","nullable":true,"minimum":0},"runP95Ms":{"type":"number","nullable":true,"minimum":0}},"required":["requests","errors","errorRate","p50Ms","p95Ms","cpuMs","runs","failedRuns","runP50Ms","runP95Ms"]},"previous":{"type":"object","properties":{"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"errorRate":{"type":"number","nullable":true,"minimum":0,"maximum":1},"p50Ms":{"type":"number","nullable":true,"minimum":0},"p95Ms":{"type":"number","nullable":true,"minimum":0},"cpuMs":{"type":"number","nullable":true,"minimum":0},"runs":{"type":"integer","minimum":0},"failedRuns":{"type":"integer","minimum":0},"runP50Ms":{"type":"number","nullable":true,"minimum":0},"runP95Ms":{"type":"number","nullable":true,"minimum":0}},"required":["requests","errors","errorRate","p50Ms","p95Ms","cpuMs","runs","failedRuns","runP50Ms","runP95Ms"]},"measured":{"type":"object","properties":{"requests":{"type":"boolean"},"cpu":{"type":"boolean"}},"required":["requests","cpu"]}},"required":["appId","range","from","to","bucketMs","buckets","totals","previous","measured"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":{"scope":"read","name":"apps.metrics"}}},"/v1/workspaces/{ws}/alerts":{"get":{"summary":"Alert rules, what is firing now and the latest history","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["error_rate"]},"appId":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"thresholdPct":{"type":"integer","minimum":1,"maximum":100},"windowMinutes":{"anyOf":[{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[360]},{"type":"number","enum":[1440]}]},"minEvents":{"type":"integer","minimum":3,"maximum":1000}},"required":["id","createdAt","enabled","channels","kind","appId","thresholdPct","windowMinutes","minEvents"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["quiet"]},"appId":{"type":"string","minLength":1,"maxLength":128},"hours":{"type":"integer","minimum":1,"maximum":168}},"required":["id","createdAt","enabled","channels","kind","appId","hours"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["budget"]},"thresholdPct":{"type":"integer","minimum":50,"maximum":100}},"required":["id","createdAt","enabled","channels","kind","thresholdPct"]}]}},"open":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"ruleId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["error_rate","quiet","budget","heartbeat"]},"state":{"type":"string","enum":["fired","resolved","test"]},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"title":{"type":"string","minLength":1,"maxLength":200},"detail":{"type":"string","maxLength":600},"deliveries":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["in_app","email","telegram"]},"ok":{"type":"boolean"},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["channel","ok","reason"]}}},"required":["id","at","ruleId","kind","state","appId","appName","title","detail","deliveries"]}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"ruleId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["error_rate","quiet","budget","heartbeat"]},"state":{"type":"string","enum":["fired","resolved","test"]},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"title":{"type":"string","minLength":1,"maxLength":200},"detail":{"type":"string","maxLength":600},"deliveries":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["in_app","email","telegram"]},"ok":{"type":"boolean"},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["channel","ok","reason"]}}},"required":["id","at","ruleId","kind","state","appId","appName","title","detail","deliveries"]}},"channels":{"type":"object","properties":{"telegram":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"connected":{"type":"boolean"}},"required":["id","name","connected"]}},"emailAvailable":{"type":"boolean"},"emailRecipients":{"type":"integer","minimum":0}},"required":["telegram","emailAvailable","emailRecipients"]},"apps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"maxRules":{"type":"integer","minimum":1}},"required":["rules","open","recent","channels","apps","maxRules"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/alerts/history":{"get":{"summary":"Alert history, newest first","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":30},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":80},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"ruleId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["error_rate","quiet","budget","heartbeat"]},"state":{"type":"string","enum":["fired","resolved","test"]},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"title":{"type":"string","minLength":1,"maxLength":200},"detail":{"type":"string","maxLength":600},"deliveries":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["in_app","email","telegram"]},"ok":{"type":"boolean"},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["channel","ok","reason"]}}},"required":["id","at","ruleId","kind","state","appId","appName","title","detail","deliveries"]}},"nextCursor":{"type":"string","nullable":true}},"required":["events","nextCursor"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/alerts/rules":{"post":{"summary":"Add an alert rule","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["error_rate"]},"appId":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"thresholdPct":{"type":"integer","minimum":1,"maximum":100},"windowMinutes":{"anyOf":[{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[360]},{"type":"number","enum":[1440]}]},"minEvents":{"type":"integer","minimum":3,"maximum":1000}},"required":["enabled","channels","kind","appId","thresholdPct","windowMinutes","minEvents"]},{"type":"object","properties":{"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["quiet"]},"appId":{"type":"string","minLength":1,"maxLength":128},"hours":{"type":"integer","minimum":1,"maximum":168}},"required":["enabled","channels","kind","appId","hours"]},{"type":"object","properties":{"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["budget"]},"thresholdPct":{"type":"integer","minimum":50,"maximum":100}},"required":["enabled","channels","kind","thresholdPct"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["error_rate"]},"appId":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"thresholdPct":{"type":"integer","minimum":1,"maximum":100},"windowMinutes":{"anyOf":[{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[360]},{"type":"number","enum":[1440]}]},"minEvents":{"type":"integer","minimum":3,"maximum":1000}},"required":["id","createdAt","enabled","channels","kind","appId","thresholdPct","windowMinutes","minEvents"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["quiet"]},"appId":{"type":"string","minLength":1,"maxLength":128},"hours":{"type":"integer","minimum":1,"maximum":168}},"required":["id","createdAt","enabled","channels","kind","appId","hours"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["budget"]},"thresholdPct":{"type":"integer","minimum":50,"maximum":100}},"required":["id","createdAt","enabled","channels","kind","thresholdPct"]}]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/alerts/rules/{id}":{"put":{"summary":"Replace an alert rule","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["error_rate"]},"appId":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"thresholdPct":{"type":"integer","minimum":1,"maximum":100},"windowMinutes":{"anyOf":[{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[360]},{"type":"number","enum":[1440]}]},"minEvents":{"type":"integer","minimum":3,"maximum":1000}},"required":["enabled","channels","kind","appId","thresholdPct","windowMinutes","minEvents"]},{"type":"object","properties":{"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["quiet"]},"appId":{"type":"string","minLength":1,"maxLength":128},"hours":{"type":"integer","minimum":1,"maximum":168}},"required":["enabled","channels","kind","appId","hours"]},{"type":"object","properties":{"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["budget"]},"thresholdPct":{"type":"integer","minimum":50,"maximum":100}},"required":["enabled","channels","kind","thresholdPct"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["error_rate"]},"appId":{"type":"string","nullable":true,"minLength":1,"maxLength":128},"thresholdPct":{"type":"integer","minimum":1,"maximum":100},"windowMinutes":{"anyOf":[{"type":"number","enum":[15]},{"type":"number","enum":[60]},{"type":"number","enum":[360]},{"type":"number","enum":[1440]}]},"minEvents":{"type":"integer","minimum":3,"maximum":1000}},"required":["id","createdAt","enabled","channels","kind","appId","thresholdPct","windowMinutes","minEvents"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["quiet"]},"appId":{"type":"string","minLength":1,"maxLength":128},"hours":{"type":"integer","minimum":1,"maximum":168}},"required":["id","createdAt","enabled","channels","kind","appId","hours"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"string","format":"date-time"},"enabled":{"type":"boolean"},"channels":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"array","items":{"type":"object","properties":{"connectorId":{"type":"string","minLength":1,"maxLength":128},"chatId":{"type":"string","pattern":"^(-?\\d{1,20}|@[A-Za-z][A-Za-z0-9_]{4,31})$"}},"required":["connectorId","chatId"]},"maxItems":2}},"required":["email","telegram"]},"kind":{"type":"string","enum":["budget"]},"thresholdPct":{"type":"integer","minimum":50,"maximum":100}},"required":["id","createdAt","enabled","channels","kind","thresholdPct"]}]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Remove an alert rule (an alert it had open is closed)","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/alerts/rules/{id}/test":{"post":{"summary":"Send a test alert through the rule’s channels","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"at":{"type":"string","format":"date-time"},"ruleId":{"type":"string","nullable":true},"kind":{"type":"string","enum":["error_rate","quiet","budget","heartbeat"]},"state":{"type":"string","enum":["fired","resolved","test"]},"appId":{"type":"string","nullable":true},"appName":{"type":"string","nullable":true},"title":{"type":"string","minLength":1,"maxLength":200},"detail":{"type":"string","maxLength":600},"deliveries":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["in_app","email","telegram"]},"ok":{"type":"boolean"},"reason":{"type":"string","nullable":true,"maxLength":64}},"required":["channel","ok","reason"]}}},"required":["id","at","ruleId","kind","state","appId","appName","title","detail","deliveries"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/observe/settings":{"get":{"summary":"The weekly digest and the public status page: switches and who gets what","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"digest":{"type":"object","properties":{"enabled":{"type":"boolean"},"isRecipient":{"type":"boolean"},"subscribed":{"type":"boolean"},"recipients":{"type":"integer","minimum":0},"lastSentAt":{"type":"string","nullable":true,"format":"date-time"},"nextSendAt":{"type":"string","format":"date-time"},"emailAvailable":{"type":"boolean"}},"required":["enabled","isRecipient","subscribed","recipients","lastSentAt","nextSendAt","emailAvailable"]},"status":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string","nullable":true,"maxLength":80},"appIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":50}},"required":["enabled","title","appIds"]},"path":{"type":"string","minLength":1},"apps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","nullable":true,"enum":["operational","degraded","down","paused",null]}},"required":["id","name","state"]}}},"required":["settings","path","apps"]},"canEdit":{"type":"boolean"}},"required":["digest","status","canEdit"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"patch":{"summary":"Switch the digest or the status page on or off; a recipient can unsubscribe themselves","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"digest":{"type":"object","properties":{"enabled":{"type":"boolean"},"subscribed":{"type":"boolean"}}},"status":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string","nullable":true,"maxLength":80},"appIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":50}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"digest":{"type":"object","properties":{"enabled":{"type":"boolean"},"isRecipient":{"type":"boolean"},"subscribed":{"type":"boolean"},"recipients":{"type":"integer","minimum":0},"lastSentAt":{"type":"string","nullable":true,"format":"date-time"},"nextSendAt":{"type":"string","format":"date-time"},"emailAvailable":{"type":"boolean"}},"required":["enabled","isRecipient","subscribed","recipients","lastSentAt","nextSendAt","emailAvailable"]},"status":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string","nullable":true,"maxLength":80},"appIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":50}},"required":["enabled","title","appIds"]},"path":{"type":"string","minLength":1},"apps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"state":{"type":"string","nullable":true,"enum":["operational","degraded","down","paused",null]}},"required":["id","name","state"]}}},"required":["settings","path","apps"]},"canEdit":{"type":"boolean"}},"required":["digest","status","canEdit"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/observe/digest/preview":{"get":{"summary":"This week’s digest as it would be emailed to you (nothing is sent)","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"from":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"}},"required":["subject","html","text","to","from","until"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/observe/digest/send-test":{"post":{"summary":"Email this week’s digest to yourself only","tags":["observe"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"reason":{"type":"string","nullable":true}},"required":["sent","reason"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/residency":{"get":{"summary":"Where this workspace’s data lives: cell, providers, backups, Kazakhstan Planned","tags":["infrastructure"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","enum":["qaldy.residency-statement/1"]},"generatedAt":{"type":"string","format":"date-time"},"checkedAt":{"type":"string","format":"date"},"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"cell":{"type":"string","enum":["global","eu","kz"]},"profile":{"type":"string","enum":["global","eu","kz-standard","kz-strict"]}},"required":["id","name","cell","profile"]},"holdsToday":{"type":"object","properties":{"regionId":{"type":"string"},"city":{"type":"string"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"provider":{"type":"string"}},"required":["regionId","city","country","provider"]},"requested":{"type":"object","properties":{"cell":{"type":"string","enum":["global","eu","kz"]},"regionId":{"type":"string"},"available":{"type":"boolean"}},"required":["cell","regionId","available"]},"residency":{"type":"object","properties":{"status":{"type":"string","enum":["planned"]},"line":{"type":"string","minLength":1}},"required":["status","line"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["accounts","workspace","app_code","app_data","secrets","audit","runs","billing","builder","email"]},"what":{"type":"string","minLength":1,"maxLength":200},"subprocessorId":{"type":"string","enum":["cloudflare","aws","anthropic","resend","google"]},"regionId":{"type":"string","nullable":true},"personal":{"type":"string","enum":["yes","possible","no"]},"active":{"type":"boolean"}},"required":["id","what","subprocessorId","regionId","personal","active"]}},"subprocessors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["cloudflare","aws","anthropic","resend","google"]},"name":{"type":"string","minLength":1},"hq":{"type":"string","pattern":"^[A-Z]{2}$"},"purpose":{"type":"string","minLength":1,"maxLength":200},"data":{"type":"string","minLength":1,"maxLength":260},"where":{"type":"string","minLength":1,"maxLength":260},"regionIds":{"type":"array","items":{"type":"string"}},"pinned":{"type":"boolean"},"use":{"type":"string","enum":["in_use","optional","not_in_use"]}},"required":["id","name","hq","purpose","data","where","regionIds","pinned","use"]}},"backups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["database","vault","app_data"]},"what":{"type":"string","minLength":1,"maxLength":260},"subprocessorId":{"type":"string","enum":["cloudflare","aws","anthropic","resend","google"]},"regionId":{"type":"string","nullable":true},"days":{"type":"integer","nullable":true,"minimum":1},"source":{"type":"string","minLength":1},"restoreToday":{"type":"boolean"}},"required":["id","what","subprocessorId","regionId","days","source","restoreToday"]}},"notInTheDataPath":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"reason":{"type":"string"}},"required":["name","reason"]}},"nonClaims":{"type":"array","items":{"type":"string","minLength":1}}},"required":["schema","generatedAt","checkedAt","workspace","holdsToday","requested","residency","data","subprocessors","backups","notInTheDataPath","nonClaims"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing":{"get":{"summary":"Invoices and acts in tenge: your company details, the seller, the documents (admins; MOCK billing)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"profile":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language","updatedAt"]},"seller":{"type":"object","properties":{"configured":{"type":"boolean"},"legalName":{"type":"string","nullable":true},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatChecked":{"type":"boolean"}},"required":["configured","legalName","vat","vatChecked"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"currency":{"type":"string","enum":["KZT"]},"workspaceCurrency":{"type":"string","enum":["EUR","USD","KZT"]},"canEdit":{"type":"boolean"},"newestInvoicePeriod":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"newestActPeriod":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"oldestPeriod":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"issuedOn":{"type":"string","format":"date"},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"preview":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]}},"required":["id","kind","number","period","issuedOn","status","relatedNumber","preview","language","totals"]}},"notes":{"type":"array","items":{"type":"string","minLength":1}},"billing":{"type":"string","enum":["mock"]}},"required":["workspaceId","profile","seller","plan","currency","workspaceCurrency","canEdit","newestInvoicePeriod","newestActPeriod","oldestPeriod","documents","notes","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/profile":{"put":{"summary":"Set the company details printed on invoices and acts: name, BIN or IIN, address","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1},"profile":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language","updatedAt"]},"seller":{"type":"object","properties":{"configured":{"type":"boolean"},"legalName":{"type":"string","nullable":true},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatChecked":{"type":"boolean"}},"required":["configured","legalName","vat","vatChecked"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"currency":{"type":"string","enum":["KZT"]},"workspaceCurrency":{"type":"string","enum":["EUR","USD","KZT"]},"canEdit":{"type":"boolean"},"newestInvoicePeriod":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"newestActPeriod":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"oldestPeriod":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"issuedOn":{"type":"string","format":"date"},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"preview":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]}},"required":["id","kind","number","period","issuedOn","status","relatedNumber","preview","language","totals"]}},"notes":{"type":"array","items":{"type":"string","minLength":1}},"billing":{"type":"string","enum":["mock"]}},"required":["workspaceId","profile","seller","plan","currency","workspaceCurrency","canEdit","newestInvoicePeriod","newestActPeriod","oldestPeriod","documents","notes","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/documents":{"post":{"summary":"Issue an invoice or an act for a month: next number, frozen lines, VAT and customer (admins)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["invoice","act"]},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"language":{"type":"string","enum":["en","ru","kk"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":128}},"required":["kind","period"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"year":{"type":"integer","minimum":2000},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"issuedOn":{"type":"string","format":"date"},"issuedAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["KZT"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","add_on"]},"ref":{"type":"string","minLength":1,"maxLength":40},"qty":{"type":"integer","minimum":1,"maximum":100000},"unitMinor":{"type":"integer","minimum":0,"maximum":1000000000},"amountMinor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["kind","ref","qty","unitMinor","amountMinor"]},"minItems":1,"maxItems":40},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]},"customer":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language"]},"seller":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"bin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatRegistration":{"type":"string","nullable":true,"minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"bank":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"},"iban":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$"},"kbe":{"type":"string","pattern":"^\\d{2}$"},"knp":{"type":"string","pattern":"^\\d{3}$"}},"required":["name","iban","bic","kbe","knp"]},"signatory":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["title","name"]}},"required":["legalName","bin","address","vat","vatRegistration","bank","signatory"]},"language":{"type":"string","enum":["en","ru","kk"]},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"usage":{"type":"array","nullable":true,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"estimate":{"type":"boolean"}},"required":["kind","used","allowance","estimate"]}},"paid":{"type":"object","nullable":true,"properties":{"on":{"type":"string","format":"date"},"reference":{"type":"string","nullable":true},"by":{"type":"string"}},"required":["on","reference","by"]},"voided":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"]},"preview":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["id","workspaceId","kind","number","seq","year","period","periodStart","periodEnd","issuedOn","issuedAt","currency","plan","lines","vat","totals","customer","seller","language","status","relatedNumber","usage","paid","voided","preview","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/documents/{documentId}":{"get":{"summary":"One invoice or act, as issued (admins)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"documentId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"year":{"type":"integer","minimum":2000},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"issuedOn":{"type":"string","format":"date"},"issuedAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["KZT"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","add_on"]},"ref":{"type":"string","minLength":1,"maxLength":40},"qty":{"type":"integer","minimum":1,"maximum":100000},"unitMinor":{"type":"integer","minimum":0,"maximum":1000000000},"amountMinor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["kind","ref","qty","unitMinor","amountMinor"]},"minItems":1,"maxItems":40},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]},"customer":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language"]},"seller":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"bin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatRegistration":{"type":"string","nullable":true,"minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"bank":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"},"iban":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$"},"kbe":{"type":"string","pattern":"^\\d{2}$"},"knp":{"type":"string","pattern":"^\\d{3}$"}},"required":["name","iban","bic","kbe","knp"]},"signatory":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["title","name"]}},"required":["legalName","bin","address","vat","vatRegistration","bank","signatory"]},"language":{"type":"string","enum":["en","ru","kk"]},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"usage":{"type":"array","nullable":true,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"estimate":{"type":"boolean"}},"required":["kind","used","allowance","estimate"]}},"paid":{"type":"object","nullable":true,"properties":{"on":{"type":"string","format":"date"},"reference":{"type":"string","nullable":true},"by":{"type":"string"}},"required":["on","reference","by"]},"voided":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"]},"preview":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["id","workspaceId","kind","number","seq","year","period","periodStart","periodEnd","issuedOn","issuedAt","currency","plan","lines","vat","totals","customer","seller","language","status","relatedNumber","usage","paid","voided","preview","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/documents/{documentId}/paid":{"put":{"summary":"Mark an invoice paid by hand: a date and a bank or Kaspi reference (admins)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"documentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paidOn":{"type":"string","format":"date"},"reference":{"type":"string","nullable":true,"minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["paidOn"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"year":{"type":"integer","minimum":2000},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"issuedOn":{"type":"string","format":"date"},"issuedAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["KZT"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","add_on"]},"ref":{"type":"string","minLength":1,"maxLength":40},"qty":{"type":"integer","minimum":1,"maximum":100000},"unitMinor":{"type":"integer","minimum":0,"maximum":1000000000},"amountMinor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["kind","ref","qty","unitMinor","amountMinor"]},"minItems":1,"maxItems":40},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]},"customer":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language"]},"seller":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"bin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatRegistration":{"type":"string","nullable":true,"minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"bank":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"},"iban":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$"},"kbe":{"type":"string","pattern":"^\\d{2}$"},"knp":{"type":"string","pattern":"^\\d{3}$"}},"required":["name","iban","bic","kbe","knp"]},"signatory":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["title","name"]}},"required":["legalName","bin","address","vat","vatRegistration","bank","signatory"]},"language":{"type":"string","enum":["en","ru","kk"]},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"usage":{"type":"array","nullable":true,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"estimate":{"type":"boolean"}},"required":["kind","used","allowance","estimate"]}},"paid":{"type":"object","nullable":true,"properties":{"on":{"type":"string","format":"date"},"reference":{"type":"string","nullable":true},"by":{"type":"string"}},"required":["on","reference","by"]},"voided":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"]},"preview":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["id","workspaceId","kind","number","seq","year","period","periodStart","periodEnd","issuedOn","issuedAt","currency","plan","lines","vat","totals","customer","seller","language","status","relatedNumber","usage","paid","voided","preview","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null},"delete":{"summary":"Undo a paid mark made by mistake (admins)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"documentId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"year":{"type":"integer","minimum":2000},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"issuedOn":{"type":"string","format":"date"},"issuedAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["KZT"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","add_on"]},"ref":{"type":"string","minLength":1,"maxLength":40},"qty":{"type":"integer","minimum":1,"maximum":100000},"unitMinor":{"type":"integer","minimum":0,"maximum":1000000000},"amountMinor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["kind","ref","qty","unitMinor","amountMinor"]},"minItems":1,"maxItems":40},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]},"customer":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language"]},"seller":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"bin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatRegistration":{"type":"string","nullable":true,"minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"bank":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"},"iban":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$"},"kbe":{"type":"string","pattern":"^\\d{2}$"},"knp":{"type":"string","pattern":"^\\d{3}$"}},"required":["name","iban","bic","kbe","knp"]},"signatory":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["title","name"]}},"required":["legalName","bin","address","vat","vatRegistration","bank","signatory"]},"language":{"type":"string","enum":["en","ru","kk"]},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"usage":{"type":"array","nullable":true,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"estimate":{"type":"boolean"}},"required":["kind","used","allowance","estimate"]}},"paid":{"type":"object","nullable":true,"properties":{"on":{"type":"string","format":"date"},"reference":{"type":"string","nullable":true},"by":{"type":"string"}},"required":["on","reference","by"]},"voided":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"]},"preview":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["id","workspaceId","kind","number","seq","year","period","periodStart","periodEnd","issuedOn","issuedAt","currency","plan","lines","vat","totals","customer","seller","language","status","relatedNumber","usage","paid","voided","preview","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}},"/v1/workspaces/{ws}/billing/documents/{documentId}/void":{"post":{"summary":"Void a document with a reason. Its number stays used (admins)","tags":["billing"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"ws","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"documentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["invoice","act"]},"number":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"year":{"type":"integer","minimum":2000},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"periodStart":{"type":"string","format":"date"},"periodEnd":{"type":"string","format":"date"},"issuedOn":{"type":"string","format":"date"},"issuedAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["KZT"]},"plan":{"type":"string","enum":["free","maker","team","business","sovereign"]},"lines":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","add_on"]},"ref":{"type":"string","minLength":1,"maxLength":40},"qty":{"type":"integer","minimum":1,"maximum":100000},"unitMinor":{"type":"integer","minimum":0,"maximum":1000000000},"amountMinor":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["kind","ref","qty","unitMinor","amountMinor"]},"minItems":1,"maxItems":40},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"totals":{"type":"object","properties":{"netMinor":{"type":"integer","minimum":0,"maximum":1000000000},"vatMinor":{"type":"integer","minimum":0,"maximum":1000000000},"grossMinor":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["netMinor","vatMinor","grossMinor"]},"customer":{"type":"object","properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"binIin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"email":{"type":"string","nullable":true,"maxLength":200,"format":"email"},"contractRef":{"type":"string","nullable":true,"minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}]*$/u"},"vatPayer":{"type":"boolean"},"language":{"type":"string","enum":["en","ru","kk"]}},"required":["legalName","binIin","address","email","contractRef","vatPayer","language"]},"seller":{"type":"object","nullable":true,"properties":{"legalName":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]*$/u"},"bin":{"type":"string","pattern":"^\\d{12}$"},"address":{"type":"string","minLength":1,"maxLength":300,"pattern":"^[^\\p{Cc}]*$/u"},"vat":{"type":"object","properties":{"mode":{"type":"string","enum":["none","excluded","included"]},"rateBp":{"type":"integer","minimum":0,"maximum":5000}},"required":["mode","rateBp"]},"vatRegistration":{"type":"string","nullable":true,"minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"bank":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"},"iban":{"type":"string"},"bic":{"type":"string","pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$"},"kbe":{"type":"string","pattern":"^\\d{2}$"},"knp":{"type":"string","pattern":"^\\d{3}$"}},"required":["name","iban","bic","kbe","knp"]},"signatory":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{Cc}]*$/u"},"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\p{Cc}]*$/u"}},"required":["title","name"]}},"required":["legalName","bin","address","vat","vatRegistration","bank","signatory"]},"language":{"type":"string","enum":["en","ru","kk"]},"status":{"type":"string","enum":["issued","paid","void"]},"relatedNumber":{"type":"string","nullable":true},"usage":{"type":"array","nullable":true,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["cpu_time","concurrency","runs","requests","egress_gb","storage_db_gb","storage_files_gb","ai_credits","tierb_vcpu","tierb_vcpu_dedicated","tierb_memory_gb","tierb_disk_gb","tierb_job_hours","gpu_hours_24gb","gpu_hours_80gb","gpu_dedicated_96gb","gpu_dedicated_h200_kz"]},"used":{"type":"number","nullable":true,"minimum":0},"allowance":{"type":"number","minimum":0},"estimate":{"type":"boolean"}},"required":["kind","used","allowance","estimate"]}},"paid":{"type":"object","nullable":true,"properties":{"on":{"type":"string","format":"date"},"reference":{"type":"string","nullable":true},"by":{"type":"string"}},"required":["on","reference","by"]},"voided":{"type":"object","nullable":true,"properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"]},"preview":{"type":"boolean"},"billing":{"type":"string","enum":["mock"]}},"required":["id","workspaceId","kind","number","seq","year","period","periodStart","periodEnd","issuedOn","issuedAt","currency","plan","lines","vat","totals","customer","seller","language","status","relatedNumber","usage","paid","voided","preview","billing"]}}}},"400":{"description":"The request did not match the contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Signed in, but not allowed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (or not yours to see).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Conflicts with the current state.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"hint":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"x-qaldy-token":null}}}}
