{"openapi":"3.0.0","info":{"title":"cside Public REST API","version":"1.0.0","description":"Public REST API for managing domains, teams, and payment pages on the cside threat detection and web security platform."},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{}},"paths":{"/v1/domains/":{"post":{"tags":["Domains"],"description":"Register managed domains for a team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"description":"List of domain hostnames"},"team_id":{"type":"string","pattern":"^\\d+$","description":"Target team ID (required only for organization-level tokens)"}},"required":["domains"],"additionalProperties":false}}}},"responses":{"200":{"description":"Domains registration result.","content":{"application/json":{"schema":{"description":"Domains registration result.","type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["created","existing","invalid"]},"input":{"type":"string"},"domain":{"type":"string"},"domainId":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["status","input"]}},"totals":{"type":"object","properties":{"created":{"type":"integer"},"existing":{"type":"integer"},"invalid":{"type":"integer"}},"required":["created","existing","invalid"]}},"required":["results","totals"]}},"required":["data"]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"description":"Invalid request body or parameters.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"description":"Missing or invalid bearer token.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"Insufficient scope, suspended tenant, or enterprise plan required.","content":{"application/json":{"schema":{"description":"Insufficient scope, suspended tenant, or enterprise plan required.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"Team not found in this organization.","content":{"application/json":{"schema":{"description":"Team not found in this organization.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"Public API rate limit exceeded.","content":{"application/json":{"schema":{"description":"Public API rate limit exceeded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"Rate limit store unavailable, or the request could not be completed.","content":{"application/json":{"schema":{"description":"Rate limit store unavailable, or the request could not be completed.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}},"delete":{"tags":["Domains"],"description":"Delete registered domains from a team by domain ID (the domainId values returned by POST /v1/domains).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string","pattern":"^\\d+$"},"minItems":1,"maxItems":100,"description":"List of domain IDs (the snowflake domainId values returned by POST /v1/domains)"},"team_id":{"type":"string","pattern":"^\\d+$","description":"Target team ID (required only for organization-level tokens)"}},"required":["domains"],"additionalProperties":false}}}},"responses":{"200":{"description":"Domains deletion result.","content":{"application/json":{"schema":{"description":"Domains deletion result.","type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["deleted","not_found"]},"domainId":{"type":"string"},"domain":{"type":"string","description":"Resolved hostname, present on deleted entries"}},"required":["status","domainId"]}},"totals":{"type":"object","properties":{"deleted":{"type":"integer"},"not_found":{"type":"integer"}},"required":["deleted","not_found"]}},"required":["results","totals"]}},"required":["data"]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"description":"Invalid request body or parameters.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"description":"Missing or invalid bearer token.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"Insufficient scope, suspended tenant, or enterprise plan required.","content":{"application/json":{"schema":{"description":"Insufficient scope, suspended tenant, or enterprise plan required.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"Team not found in this organization.","content":{"application/json":{"schema":{"description":"Team not found in this organization.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"Public API rate limit exceeded.","content":{"application/json":{"schema":{"description":"Public API rate limit exceeded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"Rate limit store unavailable, or the request could not be completed.","content":{"application/json":{"schema":{"description":"Rate limit store unavailable, or the request could not be completed.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/payment-pages/":{"post":{"tags":["Payment Pages"],"description":"Add a payment-page selector to a team using the organization's public API token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$","description":"Target team ID (required only for organization-level tokens)"},"payment_page":{"type":"string","minLength":1,"description":"Canonical payment-page selector in host/path form, without https://"}},"required":["payment_page"],"additionalProperties":false}}}},"responses":{"200":{"description":"Payment page added or already present.","content":{"application/json":{"schema":{"description":"Payment page added or already present.","type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["created","existing"]},"teamId":{"type":"string"},"paymentPage":{"type":"string"}},"required":["status","teamId","paymentPage"]}},"required":["data"]}}}},"400":{"description":"Invalid request body or payment-page selector.","content":{"application/json":{"schema":{"description":"Invalid request body or payment-page selector.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"description":"Missing or invalid bearer token.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"Insufficient scope, suspended tenant, or enterprise plan required.","content":{"application/json":{"schema":{"description":"Insufficient scope, suspended tenant, or enterprise plan required.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"Team not found in this organization.","content":{"application/json":{"schema":{"description":"Team not found in this organization.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"Public API rate limit exceeded.","content":{"application/json":{"schema":{"description":"Public API rate limit exceeded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"Rate limit store or payment-page update unavailable.","content":{"application/json":{"schema":{"description":"Rate limit store or payment-page update unavailable.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/teams/":{"delete":{"tags":["Teams"],"description":"Delete a team and all its domains. Requires teams:delete on an organization token. Teams with an attached Stripe subscription cannot be deleted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"team_id":{"type":"string","pattern":"^\\d+$"}},"required":["team_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["deleted"]},"teamId":{"type":"string"},"deletedDomains":{"type":"integer"}},"required":["status","teamId","deletedDomains"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}},"post":{"tags":["Teams"],"description":"Create a new team under an organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":32,"pattern":"^[\\w\\s'’`]+$"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Team created successfully.","content":{"application/json":{"schema":{"description":"Team created successfully.","type":"object","properties":{"data":{"type":"object","properties":{"teamId":{"type":"string"}},"required":["teamId"]}},"required":["data"]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"description":"Invalid request body or parameters.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"description":"Missing or invalid bearer token.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"403":{"description":"Insufficient scope or enterprise plan required.","content":{"application/json":{"schema":{"description":"Insufficient scope or enterprise plan required.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"409":{"description":"Team with the same name already exists in this organization.","content":{"application/json":{"schema":{"description":"Team with the same name already exists in this organization.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"429":{"description":"Public API rate limit exceeded.","content":{"application/json":{"schema":{"description":"Public API rate limit exceeded.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"Rate limit store unavailable.","content":{"application/json":{"schema":{"description":"Rate limit store unavailable.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}}},"security":[{"bearerAuth":[]}]}