{"openapi":"3.1.0","info":{"title":"Distill.io API v2","version":"2.0.0","description":"RESTful API for the Distill.io web monitoring platform."},"servers":[{"url":"/v2","description":"Default v2 prefix"}],"components":{"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"connect.sid","description":"Session cookie (shared with v1)."},"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token in Authorization header."},"apiKeyQuery":{"type":"apiKey","in":"query","name":"api_key","description":"API key passed as query parameter."}}},"paths":{"/health":{"get":{"summary":"Health check","tags":["Health"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}}}},"security":[]}},"/self":{"get":{"summary":"Get current user profile","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","workspace_id","name","email","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"full_name":{"type":["string","null"]},"bio":{"type":["string","null"]},"email":{"type":"string","format":"email"},"website":{"type":["string","null"]},"locale":{"type":["string","null"]},"credit":{"type":"integer"},"stripe_id":{"type":["string","null"]},"state":{"type":"integer"},"email_state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"orgs":{"type":"array","items":{"type":"object","required":["id","role"],"properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string"},"constraint":{"type":["object","null"]}},"additionalProperties":false}},"prefs":{"type":["object","null"]},"billing_address":{"type":["object","null"]},"user_prefs":{"type":["object","null"]},"is_personal":{"type":"boolean"}},"not":{"required":["password"]},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Delete current user","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update user profile","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"full_name":{"type":["string","null"],"maxLength":200},"bio":{"type":["string","null"],"maxLength":2000},"email":{"type":"string","format":"email"},"website":{"type":["string","null"],"maxLength":500},"locale":{"type":["string","null"],"maxLength":10},"billing_address":{"type":["object","null"]}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/init":{"get":{"summary":"Get user initialization data","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","workspace_id","name","email","workspaces","features"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"full_name":{"type":["string","null"]},"bio":{"type":["string","null"]},"email":{"type":"string","format":"email"},"website":{"type":["string","null"]},"locale":{"type":["string","null"]},"credit":{"type":"integer"},"stripe_id":{"type":["string","null"]},"state":{"type":"integer"},"email_state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"orgs":{"type":"array","items":{"type":"object","required":["id","role"],"properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string"},"constraint":{"type":["object","null"]}},"additionalProperties":false}},"prefs":{"type":["object","null"]},"billing_address":{"type":["object","null"]},"user_prefs":{"type":["object","null"]},"meta":{"type":["object","null"]},"workspaces":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"identity_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"permissions":{"type":["object","null"]},"prefs":{"type":["object","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"is_personal":{"type":"boolean"}},"additionalProperties":true},"minItems":1},"constraint":{"type":["object","null"]},"features":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"value":{"type":["string","null"]}},"additionalProperties":true}}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/constraints":{"get":{"summary":"Get plan constraints","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","owner_id","plan_id","interval","run"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"interval":{"type":"integer"},"item":{"type":"integer"},"run":{"type":"integer"},"action":{"type":"integer"},"email":{"type":"integer"},"sms":{"type":"integer"},"push":{"type":"integer"},"device":{"type":"integer"},"sync":{"type":"string"},"flexi":{"type":"boolean"},"history":{"type":"integer"},"sieve":{"type":"integer"},"workers":{"type":"integer"},"session":{"type":"integer"},"macro":{"type":"integer"},"price":{"type":"integer"},"org":{"type":"boolean"},"action_macro":{"type":"integer"},"crawl_pages":{"type":"integer"},"tokens":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/prefs":{"put":{"summary":"Merge user preferences","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/meta/{key}":{"post":{"summary":"Set user meta key","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Merge user meta key; primary_email requests an email change","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Delete user meta key","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/charges":{"get":{"summary":"Get billing charges","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","owner_id","amount","state","ts"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"amount":{"type":"integer"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"product_name":{"type":["string","null"]}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/meta/primary_email/send-verification":{"post":{"summary":"Resend primary email verification","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces":{"get":{"summary":"List workspaces","tags":["Workspaces"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","permissions"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"identity_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"permissions":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}}},"prefs":{"type":["object","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create workspace","tags":["Workspaces"],"description":"Auth: Enterprise — Enterprise plan account.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"identity_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"permissions":{"type":"object"},"prefs":{"type":["object","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","org_id"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"org_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces/{id}":{"get":{"summary":"Get workspace","tags":["Workspaces"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","permissions"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"identity_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"permissions":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}}},"prefs":{"type":["object","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update workspace","tags":["Workspaces"],"description":"Auth: Admin — Workspace admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"prefs":{"type":"object"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update workspace","tags":["Workspaces"],"description":"Auth: Admin — Workspace admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"prefs":{"type":"object"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Delete workspace","tags":["Workspaces"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces/{workspace_id}/users":{"get":{"summary":"List workspace members","tags":["Workspaces"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","permissions","identity_type"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"permissions":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}}},"identity_type":{"type":"string","enum":["user","team"]},"email":{"type":["string","null"]},"full_name":{"type":["string","null"]}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces/{workspace_id}/role/{identity_id}":{"put":{"summary":"Update member role","tags":["Workspaces"],"description":"Auth: Admin — Workspace admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update member role","tags":["Workspaces"],"description":"Auth: Admin — Workspace admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces/{workspace_id}/members":{"post":{"summary":"Add workspace member","tags":["Workspaces"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identity_id"],"properties":{"identity_id":{"type":"string","format":"uuid"},"admin":{"type":"boolean"},"edit":{"type":"boolean","default":true}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces/{workspace_id}/members/{identity_id}":{"delete":{"summary":"Remove workspace member","tags":["Workspaces"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/workspaces/{id}/prefs/{key}":{"get":{"summary":"Get workspace preference by key","tags":["Workspaces"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"not":{"type":"null"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Set workspace preference by key","tags":["Workspaces"],"description":"Auth: Admin — Workspace admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"not":{"type":"null"}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves":{"get":{"summary":"List sieves","tags":["Sieves"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"rule_id":{"type":["string","null"],"format":"uuid"},"uri":{"type":["string","null"]},"content_type":{"type":"integer"},"config":{"type":["string","null"]},"schedule":{"type":["string","null"]},"state":{"type":"integer"},"tags":{"type":["string","null"]},"text":{"type":["string","null"]},"err":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_data":{"type":["string","null"]},"ts_view":{"type":["string","null"]},"session_id":{"type":["string","null"],"format":"uuid"},"ts_mod":{"type":"string","format":"date-time"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"workspace_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create sieve","tags":["Sieves"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"rule_id":{"type":["string","null"],"format":"uuid"},"uri":{"type":["string","null"]},"content_type":{"type":"integer"},"config":{"type":["string","null"]},"schedule":{"type":["string","null"]},"state":{"type":"integer"},"tags":{"type":["string","null"]},"text":{"type":["string","null"]},"err":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_data":{"type":["string","null"]},"ts_view":{"type":["string","null"]},"session_id":{"type":["string","null"],"format":"uuid"},"ts_mod":{"type":"string","format":"date-time"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"workspace_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","uri","content_type"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":500},"uri":{"type":"string","minLength":1,"maxLength":2000},"content_type":{"type":"integer","minimum":0},"config":{"type":["string","null"],"jsonSchema":{"type":"object"}},"schedule":{"type":["string","null"],"jsonSchema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["INTERVAL","CRON","RANDOM","LIVE","AUTO"]},"params":{"type":"object"}},"allOf":[{"if":{"properties":{"type":{"const":"INTERVAL"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["interval"],"properties":{"interval":{"type":"integer","minimum":1}}}}}},{"if":{"properties":{"type":{"const":"CRON"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["expr"],"properties":{"expr":{"type":"string","minLength":1}}}}}},{"if":{"properties":{"type":{"const":"RANDOM"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["min","max"],"properties":{"min":{"type":"integer"},"max":{"type":"integer"}}}}}}]}},"tags":{"type":["string","null"]},"state":{"type":"integer","enum":[0,20,40,45,90,100]},"client_id":{"type":"string","format":"uuid"},"session_id":{"type":["string","null"],"format":"uuid"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"rule_id":{"type":["string","null"],"format":"uuid"},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"meta":{"type":["object","null"]},"workspace_id":{"type":"string","format":"uuid"},"text":{"type":["string","null"]},"ts_data":{"type":["string","null"],"format":"date-time"},"err":{"type":["string","null"]},"ts_view":{"type":["string","null"],"format":"date-time"},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/extended":{"get":{"summary":"List sieves with their latest data","tags":["Sieves"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"rule_id":{"type":["string","null"],"format":"uuid"},"uri":{"type":["string","null"]},"content_type":{"type":"integer"},"config":{"type":["string","null"]},"schedule":{"type":["string","null"]},"state":{"type":"integer"},"tags":{"type":["string","null"]},"text":{"type":["string","null"]},"err":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_data":{"type":["string","null"]},"ts_view":{"type":["string","null"]},"session_id":{"type":["string","null"],"format":"uuid"},"ts_mod":{"type":"string","format":"date-time"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"workspace_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":["string","null"],"format":"uuid"},"summary":{"type":["object","null"]}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{id}":{"get":{"summary":"Get sieve","tags":["Sieves"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"rule_id":{"type":["string","null"],"format":"uuid"},"uri":{"type":["string","null"]},"content_type":{"type":"integer"},"config":{"type":["string","null"]},"schedule":{"type":["string","null"]},"state":{"type":"integer"},"tags":{"type":["string","null"]},"text":{"type":["string","null"]},"err":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_data":{"type":["string","null"]},"ts_view":{"type":["string","null"]},"session_id":{"type":["string","null"],"format":"uuid"},"ts_mod":{"type":"string","format":"date-time"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"workspace_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update sieve","tags":["Sieves"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"uri":{"type":"string","minLength":1,"maxLength":2000},"content_type":{"type":"integer","minimum":0},"config":{"type":["string","null"],"jsonSchema":{"type":"object"}},"schedule":{"type":["string","null"],"jsonSchema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["INTERVAL","CRON","RANDOM","LIVE","AUTO"]},"params":{"type":"object"}},"allOf":[{"if":{"properties":{"type":{"const":"INTERVAL"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["interval"],"properties":{"interval":{"type":"integer","minimum":1}}}}}},{"if":{"properties":{"type":{"const":"CRON"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["expr"],"properties":{"expr":{"type":"string","minLength":1}}}}}},{"if":{"properties":{"type":{"const":"RANDOM"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["min","max"],"properties":{"min":{"type":"integer"},"max":{"type":"integer"}}}}}}]}},"state":{"type":"integer","enum":[0,20,40,45,90,100]},"tags":{"type":["string","null"]},"client_id":{"type":"string","format":"uuid"},"session_id":{"type":["string","null"],"format":"uuid"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"rule_id":{"type":["string","null"],"format":"uuid"},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"ts_view":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"text":{"type":["string","null"]},"ts_data":{"type":["string","null"],"format":"date-time"},"err":{"type":["string","null"]},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update sieve","tags":["Sieves"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"uri":{"type":"string","minLength":1,"maxLength":2000},"content_type":{"type":"integer","minimum":0},"config":{"type":["string","null"],"jsonSchema":{"type":"object"}},"schedule":{"type":["string","null"],"jsonSchema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["INTERVAL","CRON","RANDOM","LIVE","AUTO"]},"params":{"type":"object"}},"allOf":[{"if":{"properties":{"type":{"const":"INTERVAL"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["interval"],"properties":{"interval":{"type":"integer","minimum":1}}}}}},{"if":{"properties":{"type":{"const":"CRON"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["expr"],"properties":{"expr":{"type":"string","minLength":1}}}}}},{"if":{"properties":{"type":{"const":"RANDOM"}},"required":["type"]},"then":{"properties":{"params":{"type":"object","required":["min","max"],"properties":{"min":{"type":"integer"},"max":{"type":"integer"}}}}}}]}},"state":{"type":"integer","enum":[0,20,40,45,90,100]},"tags":{"type":["string","null"]},"client_id":{"type":"string","format":"uuid"},"session_id":{"type":["string","null"],"format":"uuid"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"rule_id":{"type":["string","null"],"format":"uuid"},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"ts_view":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"text":{"type":["string","null"]},"ts_data":{"type":["string","null"],"format":"date-time"},"err":{"type":["string","null"]},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete sieve","tags":["Sieves"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{sieve_id}/actions":{"get":{"summary":"List sieve actions","tags":["Sieve Actions"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","sieve_id","type","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"type":{"type":"integer"},"config":{"type":["string","null"]},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create sieve action","tags":["Sieve Actions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","sieve_id","type","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"type":{"type":"integer"},"config":{"type":["string","null"]},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"integer","minimum":0},"config":{"type":["string","null"],"jsonSchema":{"type":"object"}},"state":{"type":"integer","enum":[0,100]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{sieve_id}/actions/{id}":{"put":{"summary":"Update sieve action","tags":["Sieve Actions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"integer","minimum":0},"config":{"type":["string","null"],"jsonSchema":{"type":"object"}},"state":{"type":"integer","enum":[0,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update sieve action","tags":["Sieve Actions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"integer","minimum":0},"config":{"type":["string","null"],"jsonSchema":{"type":"object"}},"state":{"type":"integer","enum":[0,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete sieve action","tags":["Sieve Actions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{sieve_id}/data":{"get":{"summary":"List sieve data","tags":["Sieve Data"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","sieve_id","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"data_type":{"type":"integer"},"data":{"type":["string","null"]},"text":{"type":["string","null"]},"client_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"triggered":{"type":"boolean"},"text_hash":{"type":["string","null"]},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"summary":{"type":["object","null"]},"snapshot":{"type":["string","null"]},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create sieve data","tags":["Sieve Data"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","sieve_id","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"data_type":{"type":"integer"},"data":{"type":["string","null"]},"text":{"type":["string","null"]},"client_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"triggered":{"type":"boolean"},"text_hash":{"type":["string","null"]},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"summary":{"type":["object","null"]},"snapshot":{"type":["string","null"]},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data_type","text"],"properties":{"id":{"type":"string","format":"uuid"},"data_type":{"type":"integer"},"data":{"type":["string","null"]},"text":{"type":"string"},"client_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"triggered":{"type":"boolean"},"text_hash":{"type":["string","null"]},"snapshot":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{sieve_id}/data/{id}":{"get":{"summary":"Get sieve data","tags":["Sieve Data"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","sieve_id","ts"],"properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"data_type":{"type":"integer"},"data":{"type":["string","null"]},"text":{"type":["string","null"]},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update sieve data","tags":["Sieve Data"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":["object","null"]},"triggered":{"type":"boolean"},"text_hash":{"type":["string","null"]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update sieve data","tags":["Sieve Data"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":["object","null"]},"triggered":{"type":"boolean"},"text_hash":{"type":["string","null"]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{sieve_id}/works":{"get":{"summary":"List sieve works","tags":["Sieve Works"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","ts"],"properties":{"id":{"type":"string","format":"uuid"},"err":{"type":["string","null"]},"duration":{"type":["integer","null"]},"ts":{"type":"string","format":"date-time"},"snapshot_id":{"type":["string","null"]},"meta":{"type":["object","null"]}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create sieve work","tags":["Sieve Works"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts"],"properties":{"id":{"type":"string","format":"uuid"},"err":{"type":["string","null"]},"duration":{"type":["integer","null"]},"ts":{"type":"string","format":"date-time"},"snapshot_id":{"type":["string","null"]},"meta":{"type":["object","null"]}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"err":{},"data":{},"duration":{"type":"integer"},"meta":{"type":["object","null"]},"snapshot_id":{"type":["string","null"]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/rules":{"get":{"summary":"List rules","tags":["Rules"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"config":{"type":["string","null"]},"version":{"type":["string","null"]},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create rule","tags":["Rules"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"config":{"type":["string","null"]},"version":{"type":["string","null"]},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["config"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":500},"config":{"type":"string","minLength":1},"version":{"type":"string","maxLength":50},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/rules/{id}":{"get":{"summary":"Get rule","tags":["Rules"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"config":{"type":["string","null"]},"version":{"type":["string","null"]},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update rule","tags":["Rules"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":500},"config":{"type":"string"},"state":{"type":"integer","enum":[0,100]},"version":{"type":"string","maxLength":50},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update rule","tags":["Rules"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":500},"config":{"type":"string"},"state":{"type":"integer","enum":[0,100]},"version":{"type":"string","maxLength":50},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete rule","tags":["Rules"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/tags":{"get":{"summary":"List tags","tags":["Tags"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create tag","tags":["Tags"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":500},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/tags/{id}":{"get":{"summary":"Get tag","tags":["Tags"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update tag","tags":["Tags"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"state":{"type":"integer","enum":[0,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update tag","tags":["Tags"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"state":{"type":"integer","enum":[0,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete tag","tags":["Tags"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sessions":{"get":{"summary":"List sessions","tags":["Sessions"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"cookies":{"type":["array","null"]},"params":{"type":["object","null"]},"init":{"type":["string","null"]},"uninit":{"type":["string","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create session","tags":["Sessions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"cookies":{"type":["array","null"]},"params":{"type":["object","null"]},"init":{"type":["string","null"]},"uninit":{"type":["string","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"cookies":{"type":["array","null"],"items":{"type":"object"}},"params":{"type":["object","null"]},"init":{"type":["string","null"]},"uninit":{"type":["string","null"]},"state":{"type":"integer","enum":[0,100]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sessions/{id}":{"get":{"summary":"Get session","tags":["Sessions"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"cookies":{"type":["array","null"]},"params":{"type":["object","null"]},"init":{"type":["string","null"]},"uninit":{"type":["string","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update session","tags":["Sessions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"cookies":{"type":["array","null"],"items":{"type":"object"}},"params":{"type":["object","null"]},"init":{"type":["string","null"]},"uninit":{"type":["string","null"]},"state":{"type":"integer","enum":[0,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update session","tags":["Sessions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"cookies":{"type":["array","null"],"items":{"type":"object"}},"params":{"type":["object","null"]},"init":{"type":["string","null"]},"uninit":{"type":["string","null"]},"state":{"type":"integer","enum":[0,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete session","tags":["Sessions"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/macros":{"get":{"summary":"List macros","tags":["Macros"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"spec":{"type":["object","null"]},"meta":{"type":["object","null"]},"steps":{"type":["array","null"]},"version":{"type":"integer"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create macro","tags":["Macros"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"spec":{"type":["object","null"]},"meta":{"type":["object","null"]},"steps":{"type":["array","null"]},"version":{"type":"integer"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"spec":{"type":["object","null"]},"meta":{"type":["object","null"]},"steps":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"}]}},"state":{"type":"integer","enum":[0,100]},"version":{"type":"integer","enum":[1,2]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/macros/{id}":{"get":{"summary":"Get macro","tags":["Macros"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"spec":{"type":["object","null"]},"meta":{"type":["object","null"]},"steps":{"type":["array","null"]},"version":{"type":"integer"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update macro","tags":["Macros"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"spec":{"type":["object","null"]},"meta":{"type":["object","null"]},"steps":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"}]}},"state":{"type":"integer","enum":[0,100]},"version":{"type":"integer","enum":[1,2]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update macro","tags":["Macros"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"spec":{"type":["object","null"]},"meta":{"type":["object","null"]},"steps":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"}]}},"state":{"type":"integer","enum":[0,100]},"version":{"type":"integer","enum":[1,2]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete macro","tags":["Macros"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/clients":{"get":{"summary":"List clients","tags":["Clients"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","type","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"integer"},"owner_id":{"type":["string","null"],"format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"info":{"type":["string","null"]},"state":{"type":["integer","null"]},"version":{"type":["string","null"]},"is_worker":{"type":"boolean"},"ts":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"client_ts_mod":{"type":["string","null"],"format":"date-time"},"device_token":{"type":["string","null"]},"props":{"type":["object","null"],"properties":{"instance":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create client","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","type","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"integer"},"owner_id":{"type":["string","null"],"format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"info":{"type":["string","null"]},"state":{"type":["integer","null"]},"version":{"type":["string","null"]},"is_worker":{"type":"boolean"},"ts":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"client_ts_mod":{"type":["string","null"],"format":"date-time"},"device_token":{"type":["string","null"]},"props":{"type":["object","null"],"properties":{"instance":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"properties":{"id":{"type":"string","format":"uuid","not":{"enum":["ffffffff-ffff-ffff-ffff-ffffffffffff","eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee"]}},"name":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"integer"},"info":{"type":["string","null"]},"state":{"type":"integer","enum":[0,90,100]},"props":{"type":"object"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/clients/{id}":{"get":{"summary":"Get client","tags":["Clients"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","type","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"integer"},"owner_id":{"type":["string","null"],"format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"info":{"type":["string","null"]},"state":{"type":["integer","null"]},"version":{"type":["string","null"]},"is_worker":{"type":"boolean"},"ts":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"client_ts_mod":{"type":["string","null"],"format":"date-time"},"device_token":{"type":["string","null"]},"props":{"type":["object","null"],"properties":{"instance":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update client","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":["string","null"]},"state":{"type":"integer","enum":[0,90,100]},"ts_mod":{"type":["string","null"],"format":"date-time"},"device_token":{"type":["string","null"]}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update client","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":["string","null"]},"state":{"type":"integer","enum":[0,90,100]},"ts_mod":{"type":["string","null"],"format":"date-time"},"device_token":{"type":["string","null"]}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Delete client","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/clients/{id}/start":{"post":{"summary":"Start BBX instance","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","host","key","connectionString","basePath","url","persistent","cdpUrl"],"properties":{"id":{"type":"string"},"host":{"type":"string"},"key":{"type":"string"},"connectionString":{"type":"string"},"basePath":{"type":"string"},"url":{"type":"string"},"persistent":{"type":"boolean"},"cdpUrl":{"type":"string"},"proxyId":{"type":["string","null"]}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"persistent":{"type":"boolean"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/clients/{id}/clear-storage":{"post":{"summary":"Clear BBX browser storage","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/user-clients/{id}/primary-workspace":{"put":{"summary":"Update local client primary workspace","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id"],"properties":{"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/clients/{id}/primary-workspace":{"put":{"summary":"Update client primary workspace (deprecated alias)","tags":["Clients"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id"],"properties":{"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/proxies":{"get":{"summary":"List proxies","tags":["Proxies"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create proxy","tags":["Proxies"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","gateway"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"gateway":{"type":"string","minLength":1},"region":{"type":["string","null"]},"tags":{"type":["string","null"]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/proxies/global":{"get":{"summary":"List global proxies","tags":["Proxies"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/proxies/{id}":{"get":{"summary":"Get proxy","tags":["Proxies"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update proxy","tags":["Proxies"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"gateway":{"type":"string","minLength":1},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update proxy","tags":["Proxies"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"gateway":{"type":"string","minLength":1},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete proxy","tags":["Proxies"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/_internal/proxies":{"get":{"summary":"List internal global proxies","tags":["Internal"],"description":"Auth: Enterprise+Internal+Admin — Authenticated internal enterprise admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create internal global proxy","tags":["Internal"],"description":"Auth: Enterprise+Internal+Admin — Authenticated internal enterprise admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","gateway"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"gateway":{"type":"string","minLength":1},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":"integer"},"state":{"type":"integer","enum":[0,40,100]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/_internal/proxies/{id}":{"get":{"summary":"Get internal global proxy","tags":["Internal"],"description":"Auth: Enterprise+Internal+Admin — Authenticated internal enterprise admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update internal global proxy","tags":["Internal"],"description":"Auth: Enterprise+Internal+Admin — Authenticated internal enterprise admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"gateway":{"type":"string","minLength":1},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"ts_mod":{"type":["string","null"],"format":"date-time"},"cost":{"type":"integer"},"state":{"type":"integer","enum":[0,40,100]}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update internal global proxy","tags":["Internal"],"description":"Auth: Enterprise+Internal+Admin — Authenticated internal enterprise admin.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"gateway":{"type":"string","minLength":1},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"ts_mod":{"type":["string","null"],"format":"date-time"},"cost":{"type":"integer"},"state":{"type":"integer","enum":[0,40,100]}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/datasources":{"get":{"summary":"List datasources","tags":["Datasources"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasource_type":{"type":["string","null"]},"priority":{"type":["integer","null"]},"state":{"type":"integer"},"category_id":{"type":["string","null"],"format":"uuid"},"category":{"type":["string","null"]},"cost":{"type":["integer","null"]},"slug":{"type":["string","null"]},"async":{"type":["boolean","null"]},"min_plan_price":{"type":["integer","null"]},"schema":{"type":["object","null"]},"datasource_params":{"type":["object","null"]},"spec":{"type":"object"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create datasource","tags":["Datasources"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasource_type":{"type":["string","null"]},"priority":{"type":["integer","null"]},"state":{"type":"integer"},"category_id":{"type":["string","null"],"format":"uuid"},"category":{"type":["string","null"]},"cost":{"type":["integer","null"]},"slug":{"type":["string","null"]},"async":{"type":["boolean","null"]},"min_plan_price":{"type":["integer","null"]},"schema":{"type":["object","null"]},"datasource_params":{"type":["object","null"]},"spec":{"type":"object"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","category_id","slug"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"datasource_type":{"type":"string","minLength":1},"page_type_id":{"type":["string","null"],"format":"uuid"},"provider_id":{"type":["string","null"],"format":"uuid"},"category_id":{"type":"string","format":"uuid"},"cost":{"type":"integer"},"example_uri":{"type":["array","null"],"items":{"type":"string"}},"priority":{"type":"integer"},"params":{"type":"object"},"state":{"type":"integer","enum":[0,40,100]},"schema":{"type":["object","null"]},"min_plan_price":{"type":"integer"},"async":{"type":"boolean"},"example_data":{"type":["object","null"]},"slug":{"type":"string","minLength":1,"maxLength":200},"spec":{"type":"object"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/datasources/categories":{"get":{"summary":"List datasource categories","tags":["Datasources"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create datasource category","tags":["Datasources"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"state":{"type":"integer","enum":[0,40,100]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/datasources/{id}":{"get":{"summary":"Get datasource","tags":["Datasources"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"datasource_type":{"type":["string","null"]},"priority":{"type":["integer","null"]},"state":{"type":"integer"},"category_id":{"type":["string","null"],"format":"uuid"},"category":{"type":["string","null"]},"cost":{"type":["integer","null"]},"slug":{"type":["string","null"]},"async":{"type":["boolean","null"]},"min_plan_price":{"type":["integer","null"]},"schema":{"type":["object","null"]},"datasource_params":{"type":["object","null"]},"spec":{"type":"object"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update datasource","tags":["Datasources"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"datasource_type":{"type":"string","minLength":1},"page_type_id":{"type":["string","null"],"format":"uuid"},"provider_id":{"type":["string","null"],"format":"uuid"},"category_id":{"type":"string","format":"uuid"},"cost":{"type":"integer"},"example_uri":{"type":["array","null"],"items":{"type":"string"}},"priority":{"type":"integer"},"params":{"type":"object"},"state":{"type":"integer","enum":[0,40,100]},"schema":{"type":["object","null"]},"min_plan_price":{"type":"integer"},"async":{"type":"boolean"},"example_data":{"type":["object","null"]},"slug":{"type":"string","minLength":1,"maxLength":200},"spec":{"type":"object"},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update datasource","tags":["Datasources"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"datasource_type":{"type":"string","minLength":1},"page_type_id":{"type":["string","null"],"format":"uuid"},"provider_id":{"type":["string","null"],"format":"uuid"},"category_id":{"type":"string","format":"uuid"},"cost":{"type":"integer"},"example_uri":{"type":["array","null"],"items":{"type":"string"}},"priority":{"type":"integer"},"params":{"type":"object"},"state":{"type":"integer","enum":[0,40,100]},"schema":{"type":["object","null"]},"min_plan_price":{"type":"integer"},"async":{"type":"boolean"},"example_data":{"type":["object","null"]},"slug":{"type":"string","minLength":1,"maxLength":200},"spec":{"type":"object"},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/crawlers":{"get":{"summary":"List crawlers","tags":["Crawlers"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":["string","null"]},"config":{"type":["object","null"]},"schedule":{"type":["object","null"]},"latest_job_id":{"type":["string","null"],"format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create crawler","tags":["Crawlers"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":["string","null"]},"config":{"type":["object","null"]},"schedule":{"type":["object","null"]},"latest_job_id":{"type":["string","null"],"format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","url"],"properties":{"name":{"type":"string","minLength":1,"maxLength":500},"url":{"type":["string","null"]},"config":{"type":["object","null"]},"schedule":{"type":["object","null"]},"state":{"type":"integer","enum":[0,40,45,90,100,110]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/crawlers/{id}":{"get":{"summary":"Get crawler","tags":["Crawlers"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"url":{"type":["string","null"]},"config":{"type":["object","null"]},"schedule":{"type":["object","null"]},"latest_job_id":{"type":["string","null"],"format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Update crawler","tags":["Crawlers"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"url":{"type":["string","null"]},"config":{"type":["object","null"]},"schedule":{"type":["object","null"]},"state":{"type":"integer","enum":[0,40,45,90,100,110]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update crawler","tags":["Crawlers"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"url":{"type":["string","null"]},"config":{"type":["object","null"]},"schedule":{"type":["object","null"]},"state":{"type":"integer","enum":[0,40,45,90,100,110]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete crawler","tags":["Crawlers"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/crawlers/{crawler_id}/jobs":{"get":{"summary":"List crawler jobs","tags":["Crawler Jobs"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","crawler_id"],"properties":{"id":{"type":"string","format":"uuid"},"crawler_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"meta":{"type":["object","null"]},"error":{"type":["object","null"]},"id_in_queue":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts_start":{"type":["string","null"],"format":"date-time"},"ts_end":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"crawler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Start on-demand crawler job","tags":["Crawler Jobs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","crawler_id"],"properties":{"id":{"type":"string","format":"uuid"},"crawler_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"meta":{"type":["object","null"]},"error":{"type":["object","null"]},"id_in_queue":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts_start":{"type":["string","null"],"format":"date-time"},"ts_end":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"crawler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/crawlers/{crawler_id}/jobs/{id}":{"get":{"summary":"Get crawler job","tags":["Crawler Jobs"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","crawler_id"],"properties":{"id":{"type":"string","format":"uuid"},"crawler_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"meta":{"type":["object","null"]},"error":{"type":["object","null"]},"id_in_queue":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts_start":{"type":["string","null"],"format":"date-time"},"ts_end":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"crawler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieves/{sieve_id}/snapshots/{id}":{"get":{"summary":"Get sieve snapshot","tags":["Sieve Snapshots"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["id","sieve_id"],"properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"work_id":{"type":["string","null"],"format":"uuid"},"uri":{"type":["string","null"]},"content":{"type":["string","null"]},"content_type":{"type":["string","null"]},"recording_uri":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"macro_details":{}},"additionalProperties":true},{"type":"object","required":["content"],"properties":{"content":{"type":"string"}},"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"sieve_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/crawlers/{crawler_id}/jobs/{id}/terminate":{"post":{"summary":"Terminate active crawler job","tags":["Crawler Jobs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"crawler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/crawlers/{crawler_id}/jobs/{id}/retry":{"post":{"summary":"Retry a failed crawler job","tags":["Crawler Jobs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"crawler_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/proxies/region":{"post":{"summary":"Resolve best region proxy for a URL","tags":["Proxies"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"gateway":{"type":"string"},"region":{"type":["string","null"]},"tags":{"type":["string","null"]},"cost":{"type":["integer","null"]},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/datasources/search":{"get":{"summary":"Search datasources and categories","tags":["Datasources"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","type"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"state":{"type":"integer"},"type":{"type":"string","enum":["datasource","category"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/datasources/categories/{id}":{"put":{"summary":"Update datasource category","tags":["Datasources"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"state":{"type":"integer","enum":[0,40,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update datasource category","tags":["Datasources"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"state":{"type":"integer","enum":[0,40,100]},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/datasources/{id}/fetch":{"get":{"summary":"Fetch datasource preview (GET)","tags":["Datasources"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Fetch datasource preview (POST)","tags":["Datasources"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uri"],"properties":{"uri":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs":{"get":{"summary":"List orgs user belongs to","tags":["Orgs"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create new organization","tags":["Orgs"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}":{"get":{"summary":"Get organization profile","tags":["Orgs"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"domains":{"type":["array","null"],"items":{"type":"string"}},"prefs":{"type":"object"},"user_id":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Update organization profile","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"prefs":{"type":"object"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/prefs/{key}":{"get":{"summary":"Get org preference by key","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"not":{"type":"null"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"put":{"summary":"Set org preference by key","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"not":{"type":"null"}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/users":{"get":{"summary":"List the org directory for members","tags":["Orgs"],"description":"Auth: Enterprise — Enterprise plan account.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"full_name":{"type":["string","null"]},"email":{"type":"string"}},"required":["id","email"],"additionalProperties":false}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/members":{"get":{"summary":"List org members","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identity_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"full_name":{"type":"string"},"email":{"type":"string"},"email_state":{"type":"integer"},"role":{"type":"string"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"required":["identity_id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Add member to org","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user"],"properties":{"user":{"type":"object","required":["email","role"],"properties":{"email":{"type":"string","format":"email"},"full_name":{"type":"string","maxLength":200},"role":{"type":"string","enum":["admin","user"]}},"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"admin":{"type":"boolean"},"edit":{"type":"boolean"}},"additionalProperties":false}}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/members/{identity_id}":{"get":{"summary":"Get org member","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identity_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"full_name":{"type":"string"},"email":{"type":"string"},"email_state":{"type":"integer"},"role":{"type":"string"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"required":["identity_id"],"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Remove member from org","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/members/{identity_id}/role":{"patch":{"summary":"Update org member role","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["admin","user"]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces":{"get":{"summary":"List org workspaces","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"prefs":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"users":{"type":"array"}},"required":["id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces/{workspace_id}":{"get":{"summary":"Get org workspace","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"prefs":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"users":{"type":"array"}},"required":["id"],"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Update org workspace","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"prefs":{"type":"object"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Delete org workspace","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces/{workspace_id}/sieves":{"get":{"summary":"List sieves of an org workspace (admin export)","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"rule_id":{"type":["string","null"],"format":"uuid"},"uri":{"type":["string","null"]},"content_type":{"type":"integer"},"config":{"type":["string","null"]},"schedule":{"type":["string","null"]},"state":{"type":"integer"},"tags":{"type":["string","null"]},"text":{"type":["string","null"]},"err":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"ts_data":{"type":["string","null"]},"ts_view":{"type":["string","null"]},"session_id":{"type":["string","null"],"format":"uuid"},"ts_mod":{"type":"string","format":"date-time"},"proxy_id":{"type":["string","null"],"format":"uuid"},"macro_id":{"type":["string","null"],"format":"uuid"},"meta":{"type":["object","null"]},"datasource_id":{"type":["string","null"],"format":"uuid"},"crawler_id":{"type":["string","null"],"format":"uuid"},"prefs":{"type":["object","null"]},"workspace_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces/{workspace_id}/tags":{"get":{"summary":"List tags of an org workspace (admin export)","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","state","ts","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"workspace_id":{"type":"string","format":"uuid"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces/{workspace_id}/members":{"get":{"summary":"List workspace members (admin)","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identity_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"permissions":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}}},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["identity_id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Add member to workspace (admin)","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identity_id"],"properties":{"identity_id":{"type":"string","format":"uuid"},"admin":{"type":"boolean"},"edit":{"type":"boolean","default":true}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces/{workspace_id}/members/{identity_id}/permissions":{"patch":{"summary":"Update workspace member permissions","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/workspaces/{workspace_id}/members/{identity_id}":{"delete":{"summary":"Remove workspace member (admin)","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/teams":{"get":{"summary":"List teams","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"org_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create team","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"org_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/teams/{id}":{"get":{"summary":"Get team","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"org_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Update team","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete team","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/teams/{team_id}/members":{"get":{"summary":"List team members","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Add member to team","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/teams/{team_id}/members/{identity_id}":{"delete":{"summary":"Remove member from team","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/teams/{team_id}/workspaces":{"get":{"summary":"List team workspace grants","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identity_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"permissions":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}}},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["identity_id","workspace_id"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/teams/{team_id}/workspaces/{workspace_id}":{"put":{"summary":"Set team workspace grant","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"admin":{"type":"boolean"},"edit":{"type":"boolean"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Remove team workspace grant","tags":["Orgs"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/password/present":{"get":{"summary":"Check if user has a password set","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["present"],"properties":{"present":{"type":"boolean"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/password/change":{"post":{"summary":"Change user password","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/change-primary":{"patch":{"summary":"Change primary email address","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/access/keys":{"get":{"summary":"List your API access keys","tags":["Users"],"description":"Auth: Enterprise — Enterprise plan account.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","user_id","state","ts","key_hint"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"user_id":{"type":"string","format":"uuid"},"key_hint":{"type":"string"},"state":{"type":"integer"},"ts_used":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create an API access key","tags":["Users"],"description":"Auth: Enterprise — Enterprise plan account.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","name","user_id","private_key","state","ts"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"user_id":{"type":"string","format":"uuid"},"private_key":{"type":"string"},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/access/keys/{id}":{"patch":{"summary":"Disable or enable your API access key","tags":["Users"],"description":"Auth: Enterprise — Enterprise plan account.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["state"],"properties":{"state":{"type":"integer","enum":[40,45]}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Delete your API access key","tags":["Users"],"description":"Auth: Enterprise — Enterprise plan account.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/attrs":{"get":{"summary":"List workspace attrs","tags":["Attrs"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","workspace_id","name","value","state","ts_mod","ts"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"value":{"type":"string"},"state":{"type":"integer"},"prefs":{"type":["object","null"]},"ts_exp":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"ts":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create workspace attr","tags":["Attrs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","workspace_id","name","value","state","ts_mod","ts"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"value":{"type":"string"},"state":{"type":"integer"},"prefs":{"type":["object","null"]},"ts_exp":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"},"ts":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"ts_exp":{"type":["string","null"],"format":"date-time"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/attrs/{id}":{"put":{"summary":"Update workspace attr","tags":["Attrs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"},"prefs":{"type":["object","null"]},"ts_exp":{"type":["string","null"],"format":"date-time"},"ts_mod":{"type":["string","null"],"format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"delete":{"summary":"Soft-delete workspace attr","tags":["Attrs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/attrs/{id}/send-verification":{"post":{"summary":"Trigger attr verification","tags":["Attrs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/usage/daily":{"get":{"summary":"List daily usage stats","tags":["Usage"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","workspace_id","ts_day","run","ts"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"ts_day":{"type":"string","format":"date-time"},"run":{"type":"integer"},"email":{"type":"integer"},"sms":{"type":"integer"},"action":{"type":"integer"},"push":{"type":"integer"},"action_macro":{"type":"integer"},"tokens":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/usage/monthly":{"get":{"summary":"List monthly usage stats","tags":["Usage"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","workspace_id","ts_month","run","ts"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"ts_month":{"type":"string","format":"date-time"},"run":{"type":"integer"},"email":{"type":"integer"},"sms":{"type":"integer"},"action":{"type":"integer"},"push":{"type":"integer"},"action_macro":{"type":"integer"},"tokens":{"type":"integer"},"item":{"type":"integer"},"message_status":{"type":["object","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/usage":{"get":{"summary":"List the current month's usage for the workspace","tags":["Usage"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","workspace_id","ts_month","run","ts"],"properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"owner_id":{"type":["string","null"],"format":"uuid"},"ts_month":{"type":"string","format":"date-time"},"run":{"type":"integer"},"email":{"type":"integer"},"sms":{"type":"integer"},"action":{"type":"integer"},"push":{"type":"integer"},"action_macro":{"type":"integer"},"tokens":{"type":"integer"},"item":{"type":"integer"},"message_status":{"type":["object","null"]},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/usage-left/{action_name}":{"get":{"summary":"Get remaining quota for action","tags":["Usage"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["flexi"],"properties":{"flexi":{"type":"boolean"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"action_name","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieve-count":{"get":{"summary":"Get sieve count and limit","tags":["Usage"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["count","limit","isFlexi"],"properties":{"count":{"type":"integer"},"limit":{"type":"integer"},"isFlexi":{"type":"boolean"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieve-access/{content_type}":{"get":{"summary":"Check content type access","tags":["Usage"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["hasAccess"],"properties":{"hasAccess":{"type":"boolean"},"content_type":{"type":"string"},"minPlan":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"content_type","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/sieve-data":{"get":{"summary":"List recent sieve data (feed)","tags":["Sieve Data"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"data_type":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"name":{"type":"string"},"client_id":{"type":"string","format":"uuid"},"meta":{},"triggered":{},"summary":{},"uri":{"type":"string"},"tags":{},"text":{}},"required":["id","sieve_id","ts"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/releases":{"post":{"summary":"Create/upsert release notes","tags":["Releases"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string","minLength":1},"notes":{"type":"string"},"type":{"type":"integer"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["version"],"additionalProperties":false},"minItems":1}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/availability/email":{"post":{"summary":"Check email availability","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["available"],"properties":{"available":{"type":"boolean"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"],"additionalProperties":false}}}},"security":[]}},"/availability/name":{"post":{"summary":"Check username availability","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["available"],"properties":{"available":{"type":"boolean"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"],"additionalProperties":false}}}},"security":[]}},"/password/forgot":{"post":{"summary":"Start password reset","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"security":[]}},"/password/reset":{"post":{"summary":"Complete password reset","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"password":{"type":"string","minLength":8,"maxLength":128}},"required":["code","password"],"additionalProperties":false}}}},"security":[]}},"/attrs/{attr_id}/verify/{code}":{"post":{"summary":"Verify workspace attribute","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"attr_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"security":[]}},"/client-token":{"post":{"summary":"Issue client token","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["token","user_id"],"properties":{"token":{"type":"string"},"user_id":{"type":"string","format":"uuid"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"password":{"type":"string","minLength":1,"maxLength":128},"oauth_code":{"type":"string","minLength":1,"maxLength":128},"v1_token":{"type":"string","minLength":1,"maxLength":255},"email_auth_token":{"type":"string","minLength":1,"maxLength":255},"client":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"integer"},"name":{"type":"string","maxLength":255},"info":{"type":"string","maxLength":255},"user_id":{"type":"string","format":"uuid"},"props":{"type":"object","properties":{"os":{"type":"string"},"os_version":{"type":"string"},"model":{"type":"string"},"device_name":{"type":"string"},"build_version":{"type":"string"}},"additionalProperties":true}},"required":["id"],"additionalProperties":false}},"required":["client"],"additionalProperties":false}}}},"security":[]}},"/unsubscribe/email/type":{"get":{"summary":"Get email unsubscribe context","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"integer"},"sieve_name":{"type":"string"},"identity_name":{"type":"string"}},"additionalProperties":false}}}}},"security":[]}},"/unsubscribe/email":{"post":{"summary":"Process email unsubscribe","tags":["Public Auth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[]}},"/bbx/instances":{"post":{"summary":"Create BBX instance","tags":["BBX"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","host","key","connectionString","basePath","url","persistent","cdpUrl"],"properties":{"id":{"type":"string"},"host":{"type":"string"},"key":{"type":"string"},"connectionString":{"type":"string"},"basePath":{"type":"string"},"url":{"type":"string"},"persistent":{"type":"boolean"},"cdpUrl":{"type":"string"},"proxyId":{"type":["string","null"]}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"persistent":{"type":"boolean","default":false}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/bbx/instances/{id}":{"delete":{"summary":"Delete BBX instance","tags":["BBX"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/bbx/instances/{id}/proxy":{"put":{"summary":"Set BBX instance proxy","tags":["BBX"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"grade":{"type":"integer"},"parent_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proxy_id":{"type":["string","null"],"format":"uuid"},"onlyRotate":{"type":"boolean","default":false}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Update BBX instance proxy","tags":["BBX"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"grade":{"type":"integer"},"parent_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proxy_id":{"type":["string","null"],"format":"uuid"},"onlyRotate":{"type":"boolean","default":false}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/agents/{action_type}/{name}":{"post":{"summary":"Dispatch an agent action; only email is served","tags":["Agents"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"action_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","sieve","sieve_data"],"properties":{"action":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"integer"},"config":{"type":"object","properties":{"email":{"type":"string","format":"email"},"subject":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"sieve":{"type":"object","required":["id","name","uri"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"uri":{"type":"string"},"ts":{"type":"string"},"text":{"type":["string","null"]},"tags":{"type":["string","null"]}},"additionalProperties":false},"sieve_data":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"text":{"type":["string","null"]},"data":{"type":["string","null"]},"ts":{"type":"string"},"data_type":{"type":"integer"}},"additionalProperties":false},"emailContent":{"type":"string"},"hasDiff":{"type":"boolean"},"matchContext":{},"logData":{"type":"object"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/pagedb/workflows/{path}":{"get":{"summary":"Proxy a PageDB workflow","tags":["PageDB"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/pagedb/validators":{"get":{"summary":"Proxy PageDB validators","tags":["PageDB"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/llm-logs":{"post":{"summary":"Record LLM usage log entry","tags":["LLM Logs"],"description":"Auth: Write — Workspace member with write access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts"],"properties":{"id":{"type":"string","format":"uuid"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","task"],"properties":{"model":{"type":"string","minLength":1},"task":{"type":"string","minLength":1},"session_id":{"type":["string","null"]},"duration":{"type":["number","null"],"minimum":0},"retry":{"type":["integer","null"],"minimum":0},"error":{"type":["object","null"]},"usage":{"type":["object","null"],"required":["inputTokens","outputTokens","totalTokens","cachedInputTokens"],"properties":{"inputTokens":{"type":"number","minimum":0},"outputTokens":{"type":"number","minimum":0},"cachedInputTokens":{"type":"number","minimum":0},"cacheCreationInputTokens":{"type":"number","minimum":0},"totalTokens":{"type":"number","minimum":0},"reasoningTokens":{"type":"number","minimum":0},"providerUsage":{"type":"object"}},"additionalProperties":false},"meta":{"type":["object","null"],"properties":{"user_id":{"type":"string","format":"uuid"},"macro_id":{"type":"string","format":"uuid"},"sieve_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":"string","format":"uuid"},"run_id":{"type":"string"}}}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/public/releases":{"get":{"summary":"List public release notes","tags":["Releases"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"version":{"type":"string"},"notes":{"type":"string"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["version","ts"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"security":[]}},"/public/clients":{"post":{"summary":"Register or update a public client","tags":["Public Clients"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"},"type":{"type":"integer"},"name":{"type":"string"},"is_worker":{"type":"boolean"},"version":{"type":"string"},"messages_state":{"type":"object"},"props":{"type":"object"},"device_token":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"}},"required":["id","ts_mod"],"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"integer"},"name":{"type":"string","minLength":1},"is_worker":{"type":"boolean"},"props":{"type":"object","properties":{"os":{"type":"string"},"os_version":{"type":"string"},"model":{"type":"string"},"device_name":{"type":"string"},"build_version":{"type":"string"}},"additionalProperties":true},"device_token":{"type":["string","null"]}},"additionalProperties":false}}}},"security":[]}},"/public/clients/messages":{"get":{"summary":"List public client messages","tags":["Public Clients"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ts":{"type":"string","format":"date-time"},"type":{"type":"integer"},"actions":{"type":"array"},"body":{"type":"string"},"flash":{"type":"boolean"},"level":{"type":"string"},"title":{"type":"string"}},"required":["id","ts","type","actions","body","flash","level","title"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"security":[]}},"/public/clients/messages/{id}":{"delete":{"summary":"Dismiss public client message","tags":["Public Clients"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[]}},"/public/feature-flags":{"get":{"summary":"List feature flags","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"value":{"type":"string"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","name","value","ts","ts_mod"],"additionalProperties":false}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"security":[]}},"/public/feature-flags/{id}":{"get":{"summary":"Get feature flag","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"value":{"type":"string"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","name","value","ts","ts_mod"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[]}},"/public/forms":{"get":{"summary":"List public forms","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"integer"},"name":{"type":"string"},"description":{"type":["string","null"]},"meta":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["name","state"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"security":[]}},"/public/forms/{id}":{"get":{"summary":"Get public form","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"integer"},"name":{"type":"string"},"description":{"type":["string","null"]},"meta":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["name","state"],"additionalProperties":true}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[]}},"/public/forms/{form_id}/slots":{"post":{"summary":"Claim a daily display slot for a feedback form","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["granted"],"properties":{"granted":{"type":"boolean"},"message_variant":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[]}},"/public/forms/{form_id}/submissions":{"get":{"summary":"List public form submissions for current user","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"form_id":{"type":"string"},"user_id":{"type":["string","null"],"format":"uuid"},"params":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","form_id","params","ts","ts_mod"],"additionalProperties":false}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[]},"post":{"summary":"Create public form submission","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"form_id":{"type":"string"},"user_id":{"type":["string","null"],"format":"uuid"},"params":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","form_id","params","ts","ts_mod"],"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"params":{}},"required":["params"],"additionalProperties":false}}}},"security":[]}},"/public/products":{"get":{"summary":"List public products","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"state":{"type":"integer"},"app_url":{"type":"string"},"image_url":{"type":"string"},"meta":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","name","description","state","app_url","image_url","meta","ts","ts_mod"],"additionalProperties":false}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"security":[]}},"/public/products/{id}":{"get":{"summary":"Get public product","tags":["Public Metadata"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"state":{"type":"integer"},"app_url":{"type":"string"},"image_url":{"type":"string"},"meta":{},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","name","description","state","app_url","image_url","meta","ts","ts_mod"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[]}},"/auth-token/save-nonce-token":{"post":{"summary":"Save nonce token for auth handshake","tags":["Auth Token"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nonce":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"shortLivedToken":{"type":"string"}},"required":["nonce","clientId"],"additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/public/auth-token/poll-client-details":{"get":{"summary":"Poll for client details by nonce","tags":["Auth Token"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[]}},"/public/auth-token/login-using-token":{"get":{"summary":"Login using short-lived token","tags":["Auth Token"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"security":[]}},"/oauth":{"post":{"summary":"Register/login with OAuth provider","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/oauth/google":{"post":{"summary":"Register with Google OAuth","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/oauth/apple":{"post":{"summary":"Register with Apple OAuth","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/oauth/signin":{"post":{"summary":"Sign in with OAuth provider","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/oauth/google/signin":{"post":{"summary":"Sign in with Google OAuth","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/oauth/apple/signin":{"post":{"summary":"Sign in with Apple OAuth","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/oauth/users/auth_token":{"post":{"summary":"Create auth token from OAuth entry","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/login/oauth":{"post":{"summary":"Legacy OAuth session login helper","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/register/oauth":{"post":{"summary":"Legacy OAuth registration helper","tags":["OAuth"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/apple/iap/events":{"post":{"summary":"Handle Apple IAP server notifications","tags":["Apple IAP"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/apple/iap/verify-receipt":{"post":{"summary":"Verify Apple receipt","tags":["Apple IAP"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[]}},"/apple/iap/subscriptions":{"post":{"summary":"Create Apple Pay subscription mapping","tags":["Apple IAP"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/apple/iap/subscriptions/{id}":{"put":{"summary":"Update Apple Pay subscription mapping","tags":["Apple IAP"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partial update Apple Pay subscription mapping","tags":["Apple IAP"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/apple/iap/subscriptions/transaction-id":{"put":{"summary":"Map Apple receipt to transaction ids","tags":["Apple IAP"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"patch":{"summary":"Partially map Apple receipt to transaction ids","tags":["Apple IAP"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/apple/iap/free-trial/eligibility":{"post":{"summary":"Check Apple IAP free-trial eligibility","tags":["Apple IAP"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/jobs":{"get":{"summary":"List jobs","tags":["Jobs"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"job_id":{"type":"string"},"type":{"type":"string"},"category":{"type":"string"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"sieve_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":"string","format":"uuid"},"err":{},"sieve_name":{"type":"string"}},"required":["id","ts"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/jobs/{id}":{"get":{"summary":"Get job by id","tags":["Jobs"],"description":"Auth: Read — Workspace member with read access or higher.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"job_id":{"type":"string"},"type":{"type":"string"},"category":{"type":"string"},"state":{"type":"integer"},"ts":{"type":"string","format":"date-time"},"sieve_id":{"type":"string","format":"uuid"},"sieve_data_id":{"type":"string","format":"uuid"},"err":{},"sieve_name":{"type":"string"}},"required":["id","ts"],"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/messages":{"get":{"summary":"List user messages","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ts":{"type":"string","format":"date-time"},"type":{"type":"integer"},"data":{},"actions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"link":{"type":"string"}}}},"body":{"type":"string"},"flash":{"type":"boolean"},"level":{"type":"string"},"title":{"type":"string"}},"required":["id","ts","type","title","body","level"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/messages/{id}":{"delete":{"summary":"Mark user message as viewed","tags":["Users"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ts_viewed":{"type":"string","format":"date-time"}},"required":["id","ts_viewed"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/page-types":{"get":{"summary":"List page types","tags":["Page Types"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"domain_name":{"type":"string"},"match_type":{"type":"string"},"regex":{"type":"string"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","name","domain_name","regex","ts"],"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create page type","tags":["Page Types"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"domain_name":{"type":"string"},"match_type":{"type":"string"},"regex":{"type":"string"},"ts":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"}},"required":["id","name","domain_name","regex","ts"],"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain_name":{"type":"string","minLength":1},"match_type":{"type":"string","enum":["regex","exact"]},"regex":{"type":"string","minLength":1},"ts":{"type":"string","format":"date-time"}},"required":["name","domain_name","regex"],"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/page-types/{id}":{"put":{"summary":"Update page type","tags":["Page Types"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","ts_mod"],"properties":{"id":{"type":"string","format":"uuid"},"ts_mod":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain_name":{"type":"string","minLength":1},"match_type":{"type":"string","enum":["regex","exact"]},"regex":{"type":"string","minLength":1},"ts":{"type":"string","format":"date-time"}},"minProperties":1,"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/public/plans":{"get":{"summary":"List available plans","tags":["Plans"],"description":"Auth: Public — No authentication required.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","price","state"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"price":{"type":"integer"},"interval":{"type":"integer"},"item":{"type":"integer"},"run":{"type":"integer"},"email":{"type":"integer"},"sms":{"type":"integer"},"device":{"type":"integer"},"sync":{"type":"string"},"flexi":{"type":"boolean"},"state":{"type":"integer"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"},"action":{"type":"integer"},"push":{"type":"integer"},"history":{"type":"integer"},"sieve":{"type":"integer"},"workers":{"type":"integer"},"yearly_discount":{"type":"string"},"ios_ids":{"type":["object","null"],"properties":{"iap":{"type":"object","properties":{"monthly":{"type":"string"},"yearly":{"type":"string"},"free_trial":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"duration":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"platforms":{"type":"array","items":{"type":"string"}},"credits":{"type":"integer"},"concurrency":{"type":"integer"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}},"security":[]}},"/self/cards":{"get":{"summary":"List payment cards","tags":["Billing"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","has_more"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","brand","last4","exp_month","exp_year"],"properties":{"id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"exp_month":{"type":"integer"},"exp_year":{"type":"integer"}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Add payment card","tags":["Billing"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","brand","last4","exp_month","exp_year"],"properties":{"id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"exp_month":{"type":"integer"},"exp_year":{"type":"integer"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["stripe_token"],"properties":{"stripe_token":{"type":"string"}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/cards/{id}":{"delete":{"summary":"Remove payment card","tags":["Billing"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/credit":{"post":{"summary":"Add account credit","tags":["Billing"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"integer","minimum":2000,"maximum":100000}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions":{"get":{"summary":"List subscriptions","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","owner_id","plan_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"price":{"type":"integer"},"state":{"type":"integer"},"gateway":{"type":["string","null"]},"apple_pay_subscription_id":{"type":["string","null"],"format":"uuid"},"is_free_trial":{"type":"boolean"},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create subscription","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","owner_id","plan_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"price":{"type":"integer"},"state":{"type":"integer"},"gateway":{"type":["string","null"]},"apple_pay_subscription_id":{"type":["string","null"],"format":"uuid"},"is_free_trial":{"type":"boolean"},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subscription"],"properties":{"subscription":{"type":"object","required":["plan_id","gateway"],"properties":{"plan_id":{"type":"string","format":"uuid"},"gateway":{"type":"string"},"quantity":{"type":"integer","minimum":1},"period":{"type":"integer","minimum":1,"maximum":36}},"additionalProperties":true},"apple_pay":{"type":"object","properties":{"transaction_id":{"type":"string","minLength":1},"original_transaction_id":{"type":"string","minLength":1},"receipt_data":{"type":"string","minLength":1},"auto_renew_product_id":{"type":"string"},"environment":{"type":"string"}},"additionalProperties":true}},"if":{"properties":{"subscription":{"type":"object","properties":{"gateway":{"const":"apple_pay"}},"required":["gateway"]}}},"then":{"required":["subscription","apple_pay"],"properties":{"subscription":{"type":"object","required":["ts_start","ts_end"],"properties":{"ts_start":{"type":"integer"},"ts_end":{"type":"integer"},"period":{"enum":[1,12]}}},"apple_pay":{"type":"object","required":["transaction_id","original_transaction_id","receipt_data"]}}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions/{id}":{"get":{"summary":"Get subscription detail","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","owner_id","plan_id"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"gateway":{"type":["string","null"]},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions/cancel":{"post":{"summary":"Cancel subscription renewal","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions/reactivate":{"post":{"summary":"Reactivate subscription renewal","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions/renew":{"post":{"summary":"Retry failed subscription renewal","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions/freetrial/eligibility":{"get":{"summary":"Check free trial eligibility","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/self/subscriptions/freetrial":{"post":{"summary":"Start free trial","tags":["Subscriptions"],"description":"Auth: Auth — Any authenticated user.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","required":["id","owner_id","plan_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"price":{"type":"integer"},"state":{"type":"integer"},"gateway":{"type":["string","null"]},"apple_pay_subscription_id":{"type":["string","null"],"format":"uuid"},"is_free_trial":{"type":"boolean"},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions":{"get":{"summary":"List org subscriptions","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","total_count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","owner_id","plan_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"price":{"type":"integer"},"state":{"type":"integer"},"gateway":{"type":["string","null"]},"apple_pay_subscription_id":{"type":["string","null"],"format":"uuid"},"is_free_trial":{"type":"boolean"},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}},"total_count":{"type":"integer","minimum":0},"count":{"type":"integer","minimum":0},"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]},"post":{"summary":"Create org subscription","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","owner_id","plan_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"price":{"type":"integer"},"state":{"type":"integer"},"gateway":{"type":["string","null"]},"apple_pay_subscription_id":{"type":["string","null"],"format":"uuid"},"is_free_trial":{"type":"boolean"},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subscription"],"properties":{"subscription":{"type":"object","required":["plan_id","gateway"],"properties":{"plan_id":{"type":"string","format":"uuid"},"gateway":{"type":"string"},"quantity":{"type":"integer","minimum":1},"period":{"type":"integer","minimum":1,"maximum":36}},"additionalProperties":true},"apple_pay":{"type":"object","properties":{"transaction_id":{"type":"string","minLength":1},"original_transaction_id":{"type":"string","minLength":1},"receipt_data":{"type":"string","minLength":1},"auto_renew_product_id":{"type":"string"},"environment":{"type":"string"}},"additionalProperties":true}},"if":{"properties":{"subscription":{"type":"object","properties":{"gateway":{"const":"apple_pay"}},"required":["gateway"]}}},"then":{"required":["subscription","apple_pay"],"properties":{"subscription":{"type":"object","required":["ts_start","ts_end"],"properties":{"ts_start":{"type":"integer"},"ts_end":{"type":"integer"},"period":{"enum":[1,12]}}},"apple_pay":{"type":"object","required":["transaction_id","original_transaction_id","receipt_data"]}}},"additionalProperties":false}}}},"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions/{id}":{"get":{"summary":"Get org subscription detail","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["id","owner_id","plan_id"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"gateway":{"type":["string","null"]},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions/cancel":{"post":{"summary":"Cancel org subscription renewal","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions/reactivate":{"post":{"summary":"Reactivate org subscription renewal","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions/renew":{"post":{"summary":"Retry failed org subscription renewal","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions/freetrial/eligibility":{"get":{"summary":"Check org free trial eligibility","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}},"/orgs/{org_id}/subscriptions/freetrial":{"post":{"summary":"Start org free trial","tags":["Subscriptions"],"description":"Auth: Enterprise+Admin — Enterprise plan account with admin role on the workspace.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","required":["id","owner_id","plan_id","state"],"properties":{"id":{"type":"string","format":"uuid"},"owner_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"quantity":{"type":"integer"},"charge_id":{"type":["string","null"],"format":"uuid"},"renew":{"type":"boolean"},"period":{"type":"integer"},"price":{"type":"integer"},"state":{"type":"integer"},"gateway":{"type":["string","null"]},"apple_pay_subscription_id":{"type":["string","null"],"format":"uuid"},"is_free_trial":{"type":"boolean"},"ts_start":{"type":"string","format":"date-time"},"ts_end":{"type":"string","format":"date-time"},"ts_mod":{"type":"string","format":"date-time"},"ts":{"type":"string","format":"date-time"}},"additionalProperties":true}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}}}}},"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"security":[{"cookieAuth":[]},{"bearerAuth":[]},{"apiKeyQuery":[]}]}}}}