{"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/":{"get":{"tags":["Domains"],"description":"List registered domains for a team or organization. Unmanaged domains are included with `managed: false`; only managed domains can be deleted through this API.","parameters":[{"schema":{"type":"string"},"in":"query","name":"team_id","required":false,"description":"Restrict to one team. Required scope aside, the team must belong to the token's organization."},{"schema":{"type":"string"},"in":"query","name":"domain","required":false,"description":"Exact hostname to look up"},{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Page size, 1 to 100 (default 50)"},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's next_cursor"}],"responses":{"200":{"description":"Domains matching the query.","content":{"application/json":{"schema":{"description":"Domains matching the query.","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"teamId":{"type":"string"},"managed":{"type":"boolean"},"wildcard":{"type":"boolean"},"suspended":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","domain","teamId","managed","wildcard","suspended","createdAt"]}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}}},"400":{"description":"Invalid query parameters or cursor.","content":{"application/json":{"schema":{"description":"Invalid query parameters or cursor.","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, enterprise plan required, or organization suspended.","content":{"application/json":{"schema":{"description":"Insufficient scope, enterprise plan required, or organization suspended.","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.","content":{"application/json":{"schema":{"description":"Rate limit store unavailable.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}},"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/":{"get":{"tags":["Teams"],"description":"List teams in the organization, or look one up by exact name. Suspended teams are included, matching the POST conflict check.","parameters":[{"schema":{"type":"string"},"in":"query","name":"name","required":false,"description":"Exact team name to look up, compared the same way POST does"},{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Page size, 1 to 100 (default 50)"},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's next_cursor"}],"responses":{"200":{"description":"Teams matching the query.","content":{"application/json":{"schema":{"description":"Teams matching the query.","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"suspended":{"type":"boolean"}},"required":["id","name","createdAt","suspended"]}},"next_cursor":{"type":"string","nullable":true}},"required":["data","next_cursor"]}}}},"400":{"description":"Invalid query parameters or cursor.","content":{"application/json":{"schema":{"description":"Invalid query parameters or cursor.","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, enterprise plan required, or organization suspended.","content":{"application/json":{"schema":{"description":"Insufficient scope, enterprise plan required, or organization suspended.","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"]}}}}}},"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. `data.teamId` is the existing team, so create-or-fetch is one round trip.","content":{"application/json":{"schema":{"description":"Team with the same name already exists in this organization. `data.teamId` is the existing team, so create-or-fetch is one round trip.","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"teamId":{"type":"string"}},"required":["teamId"]}},"required":["error","message","data"]}}}},"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":[]}]}