{"components":{"schemas":{"APIError":{"additionalProperties":false,"properties":{"code":{"description":"Stable machine-readable error code","type":"string"},"field":{"description":"Field name for validation errors","type":"string"},"message":{"description":"Human-readable error description","type":"string"}},"required":["code","message"],"type":"object"},"APIErrorEnvelope":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/APIErrorEnvelope.json"],"format":"uri","readOnly":true,"type":"string"},"errors":{"items":{"$ref":"#/components/schemas/APIError"},"type":["array","null"]}},"required":["errors"],"type":"object"},"APIKeyListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/APIKeyListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/APIKeyResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"APIKeyResponse":{"additionalProperties":false,"properties":{"created_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"last_used_at":{"type":["string","null"]},"name":{"type":"string"},"revoked_at":{"type":["string","null"]}},"required":["id","name","is_active","last_used_at","created_at","revoked_at"],"type":"object"},"AcceptInvitationInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/AcceptInvitationInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":200,"type":"string"},"password":{"maxLength":256,"type":"string"}},"type":"object"},"AddDomainInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/AddDomainInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"host":{"description":"Hostname only, no scheme or path","maxLength":253,"minLength":1,"type":"string"}},"required":["host"],"type":"object"},"AgencyClientResponse":{"additionalProperties":false,"properties":{"created_at":{"type":["string","null"]},"critical_incidents":{"format":"int64","type":"integer"},"events_30d":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"members":{"description":"members of the client itself; agency members are not counted","format":"int64","type":"integer"},"name":{"type":"string"},"open_incidents":{"format":"int64","type":"integer"},"sites":{"format":"int64","type":"integer"},"slug":{"type":"string"},"suspended_at":{"type":["string","null"]},"unpublished":{"format":"int64","type":"integer"}},"required":["id","name","slug","created_at","suspended_at","sites","unpublished","open_incidents","critical_incidents","members","events_30d"],"type":"object"},"AgencyClientsOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/AgencyClientsOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"clients":{"items":{"$ref":"#/components/schemas/AgencyClientResponse"},"type":["array","null"]}},"required":["clients"],"type":"object"},"AuthConfigOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/AuthConfigOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"signup":{"type":"boolean"},"turnstile_site_key":{"type":"string"}},"required":["signup"],"type":"object"},"BillingOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/BillingOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"agency":{"description":"set when the organisation is billed through an agency","type":"string"},"cancel_at":{"type":["string","null"]},"enabled":{"type":"boolean"},"frozen":{"description":"publishing is paused until the latest payment goes through","type":"boolean"},"has_customer":{"type":"boolean"},"period_end":{"type":["string","null"]},"purchasable":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":["array","null"]},"status":{"description":"Stripe subscription status","type":"string"}},"required":["enabled","has_customer","period_end","cancel_at","frozen","purchasable"],"type":"object"},"BlockRule":{"additionalProperties":false,"properties":{"category":{"type":"string"},"match":{"type":"string"},"name":{"type":"string"}},"required":["match","category"],"type":"object"},"Blocking":{"additionalProperties":false,"properties":{"allow":{"items":{"type":"string"},"type":["array","null"]},"cookies":{"type":"boolean"},"known_vendors":{"type":"boolean"},"mode":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/BlockRule"},"type":["array","null"]}},"required":["mode","known_vendors"],"type":"object"},"Brand":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/Brand.json"],"format":"uri","readOnly":true,"type":"string"},"color":{"description":"accent colour","pattern":"^#[0-9a-f]{6}$","type":"string"},"logo":{"description":"data:image/png, jpeg, webp or svg+xml, base64","maxLength":200000,"type":"string"},"name":{"maxLength":60,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"BrandingOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/BrandingOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"brand":{"$ref":"#/components/schemas/Brand"}},"required":["brand"],"type":"object"},"BreakdownRow":{"additionalProperties":false,"properties":{"accepted":{"format":"int64","type":"integer"},"custom":{"format":"int64","type":"integer"},"rejected":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"},"value":{"type":"string"}},"required":["value","total","accepted","rejected","custom"],"type":"object"},"Category":{"additionalProperties":false,"properties":{"key":{"type":"string"},"required":{"type":"boolean"}},"required":["key"],"type":"object"},"CategoryText":{"additionalProperties":false,"properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"Change":{"additionalProperties":false,"properties":{"before_consent":{"type":"boolean"},"category":{"type":"string"},"domain":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"}},"required":["kind","name","domain"],"type":"object"},"ChangePasswordInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ChangePasswordInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"current_password":{"maxLength":256,"type":"string"},"new_password":{"maxLength":256,"type":"string"}},"required":["current_password","new_password"],"type":"object"},"Changes":{"additionalProperties":false,"properties":{"added":{"items":{"$ref":"#/components/schemas/Change"},"type":["array","null"]},"previous_scan_id":{"format":"int64","type":"integer"},"removed":{"items":{"$ref":"#/components/schemas/Change"},"type":["array","null"]}},"required":["previous_scan_id","added","removed"],"type":"object"},"CheckoutInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CheckoutInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"plan":{"type":"string"}},"required":["plan"],"type":"object"},"Checks":{"additionalProperties":false,"properties":{"accept_clicked":{"type":"string"},"banner_shown":{"type":"boolean"},"cmp":{"type":"string"},"notice_shown":{"type":"boolean"},"reject_button":{"type":"boolean"},"reject_clicked":{"type":"string"},"script":{"type":"string"},"served_site":{"type":"string"},"served_version":{"format":"int64","type":"integer"}},"required":["banner_shown","notice_shown","reject_button","script","served_version","served_site","accept_clicked","reject_clicked"],"type":"object"},"CodeInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CodeInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"code":{"maxLength":32,"type":"string"}},"required":["code"],"type":"object"},"Compat":{"additionalProperties":false,"properties":{"cookiebot":{"type":"boolean"}},"type":"object"},"CompromiseInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CompromiseInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"since":{"description":"RFC 3339; when the key is believed compromised from. Default now.","type":"string"}},"type":"object"},"ConfigVersionListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ConfigVersionListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/ConfigVersionResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"ConfigVersionOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ConfigVersionOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/ConfigVersionResponse"}},"required":["data"],"type":"object"},"ConfigVersionResponse":{"additionalProperties":false,"properties":{"document":{"$ref":"#/components/schemas/Document"},"document_sha256":{"type":"string"},"policy_version":{"format":"int32","type":"integer"},"published_at":{"type":["string","null"]},"published_by":{"description":"name of the user who published it; empty for API keys","type":"string"},"signing_key_id":{"type":"string"},"version":{"format":"int32","type":"integer"},"warnings":{"items":{"$ref":"#/components/schemas/Finding"},"type":["array","null"]}},"required":["version","policy_version","document_sha256","signing_key_id","published_at"],"type":"object"},"ConsentEventResponse":{"additionalProperties":false,"properties":{"client_reported_at":{"description":"What the browser claimed; recorded, not trusted","type":["string","null"]},"config_version":{"format":"int32","type":"integer"},"consent_id":{"type":"string"},"country":{"type":["string","null"]},"event_id":{"type":"string"},"hash":{"type":"string"},"ip_truncated":{"type":["string","null"]},"locale":{"type":["string","null"]},"method":{"type":"string"},"occurred_at":{"description":"Server receipt time; the authoritative timestamp","type":"string"},"page_url":{"type":["string","null"]},"policy_version":{"format":"int32","type":"integer"},"prev_hash":{"type":"string"},"previous_event_id":{"type":["string","null"]},"purposes":{},"seq":{"format":"int64","type":"integer"},"signature":{"type":"string"},"signing_key_id":{"type":"string"},"user_agent":{"type":["string","null"]},"verified":{"description":"Set on subject lookups: hash recomputed and signature checked","type":"boolean"}},"required":["seq","event_id","consent_id","occurred_at","client_reported_at","method","purposes","config_version","policy_version","page_url","user_agent","locale","country","ip_truncated","previous_event_id","prev_hash","hash","signing_key_id","signature"],"type":"object"},"ConsentSubjectOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ConsentSubjectOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/ConsentEventResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"CreateAPIKeyInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CreateAPIKeyInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"CreateAPIKeyOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CreateAPIKeyOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/CreatedAPIKeyResponse"}},"required":["data"],"type":"object"},"CreateAgencyClientInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CreateAgencyClientInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":120,"type":"string"}},"required":["name"],"type":"object"},"CreateNotificationInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CreateNotificationInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"events":{"items":{"type":"string"},"minItems":1,"type":["array","null"]},"kind":{"enum":["webhook","slack","teams"],"type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"},"url":{"maxLength":2000,"type":"string"}},"required":["kind","name","url","events"],"type":"object"},"CreateOrganizationInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CreateOrganizationInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"slug":{"maxLength":64,"type":"string"}},"required":["name","slug"],"type":"object"},"CreateSiteInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CreateSiteInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"consent_lifetime_days":{"description":"Defaults to 180","format":"int32","maximum":395,"minimum":30,"type":"integer"},"name":{"maxLength":200,"minLength":1,"type":"string"},"retention_months":{"description":"Defaults to 36","enum":[12,24,36],"format":"int32","type":"integer"}},"required":["name"],"type":"object"},"CreatedAPIKeyResponse":{"additionalProperties":false,"properties":{"created_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"is_active":{"type":"boolean"},"key":{"description":"Plaintext key, shown once","type":"string"},"last_used_at":{"type":["string","null"]},"name":{"type":"string"},"revoked_at":{"type":["string","null"]}},"required":["key","id","name","is_active","last_used_at","created_at","revoked_at"],"type":"object"},"CredentialInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/CredentialInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"credential":{"additionalProperties":{},"description":"PublicKeyCredential as JSON (credential.toJSON())","type":"object"}},"required":["credential"],"type":"object"},"DataStruct":{"additionalProperties":false,"properties":{"accepted":{"format":"int64","type":"integer"},"country":{"items":{"$ref":"#/components/schemas/BreakdownRow"},"type":["array","null"]},"country_known":{"type":"boolean"},"custom":{"format":"int64","type":"integer"},"daily":{"items":{"$ref":"#/components/schemas/DayStats"},"type":["array","null"]},"days":{"format":"int64","type":"integer"},"device":{"items":{"$ref":"#/components/schemas/BreakdownRow"},"type":["array","null"]},"other":{"format":"int64","type":"integer"},"rejected":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"},"versions":{"items":{"$ref":"#/components/schemas/VersionStats"},"type":["array","null"]}},"required":["days","daily","total","accepted","rejected","custom","other","country","device","versions","country_known"],"type":"object"},"DayStats":{"additionalProperties":false,"properties":{"accepted":{"format":"int64","type":"integer"},"custom":{"format":"int64","type":"integer"},"day":{"type":"string"},"other":{"format":"int64","type":"integer"},"rejected":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["day","total","accepted","rejected","custom","other"],"type":"object"},"DeclarationLabels":{"additionalProperties":false,"properties":{"day":{"items":{"type":"string"},"type":["array","null"]},"hour":{"items":{"type":"string"},"type":["array","null"]},"last_scanned":{"type":"string"},"name":{"type":"string"},"none_found":{"type":"string"},"persistent":{"type":"string"},"provider":{"type":"string"},"purpose":{"type":"string"},"retention":{"type":"string"},"session":{"type":"string"},"type":{"type":"string"},"types":{"additionalProperties":{"type":"string"},"type":"object"},"unclassified":{"type":"string"},"year":{"items":{"type":"string"},"type":["array","null"]}},"required":["name","provider","purpose","retention","type","types","unclassified","none_found","last_scanned","session","persistent","year","day","hour"],"type":"object"},"DeliveriesOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/DeliveriesOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/NotificationDelivery"},"type":["array","null"]}},"required":["data"],"type":"object"},"Document":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/Document.json"],"format":"uri","readOnly":true,"type":"string"},"blocking":{"$ref":"#/components/schemas/Blocking"},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":["array","null"]},"compat":{"$ref":"#/components/schemas/Compat"},"consent_lifetime_days":{"format":"int32","type":"integer"},"consent_mode":{"type":"boolean"},"default_language":{"type":"string"},"languages":{"items":{"type":"string"},"type":["array","null"]},"policy":{"$ref":"#/components/schemas/Policy"},"policy_version":{"format":"int32","type":"integer"},"regime":{"$ref":"#/components/schemas/Regime"},"signing_key":{"$ref":"#/components/schemas/SigningKey"},"site":{"type":"string"},"texts":{"additionalProperties":{"$ref":"#/components/schemas/Texts"},"type":"object"},"theme":{"$ref":"#/components/schemas/Theme"},"v":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["v","default_language","languages","consent_lifetime_days","categories","texts","theme","policy","consent_mode","regime"],"type":"object"},"DomainListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/DomainListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/DomainResponse"},"type":["array","null"]},"verification_required":{"description":"the plan requires proof of control before the banner is served on a host","type":"boolean"}},"required":["data","verification_required"],"type":"object"},"DomainOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/DomainOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/DomainResponse"}},"required":["data"],"type":"object"},"DomainResponse":{"additionalProperties":false,"properties":{"created_at":{"type":["string","null"]},"host":{"type":"string"},"id":{"format":"int64","type":"integer"},"verification":{"additionalProperties":{"type":"string"},"description":"how to prove control: dns_name/dns_value, meta, file_url/file_body","type":"object"},"verification_method":{"enum":["dns","meta","file",""],"type":"string"},"verified_at":{"type":["string","null"]}},"required":["id","host","verified_at","verification","created_at"],"type":"object"},"Finding":{"additionalProperties":false,"properties":{"authority":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"},"rule":{"type":"string"},"severity":{"type":"string"}},"required":["rule","severity","message","authority"],"type":"object"},"FindingResponse":{"additionalProperties":false,"properties":{"before_consent":{"type":"boolean"},"category":{"description":"null when nothing recognises it","type":["string","null"]},"consent_mode":{"enum":["denied","partial","granted",""],"type":"string"},"covered":{"type":"boolean"},"description":{"type":"string"},"domain":{"type":"string"},"held":{"type":"boolean"},"http_only":{"type":"boolean"},"ignores_reject":{"type":"boolean"},"initiator":{"type":"string"},"issue":{"type":"boolean"},"kind":{"enum":["cookie","local_storage","session_storage","indexed_db","request"],"type":"string"},"lifetime_seconds":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"page_url":{"type":"string"},"phase":{"enum":["before","accept","reject"],"type":"string"},"provider":{"type":"string"},"retention":{"type":"string"},"same_site":{"type":"string"},"secure":{"type":"boolean"},"source":{"enum":["pxl","ocd","vendors",""],"type":"string"},"third_party":{"type":"boolean"},"tracking":{"type":"boolean"}},"required":["kind","name","domain","page_url","third_party","before_consent","phase","http_only","secure","same_site","lifetime_seconds","initiator","category","provider","description","retention","source","issue","covered","ignores_reject","tracking","held"],"type":"object"},"FinishRegistrationInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/FinishRegistrationInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"credential":{"additionalProperties":{},"description":"PublicKeyCredential as JSON (credential.toJSON())","type":"object"},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["name","credential"],"type":"object"},"ForgotPasswordInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ForgotPasswordInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"email":{"maxLength":254,"type":"string"}},"required":["email"],"type":"object"},"IncidentResponse":{"additionalProperties":false,"properties":{"acknowledged_at":{"type":["string","null"]},"details":{"additionalProperties":{},"type":"object"},"escalated_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"last_seen_at":{"type":["string","null"]},"opened_at":{"type":["string","null"]},"resolved_at":{"type":["string","null"]},"severity":{"enum":["warning","critical"],"type":"string"},"site_id":{"format":"int64","type":"integer"},"site_name":{"type":"string"},"status":{"enum":["open","acknowledged","resolved"],"type":"string"},"summary":{"type":"string"}},"required":["id","site_id","site_name","kind","severity","status","summary","details","opened_at","last_seen_at","acknowledged_at","escalated_at","resolved_at"],"type":"object"},"InvitationInfoOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/InvitationInfoOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"brand":{"$ref":"#/components/schemas/Brand"},"email":{"type":"string"},"existing_user":{"type":"boolean"},"organization_name":{"type":"string"},"role":{"type":"string"}},"required":["organization_name","email","role","existing_user"],"type":"object"},"InvitationResponse":{"additionalProperties":false,"properties":{"created_at":{"type":["string","null"]},"email":{"type":"string"},"emailed":{"description":"The invitation was sent by email (only on create)","type":"boolean"},"expires_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"link":{"description":"Only returned when the invitation is created, and only to PXL staff or when no mail is sent","type":"string"},"role":{"type":"string"}},"required":["id","email","role","expires_at","created_at"],"type":"object"},"InviteInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/InviteInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"email":{"maxLength":254,"type":"string"},"role":{"enum":["owner","admin","editor","viewer"],"type":"string"}},"required":["email","role"],"type":"object"},"InviteOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/InviteOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/InvitationResponse"}},"required":["data"],"type":"object"},"Language":{"additionalProperties":false,"properties":{"code":{"type":"string"},"declaration":{"$ref":"#/components/schemas/DeclarationLabels"},"label":{"description":"the language's own name","type":"string"},"texts":{"$ref":"#/components/schemas/Texts","description":"default banner texts"}},"required":["code","label","texts","declaration"],"type":"object"},"LanguagesOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/LanguagesOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/Language"},"type":["array","null"]}},"required":["data"],"type":"object"},"ListConsentEventsOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ListConsentEventsOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/ConsentEventResponse"},"type":["array","null"]},"next_cursor":{"format":"int64","type":["integer","null"]}},"required":["data","next_cursor"],"type":"object"},"ListIncidentsOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ListIncidentsOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/IncidentResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"ListReviewsOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ListReviewsOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/ReviewResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"ListScansOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ListScansOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/ScanResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"ListTemplatesOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ListTemplatesOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/TemplateResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"LogFinding":{"additionalProperties":false,"properties":{"code":{"type":"string"},"date":{"type":"string"},"message":{"type":"string"},"seq":{"format":"int64","minimum":0,"type":"integer"},"severity":{"enum":["info","error"],"type":"string"}},"required":["code","severity","message"],"type":"object"},"MeResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/MeResponse.json"],"format":"uri","readOnly":true,"type":"string"},"brand":{"$ref":"#/components/schemas/Brand","description":"the agency's brand, when the current organisation is its client"},"organization":{"$ref":"#/components/schemas/OrganizationRef"},"organizations":{"items":{"$ref":"#/components/schemas/OrganizationRef"},"type":["array","null"]},"user":{"$ref":"#/components/schemas/MeResponseUserStruct"}},"required":["user","organization","organizations"],"type":"object"},"MeResponseUserStruct":{"additionalProperties":false,"properties":{"email":{"type":"string"},"id":{"format":"int64","type":"integer"},"is_pxl_staff":{"type":"boolean"},"name":{"type":"string"},"passkeys":{"format":"int64","type":"integer"},"recovery_codes_left":{"format":"int64","type":"integer"},"totp_enabled":{"type":"boolean"}},"required":["id","email","name","is_pxl_staff","totp_enabled","passkeys","recovery_codes_left"],"type":"object"},"MemberResponse":{"additionalProperties":false,"properties":{"email":{"type":"string"},"joined_at":{"type":["string","null"]},"last_login_at":{"type":["string","null"]},"name":{"type":"string"},"passkeys":{"format":"int64","type":"integer"},"role":{"type":"string"},"totp_enabled":{"type":"boolean"},"user_id":{"format":"int64","type":"integer"}},"required":["user_id","email","name","role","totp_enabled","passkeys","last_login_at","joined_at"],"type":"object"},"MembersOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/MembersOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"invitations":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":["array","null"]},"members":{"items":{"$ref":"#/components/schemas/MemberResponse"},"type":["array","null"]}},"required":["members","invitations"],"type":"object"},"MetaOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/MetaOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"cdn_base_url":{"type":"string"},"ingest_base_url":{"type":"string"},"organization_id":{"format":"int64","type":"integer"},"sdk_sha256":{"type":"string"}},"required":["cdn_base_url","ingest_base_url","organization_id","sdk_sha256"],"type":"object"},"NotificationChannel":{"additionalProperties":false,"properties":{"consecutive_failures":{"format":"int32","type":"integer"},"created_at":{"type":["string","null"]},"disabled_reason":{"type":"string"},"enabled":{"type":"boolean"},"events":{"items":{"type":"string"},"type":["array","null"]},"id":{"format":"int64","type":"integer"},"kind":{"enum":["webhook","slack","teams"],"type":"string"},"last_delivery_at":{"type":["string","null"]},"last_error":{"type":"string"},"last_status":{"format":"int32","type":["integer","null"]},"name":{"type":"string"},"secret":{"description":"webhooks: verifies X-PXL-Signature","type":"string"},"url":{"description":"shown with the secret part hidden","type":"string"}},"required":["id","kind","name","url","events","enabled","last_delivery_at","last_status","consecutive_failures","created_at"],"type":"object"},"NotificationDelivery":{"additionalProperties":false,"properties":{"attempts":{"format":"int32","type":"integer"},"created_at":{"type":["string","null"]},"delivered_at":{"type":["string","null"]},"event":{"type":"string"},"id":{"format":"int64","type":"integer"},"last_error":{"type":"string"},"last_status":{"format":"int32","type":["integer","null"]},"next_attempt_at":{"type":["string","null"]},"status":{"enum":["pending","sending","delivered","failed"],"type":"string"}},"required":["id","event","status","attempts","last_status","created_at","delivered_at","next_attempt_at"],"type":"object"},"NotificationEvent":{"additionalProperties":false,"properties":{"description":{"type":"string"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"NotificationListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/NotificationListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/NotificationChannel"},"type":["array","null"]},"events":{"items":{"$ref":"#/components/schemas/NotificationEvent"},"type":["array","null"]}},"required":["data","events"],"type":"object"},"NotificationOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/NotificationOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/NotificationChannel"}},"required":["data"],"type":"object"},"OrganizationOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/OrganizationOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/OrganizationRef"}},"required":["data"],"type":"object"},"OrganizationRef":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/OrganizationRef.json"],"format":"uri","readOnly":true,"type":"string"},"agency":{"description":"the agency this client organisation is reached through","type":"string"},"can_have_clients":{"description":"set on the current organisation when its plan holds client organisations","type":"boolean"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"role":{"type":"string"},"slug":{"type":"string"},"suspended_at":{"type":"string"},"suspended_reason":{"type":"string"}},"required":["id","name","slug","role"],"type":"object"},"PasskeyResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/PasskeyResponse.json"],"format":"uri","readOnly":true,"type":"string"},"created_at":{"type":"string"},"id":{"format":"int64","type":"integer"},"last_used_at":{"type":["string","null"]},"name":{"type":"string"},"synced":{"description":"Backed up to a cloud keychain or password manager","type":"boolean"}},"required":["id","name","created_at","last_used_at","synced"],"type":"object"},"PasswordInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/PasswordInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"password":{"maxLength":256,"type":"string"}},"required":["password"],"type":"object"},"PasswordResetInfoOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/PasswordResetInfoOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"email":{"type":"string"}},"required":["email"],"type":"object"},"PlanOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/PlanOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"plan":{"$ref":"#/components/schemas/PlanResponse"},"plans":{"description":"plans on offer; staff see every plan","items":{"$ref":"#/components/schemas/PlanResponse"},"type":["array","null"]},"usage":{"$ref":"#/components/schemas/UsageStruct"}},"required":["plan","plans","usage"],"type":"object"},"PlanResponse":{"additionalProperties":false,"properties":{"api_keys":{"type":"boolean"},"client_organizations":{"type":"boolean"},"currency":{"type":"string"},"description":{"type":"string"},"key":{"type":"string"},"max_alias_domains":{"description":"domains outside the site's own registrable domain","format":"int32","type":["integer","null"]},"max_members":{"format":"int32","type":["integer","null"]},"max_sites":{"format":"int32","type":["integer","null"]},"min_billed_sites":{"format":"int32","type":"integer"},"min_scan_interval_days":{"format":"int32","type":"integer"},"monitoring":{"type":"boolean"},"name":{"type":"string"},"price_per_site":{"description":"monthly, in minor units, excluding VAT; null when not set","format":"int32","type":["integer","null"]},"scan_pages":{"description":"pages per scan pass","format":"int32","type":"integer"},"scheduled_scans":{"type":"boolean"},"stripe_price_id":{"description":"staff only","type":"string"},"templates":{"type":"boolean"}},"required":["key","name","description","price_per_site","currency","min_billed_sites","max_sites","max_alias_domains","max_members","scan_pages","scheduled_scans","min_scan_interval_days","templates","api_keys","monitoring","client_organizations"],"type":"object"},"Policy":{"additionalProperties":false,"properties":{"cookie_url":{"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},"PortfolioOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/PortfolioOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/PortfolioSite"},"type":["array","null"]}},"required":["data"],"type":"object"},"PortfolioSite":{"additionalProperties":false,"properties":{"accept_rate_30d":{"description":"share of first choices that accepted everything; null below 20 events","format":"double","type":["number","null"]},"attention":{"description":"suspended, incident_critical, incident, unpublished, no_domains, never_scanned, scan_failed, scan_stale, before_consent, uncovered","items":{"type":"string"},"type":["array","null"]},"config_version":{"format":"int32","type":"integer"},"domains":{"format":"int64","type":"integer"},"events_30d":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"issues":{"description":"items stored before consent in the latest scan","format":"int64","type":"integer"},"name":{"type":"string"},"old_version_share":{"description":"share of the last 30 days' events recorded under an older config version","format":"double","type":["number","null"]},"open_incidents":{"format":"int64","type":"integer"},"organization":{"type":"string"},"organization_id":{"format":"int64","type":"integer"},"public_id":{"type":"string"},"published_at":{"type":["string","null"]},"scan_interval_days":{"format":"int32","type":"integer"},"scan_status":{"description":"done, failed, or empty when never scanned","type":"string"},"scanned_at":{"type":["string","null"]},"suspended":{"type":"boolean"},"unassigned":{"format":"int64","type":"integer"},"uncovered":{"description":"third-party hosts loading without a blocking rule","format":"int64","type":"integer"}},"required":["id","organization_id","organization","public_id","name","config_version","published_at","domains","scan_status","scanned_at","scan_interval_days","issues","unassigned","uncovered","events_30d","accept_rate_30d","old_version_share","open_incidents","suspended","attention"],"type":"object"},"ProspectScanInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ProspectScanInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"url":{"description":"a website address, such as example.no or https://www.example.no/shop","maxLength":2000,"type":"string"}},"required":["url"],"type":"object"},"ProspectScanListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ProspectScanListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/ProspectScanResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"ProspectScanResponse":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ProspectScanResponse.json"],"format":"uri","readOnly":true,"type":"string"},"cmp":{"description":"the consent tool found on the start page","type":"string"},"created_at":{"type":["string","null"]},"error":{"type":"string"},"expires_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]},"host":{"type":"string"},"id":{"format":"int64","type":"integer"},"pages_scanned":{"format":"int32","type":"integer"},"report_url":{"description":"secret link; anyone with it can read the report","type":"string"},"status":{"enum":["queued","running","done","failed"],"type":"string"},"url":{"type":"string"}},"required":["id","url","host","status","pages_scanned","report_url","created_at","finished_at","expires_at"],"type":"object"},"RecoveryCodesOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/RecoveryCodesOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"recovery_codes":{"description":"Shown once. Each works once.","items":{"type":"string"},"type":["array","null"]}},"required":["recovery_codes"],"type":"object"},"Regime":{"additionalProperties":false,"properties":{"auto":{"type":"boolean"},"by_country":{"additionalProperties":{"type":"string"},"type":"object"},"default":{"type":"string"}},"required":["default"],"type":"object"},"RenamePasskeyInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/RenamePasskeyInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"ResendInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ResendInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"email":{"maxLength":254,"type":"string"}},"required":["email"],"type":"object"},"ResetPasswordInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ResetPasswordInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"password":{"maxLength":256,"type":"string"}},"required":["password"],"type":"object"},"ResolveReviewInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ResolveReviewInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"category":{"enum":["necessary","preferences","statistics","marketing"],"type":"string"},"description":{"maxLength":500,"minLength":5,"type":"string"},"name":{"description":"Defaults to the reviewed name; shorten it and set prefix to cover a family like _ga_*","maxLength":300,"type":"string"},"platform":{"maxLength":100,"type":"string"},"prefix":{"type":"boolean"},"retention":{"maxLength":100,"type":"string"}},"required":["category","platform","description"],"type":"object"},"ReviewOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ReviewOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/ReviewResponse"}},"required":["data"],"type":"object"},"ReviewResponse":{"additionalProperties":false,"properties":{"domain":{"type":"string"},"example_url":{"type":"string"},"first_seen_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"kind":{"type":"string"},"last_seen_at":{"type":["string","null"]},"name":{"type":"string"},"sites":{"format":"int32","type":"integer"},"status":{"type":"string"}},"required":["id","kind","name","domain","status","sites","example_url","first_seen_at","last_seen_at"],"type":"object"},"RolloutInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/RolloutInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"site_ids":{"items":{"format":"int64","type":"integer"},"maxItems":100,"minItems":1,"type":["array","null"]}},"required":["site_ids"],"type":"object"},"RolloutOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/RolloutOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"failed":{"format":"int64","type":"integer"},"published":{"format":"int64","type":"integer"},"results":{"items":{"$ref":"#/components/schemas/RolloutResult"},"type":["array","null"]}},"required":["published","failed","results"],"type":"object"},"RolloutResult":{"additionalProperties":false,"properties":{"details":{"items":{"type":"string"},"type":["array","null"]},"error":{"type":"string"},"name":{"type":"string"},"site_id":{"format":"int64","type":"integer"},"unchanged":{"description":"already on this revision; nothing published","type":"boolean"},"version":{"description":"the published version, on success","format":"int32","type":"integer"}},"required":["site_id","name"],"type":"object"},"RotationOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/RotationOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/RotationResponse"}},"required":["data"],"type":"object"},"RotationResponse":{"additionalProperties":false,"properties":{"active":{"$ref":"#/components/schemas/SigningKeyResponse"},"config_version":{"format":"int32","type":"integer"},"retired":{"$ref":"#/components/schemas/SigningKeyResponse"}},"required":["retired","active","config_version"],"type":"object"},"ScanDetailOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ScanDetailOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/ScanResponse"},"findings":{"items":{"$ref":"#/components/schemas/FindingResponse"},"type":["array","null"]},"ignored_reject":{"description":"non-necessary items present after rejecting","format":"int64","type":"integer"},"issues":{"format":"int64","type":"integer"},"unassigned":{"description":"Cookies and storage keys nothing recognises","format":"int64","type":"integer"}},"required":["data","findings","unassigned","issues","ignored_reject"],"type":"object"},"ScanOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ScanOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/ScanResponse"}},"required":["data"],"type":"object"},"ScanResponse":{"additionalProperties":false,"properties":{"changes":{"$ref":"#/components/schemas/Changes"},"checks":{"$ref":"#/components/schemas/Checks","description":"what the scanner saw of the banner before any choice"},"created_at":{"type":["string","null"]},"error":{"type":["string","null"]},"finished_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"needs_consent":{"type":"boolean"},"pages_scanned":{"format":"int32","type":"integer"},"started_at":{"type":["string","null"]},"status":{"enum":["queued","running","done","failed"],"type":"string"},"trigger":{"enum":["manual","schedule"],"type":"string"}},"required":["id","status","trigger","pages_scanned","error","created_at","started_at","finished_at"],"type":"object"},"SetAgencyInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SetAgencyInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"agency_id":{"description":"null detaches the organisation, moving it to the free plan","format":"int64","type":["integer","null"]}},"required":["agency_id"],"type":"object"},"SetPlanDetailsInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SetPlanDetailsInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"price_per_site":{"description":"minor units; omit to clear","format":"int32","minimum":0,"type":["integer","null"]},"stripe_price_id":{"description":"empty clears it","maxLength":100,"type":"string"}},"required":["price_per_site","currency"],"type":"object"},"SetPlanInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SetPlanInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"plan":{"type":"string"}},"required":["plan"],"type":"object"},"SetRoleInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SetRoleInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"role":{"enum":["owner","admin","editor","viewer"],"type":"string"}},"required":["role"],"type":"object"},"SignInInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SignInInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"email":{"maxLength":254,"type":"string"},"password":{"maxLength":256,"type":"string"}},"required":["email","password"],"type":"object"},"SignInOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SignInOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"methods":{"description":"Second factors available: totp, recovery_code","items":{"type":"string"},"type":["array","null"]},"reset_token":{"type":"string"},"status":{"enum":["signed_in","mfa_required","set_password"],"type":"string"}},"required":["status"],"type":"object"},"SignUpInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SignUpInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"email":{"maxLength":254,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"organization":{"maxLength":100,"minLength":2,"type":"string"},"password":{"maxLength":256,"type":"string"},"turnstile_token":{"maxLength":4096,"type":"string"}},"required":["name","email","password","organization"],"type":"object"},"SigningKey":{"additionalProperties":false,"properties":{"key_id":{"type":"string"},"public_key":{"type":"string"}},"required":["key_id","public_key"],"type":"object"},"SigningKeyListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SigningKeyListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/SigningKeyResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"SigningKeyResponse":{"additionalProperties":false,"properties":{"created_at":{"type":["string","null"]},"key_id":{"type":"string"},"not_after":{"type":["string","null"]},"not_before":{"type":["string","null"]},"public_key":{"type":"string"},"status":{"type":"string"}},"required":["key_id","public_key","status","not_before","not_after","created_at"],"type":"object"},"SiteListOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SiteListOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/SiteResponse"},"type":["array","null"]}},"required":["data"],"type":"object"},"SiteOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SiteOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/SiteResponse"}},"required":["data"],"type":"object"},"SiteResponse":{"additionalProperties":false,"properties":{"archived_at":{"type":["string","null"]},"config_version":{"format":"int32","type":"integer"},"consent_lifetime_days":{"format":"int32","type":"integer"},"created_at":{"type":["string","null"]},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"policy_version":{"format":"int32","type":"integer"},"public_id":{"type":"string"},"retention_months":{"format":"int32","type":"integer"},"scan_interval_days":{"description":"Days between scheduled cookie scans; 0 means only on request","format":"int32","type":"integer"},"signing_key_id":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"suspended_at":{"type":["string","null"]},"suspended_reason":{"type":"string"},"template_id":{"format":"int64","type":["integer","null"]},"template_revision":{"format":"int32","type":["integer","null"]},"updated_at":{"type":["string","null"]}},"required":["id","public_id","name","status","retention_months","consent_lifetime_days","config_version","policy_version","archived_at","created_at","updated_at","scan_interval_days","template_id","suspended_at","template_revision"],"type":"object"},"SiteStatsOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SiteStatsOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/DataStruct"}},"required":["data"],"type":"object"},"StatusOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/StatusOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"status":{"type":"string"}},"required":["status"],"type":"object"},"SudoOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SudoOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"active":{"type":"boolean"},"expires_at":{"description":"When security settings lock again; null when locked","type":["string","null"]},"methods":{"description":"Ways to confirm access: passkey, password","items":{"type":"string"},"type":["array","null"]}},"required":["active","expires_at","methods"],"type":"object"},"SuspensionBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SuspensionBody.json"],"format":"uri","readOnly":true,"type":"string"},"reason":{"description":"required when suspending; shown to the customer","maxLength":500,"type":"string"},"suspend":{"type":"boolean"}},"required":["suspend"],"type":"object"},"SwitchOrgInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/SwitchOrgInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"organization_id":{"format":"int64","type":"integer"}},"required":["organization_id"],"type":"object"},"TOTPSetupOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/TOTPSetupOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"otpauth_url":{"type":"string"},"qr_data_url":{"type":"string"},"secret":{"description":"Base32 secret, grouped for manual entry","type":"string"}},"required":["secret","otpauth_url","qr_data_url"],"type":"object"},"TemplateInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/TemplateInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"site_id":{"description":"The site whose published banner becomes the template","format":"int64","type":"integer"}},"required":["name","site_id"],"type":"object"},"TemplateOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/TemplateOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/TemplateResponse"},"sites":{"items":{"$ref":"#/components/schemas/TemplateSite"},"type":["array","null"]}},"required":["data","sites"],"type":"object"},"TemplateResponse":{"additionalProperties":false,"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"outdated":{"format":"int64","type":"integer"},"revision":{"format":"int32","type":"integer"},"sites":{"format":"int64","type":"integer"},"source_site_id":{"format":"int64","type":["integer","null"]},"updated_at":{"type":["string","null"]}},"required":["id","name","revision","source_site_id","sites","outdated","updated_at"],"type":"object"},"TemplateSite":{"additionalProperties":false,"properties":{"name":{"type":"string"},"revision":{"format":"int32","type":"integer"},"site_id":{"format":"int64","type":"integer"},"state":{"description":"modified: the site's live banner was edited after the rollout","enum":["current","outdated","modified"],"type":"string"}},"required":["site_id","name","revision","state"],"type":"object"},"TestNotificationOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/TestNotificationOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"delivered":{"type":"boolean"},"error":{"type":"string"},"status":{"description":"HTTP status the endpoint answered","format":"int64","type":"integer"}},"required":["delivered"],"type":"object"},"Texts":{"additionalProperties":false,"properties":{"accept_all":{"type":"string"},"back":{"type":"string"},"body":{"type":"string"},"categories":{"additionalProperties":{"$ref":"#/components/schemas/CategoryText"},"type":"object"},"cookie_count_one":{"type":"string"},"cookie_count_other":{"type":"string"},"cookie_policy_link":{"type":"string"},"customize":{"type":"string"},"customize_body":{"type":"string"},"customize_title":{"type":"string"},"declaration_link":{"type":"string"},"embed_allow":{"type":"string"},"embed_blocked":{"type":"string"},"embed_manage":{"type":"string"},"embed_note":{"type":"string"},"embed_title":{"type":"string"},"notice_close":{"type":"string"},"optout_body":{"type":"string"},"optout_button":{"type":"string"},"optout_confirm":{"type":"string"},"optout_link":{"type":"string"},"policy_link":{"type":"string"},"reject_all":{"type":"string"},"save":{"type":"string"},"settings_link":{"type":"string"},"title":{"type":"string"}},"required":["title","body","accept_all","reject_all","customize","save","settings_link","categories"],"type":"object"},"Theme":{"additionalProperties":false,"properties":{"accept":{"type":"string"},"accept_foreground":{"type":"string"},"background":{"type":"string"},"font":{"type":"string"},"foreground":{"type":"string"},"position":{"type":"string"},"radius":{"format":"int64","type":"integer"},"reject":{"type":"string"},"reject_foreground":{"type":"string"}},"required":["background","foreground","accept","accept_foreground","reject","reject_foreground"],"type":"object"},"URLOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/URLOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},"UpdateNotificationInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/UpdateNotificationInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"enabled":{"type":"boolean"},"events":{"items":{"type":"string"},"type":["array","null"]},"name":{"maxLength":80,"type":"string"}},"type":"object"},"UpdateProfileInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/UpdateProfileInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},"UpdateSiteInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/UpdateSiteInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"consent_lifetime_days":{"format":"int32","maximum":395,"minimum":30,"type":"integer"},"name":{"maxLength":200,"minLength":1,"type":"string"},"retention_months":{"enum":[12,24,36],"format":"int32","type":"integer"},"scan_interval_days":{"description":"0 turns scheduled scans off","format":"int32","maximum":365,"minimum":0,"type":"integer"}},"type":"object"},"UpdateTemplateInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/UpdateTemplateInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"site_id":{"description":"Replace the banner with this site's published one","format":"int64","type":"integer"}},"type":"object"},"UsageStruct":{"additionalProperties":false,"properties":{"billed_sites":{"description":"sites billed, counting the plan's minimum","format":"int64","type":"integer"},"members":{"format":"int64","type":"integer"},"sites":{"format":"int64","type":"integer"}},"required":["sites","members","billed_sites"],"type":"object"},"ValidateConfigOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/ValidateConfigOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"blocking":{"type":"boolean"},"findings":{"items":{"$ref":"#/components/schemas/Finding"},"type":["array","null"]}},"required":["blocking","findings"],"type":"object"},"VerifyLogOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/VerifyLogOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"ok":{"type":"boolean"},"report":{"$ref":"#/components/schemas/VerifyReport"}},"required":["ok","report"],"type":"object"},"VerifyReport":{"additionalProperties":false,"properties":{"anchored":{"description":"heads with a valid RFC 3161 time-stamp","format":"int64","type":"integer"},"configs":{"format":"int64","type":"integer"},"errors":{"format":"int64","type":"integer"},"events":{"format":"int64","minimum":0,"type":"integer"},"findings":{"description":"at most 100","items":{"$ref":"#/components/schemas/LogFinding"},"type":["array","null"]},"first_seq":{"format":"int64","minimum":0,"type":"integer"},"heads":{"description":"signed day heads","format":"int64","type":"integer"},"last_seq":{"format":"int64","minimum":0,"type":"integer"}},"required":["events","first_seq","last_seq","heads","anchored","configs","errors","findings"],"type":"object"},"VerifyTokenInputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v1/schemas/VerifyTokenInputBody.json"],"format":"uri","readOnly":true,"type":"string"},"token":{"maxLength":64,"type":"string"}},"required":["token"],"type":"object"},"VersionStats":{"additionalProperties":false,"properties":{"total":{"format":"int64","type":"integer"},"version":{"format":"int32","type":"integer"}},"required":["version","total"],"type":"object"}}},"info":{"title":"PXL Consent Admin API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/agency/branding":{"delete":{"operationId":"removeAgencyBranding","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOutputBody"}}},"description":"OK"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Payment Required"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Remove the branding","tags":["Agency"]},"get":{"operationId":"getAgencyBranding","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOutputBody"}}},"description":"OK"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Payment Required"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"The brand clients' users see","tags":["Agency"]},"put":{"operationId":"setAgencyBranding","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOutputBody"}}},"description":"OK"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Payment Required"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Set the brand clients' users see","tags":["Agency"]}},"/agency/clients":{"get":{"operationId":"listAgencyClients","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyClientsOutputBody"}}},"description":"OK"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Payment Required"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Client organisations of this agency, with their state","tags":["Agency"]},"post":{"operationId":"createAgencyClient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgencyClientInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRef"}}},"description":"Created"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Payment Required"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Create a client organisation","tags":["Agency"]}},"/api-keys":{"get":{"operationId":"listAPIKeys","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyListOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List the organisation's API keys","tags":["API keys"]},"post":{"description":"The plaintext key is returned once and never stored.","operationId":"createAPIKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyOutputBody"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Create an API key","tags":["API keys"]}},"/api-keys/{id}":{"delete":{"operationId":"revokeAPIKey","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Revoke an API key","tags":["API keys"]}},"/auth/config":{"get":{"operationId":"getAuthConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"What the sign-in page offers","tags":["Auth"]}},"/auth/invitations/{token}":{"get":{"operationId":"getInvitation","parameters":[{"in":"path","name":"token","required":true,"schema":{"maxLength":64,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationInfoOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Look up an invitation from its link","tags":["Auth"]}},"/auth/invitations/{token}/accept":{"post":{"description":"A new user sets name and password and is signed in. An existing user must be signed in as the invited email.","operationId":"acceptInvitation","parameters":[{"in":"path","name":"token","required":true,"schema":{"maxLength":64,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Accept an invitation","tags":["Auth"]}},"/auth/login":{"post":{"description":"Returns status signed_in, or mfa_required with the second factors the account has. Throttled per email and per client.","operationId":"signIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Sign in with email and password","tags":["Auth"]}},"/auth/login/passkey/begin":{"post":{"description":"A passkey replaces the password. Like a password sign-in, it returns mfa_required when the account has an authenticator app. The device must verify the user (biometrics or PIN).","operationId":"beginPasskeySignIn","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Start passkey sign-in","tags":["Auth"]}},"/auth/login/passkey/finish":{"post":{"operationId":"finishPasskeySignIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Complete passkey sign-in","tags":["Auth"]}},"/auth/login/recovery":{"post":{"operationId":"signInRecoveryCode","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Complete sign-in with a recovery code","tags":["Auth"]}},"/auth/login/totp":{"post":{"operationId":"signInTOTP","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Complete sign-in with an authenticator app code","tags":["Auth"]}},"/auth/logout":{"post":{"operationId":"signOut","responses":{"204":{"description":"No Content"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Sign out","tags":["Auth"]}},"/auth/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"The signed-in user, their organisations and second factors","tags":["Auth"]}},"/auth/organization":{"post":{"operationId":"switchOrganization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchOrgInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Switch the current organisation","tags":["Auth"]}},"/auth/passkeys":{"get":{"operationId":"listPasskeys","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PasskeyResponse"},"type":["array","null"]}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List the signed-in user's passkeys","tags":["Passkeys"]}},"/auth/passkeys/register/begin":{"post":{"operationId":"beginPasskeyRegistration","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Start adding a passkey","tags":["Passkeys"]}},"/auth/passkeys/register/finish":{"post":{"description":"Ends every other session.","operationId":"finishPasskeyRegistration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinishRegistrationInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyResponse"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Finish adding a passkey","tags":["Passkeys"]}},"/auth/passkeys/{id}":{"delete":{"description":"Ends every other session.","operationId":"deletePasskey","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Remove a passkey","tags":["Passkeys"]},"patch":{"operationId":"renamePasskey","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenamePasskeyInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Rename a passkey","tags":["Passkeys"]}},"/auth/password":{"post":{"description":"Signs the user out of every other session.","operationId":"changePassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Change password","tags":["Auth"]}},"/auth/password/forgot":{"post":{"description":"Always answers 202, whether or not the address has an account.","operationId":"requestPasswordReset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordInputBody"}}},"required":true},"responses":{"202":{"description":"Accepted"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Email a password reset link","tags":["Auth"]}},"/auth/password/reset/{token}":{"get":{"operationId":"getPasswordReset","parameters":[{"in":"path","name":"token","required":true,"schema":{"maxLength":64,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetInfoOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Check a password reset link","tags":["Auth"]},"post":{"description":"The link works once. Every session of the account ends; sign in again afterwards.","operationId":"resetPassword","parameters":[{"in":"path","name":"token","required":true,"schema":{"maxLength":64,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Set a new password with a reset link","tags":["Auth"]}},"/auth/profile":{"patch":{"operationId":"updateProfile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Update the signed-in user's name","tags":["Auth"]}},"/auth/recovery-codes":{"post":{"description":"Old codes stop working.","operationId":"regenerateRecoveryCodes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Replace recovery codes","tags":["Two-factor"]}},"/auth/signup":{"post":{"description":"Always answers 202 for a valid request, whether or not the address already has an account; a confirmation link goes by email.","operationId":"signUp","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignUpInputBody"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusOutputBody"}}},"description":"Accepted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Create an account and an organisation","tags":["Auth"]}},"/auth/sudo":{"get":{"operationId":"getSudo","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SudoOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Whether security settings are unlocked, and how to confirm access","tags":["Access confirmation"]},"post":{"operationId":"confirmSudo","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SudoOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Confirm access with the password","tags":["Access confirmation"]}},"/auth/sudo/passkey/begin":{"post":{"operationId":"beginSudoPasskey","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Start confirming access with a passkey","tags":["Access confirmation"]}},"/auth/sudo/passkey/finish":{"post":{"operationId":"finishSudoPasskey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SudoOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Confirm access with a passkey","tags":["Access confirmation"]}},"/auth/totp/disable":{"post":{"description":"Deletes the recovery codes. Ends every other session.","operationId":"disableTOTP","responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Remove the authenticator app","tags":["Two-factor"]}},"/auth/totp/enable":{"post":{"description":"Returns recovery codes when the account has none. Ends every other session.","operationId":"enableTOTP","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Confirm enrolment with a code","tags":["Two-factor"]}},"/auth/totp/setup":{"post":{"description":"Returns the secret and a QR code.","operationId":"setupTOTP","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TOTPSetupOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Start authenticator app enrolment","tags":["Two-factor"]}},"/auth/verify-email":{"post":{"operationId":"verifyEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyTokenInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Confirm an email address and sign in","tags":["Auth"]}},"/auth/verify-email/resend":{"post":{"operationId":"resendVerification","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendInputBody"}}},"required":true},"responses":{"202":{"description":"Accepted"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Send the confirmation link again","tags":["Auth"]}},"/billing":{"get":{"operationId":"getBilling","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Subscription state and the plans that can be bought","tags":["Billing"]}},"/billing/checkout":{"post":{"operationId":"startCheckout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Start a Stripe Checkout for a plan","tags":["Billing"]}},"/billing/portal":{"post":{"description":"Card, invoices, plan changes and cancellation.","operationId":"openBillingPortal","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLOutputBody"}}},"description":"OK"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Open the Stripe customer portal","tags":["Billing"]}},"/billing/webhook":{"post":{"description":"Signed with the endpoint secret; each event is applied once.","operationId":"stripeWebhook","parameters":[{"in":"header","name":"Stripe-Signature","schema":{"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"contentMediaType":"application/octet-stream","format":"binary","type":"string"}}},"required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Bad Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Service Unavailable"}},"summary":"Stripe webhook","tags":["Billing"]}},"/config/example":{"get":{"operationId":"getExampleConfig","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"A complete banner config that passes every compliance rule","tags":["Config"]}},"/config/languages":{"get":{"operationId":"listBannerLanguages","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguagesOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Languages a banner can be published in, with their default texts","tags":["Config"]}},"/config/validate":{"post":{"description":"Returns every finding, blocking and warning. The policy URL is not fetched.","operationId":"validateConfig","requestBody":{"content":{"application/octet-stream":{"schema":{"contentMediaType":"application/octet-stream","format":"binary","type":"string"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateConfigOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Run the compliance rules over a config without publishing","tags":["Config"]}},"/cookie-reviews":{"get":{"operationId":"listCookieReviews","parameters":[{"explode":false,"in":"query","name":"status","schema":{"default":"open","enum":["open","resolved","ignored"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReviewsOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Cookies and storage keys no definition matches","tags":["Cookie review"]}},"/cookie-reviews/{review_id}/ignore":{"post":{"operationId":"ignoreCookieReview","parameters":[{"in":"path","name":"review_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Dismiss a review item","tags":["Cookie review"]}},"/cookie-reviews/{review_id}/resolve":{"post":{"operationId":"resolveCookieReview","parameters":[{"in":"path","name":"review_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveReviewInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Classify a cookie for every site","tags":["Cookie review"]}},"/incidents":{"get":{"description":"Opened and resolved by the hourly monitor from scans and consent statistics.","operationId":"listIncidents","parameters":[{"description":"include resolved incidents","explode":false,"in":"query","name":"all","schema":{"description":"include resolved incidents","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIncidentsOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Compliance incidents across the organisation's sites","tags":["Monitoring"]}},"/incidents/{incident_id}/acknowledge":{"post":{"description":"Stops escalation to PXL. The incident stays until the monitor sees the problem gone.","operationId":"acknowledgeIncident","parameters":[{"in":"path","name":"incident_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Acknowledge an incident","tags":["Monitoring"]}},"/members":{"get":{"operationId":"listMembers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembersOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Members and pending invitations of the current organisation","tags":["Members"]}},"/members/invitations":{"post":{"description":"Returns the invitation link. Only owners can invite owners.","operationId":"inviteMember","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteOutputBody"}}},"description":"Created"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Invite someone by email","tags":["Members"]}},"/members/invitations/{invitation_id}":{"delete":{"operationId":"revokeInvitation","parameters":[{"in":"path","name":"invitation_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Revoke a pending invitation","tags":["Members"]}},"/members/{user_id}":{"delete":{"operationId":"removeMember","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Remove a member from the organisation","tags":["Members"]},"patch":{"operationId":"setMemberRole","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoleInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Change a member's role","tags":["Members"]}},"/meta":{"get":{"operationId":"getMeta","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Service metadata: CDN and ingest origins, organisation","tags":["Meta"]}},"/notifications":{"get":{"operationId":"listNotificationChannels","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Notification channels and the events they can receive","tags":["Notifications"]},"post":{"operationId":"createNotificationChannel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationOutputBody"}}},"description":"Created"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Add a webhook, Slack or Teams channel","tags":["Notifications"]}},"/notifications/{id}":{"delete":{"operationId":"deleteNotificationChannel","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Remove a channel","tags":["Notifications"]},"patch":{"operationId":"updateNotificationChannel","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Rename a channel, change its events, or turn it on or off","tags":["Notifications"]}},"/notifications/{id}/deliveries":{"get":{"operationId":"listNotificationDeliveries","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveriesOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"The channel's latest deliveries","tags":["Notifications"]}},"/notifications/{id}/test":{"post":{"operationId":"testNotificationChannel","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestNotificationOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Send a test message now","tags":["Notifications"]}},"/organizations":{"post":{"operationId":"createOrganization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationOutputBody"}}},"description":"Created"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Create an organisation (PXL staff)","tags":["Members"]}},"/plan":{"get":{"operationId":"getPlan","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"The organisation's plan, its limits and current usage","tags":["Plan"]}},"/portfolio":{"get":{"description":"Publish state, domains, the latest scan and its issues, and consent figures for the last 30 days (rolled up hourly).","operationId":"getPortfolio","parameters":[{"description":"for an agency, include its clients' sites","explode":false,"in":"query","name":"clients","schema":{"description":"for an agency, include its clients' sites","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Every site's state at a glance","tags":["Portfolio"]}},"/prospect-scans":{"get":{"operationId":"listProspectScans","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectScanListOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Recent website scans in this organisation","tags":["Prospect scans"]},"post":{"operationId":"createProspectScan","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectScanInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProspectScanResponse"}}},"description":"Created"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Scan a website that is not set up yet","tags":["Prospect scans"]}},"/prospect-scans/{id}":{"delete":{"operationId":"deleteProspectScan","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Delete a website scan and its link","tags":["Prospect scans"]}},"/prospect-scans/{id}/site":{"post":{"operationId":"createSiteFromProspectScan","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOutputBody"}}},"description":"Created"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Payment Required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Set up the scanned website as a site","tags":["Prospect scans"]}},"/sites":{"get":{"operationId":"listSites","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteListOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List the organisation's sites","tags":["Sites"]},"post":{"operationId":"createSite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSiteInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOutputBody"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Create a site","tags":["Sites"]}},"/sites/{id}":{"delete":{"description":"Archiving stops delivery and ingest. Consent records are kept for the retention period.","operationId":"archiveSite","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Archive a site","tags":["Sites"]},"get":{"operationId":"getSite","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Get a site","tags":["Sites"]},"patch":{"operationId":"updateSite","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSiteInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Update a site","tags":["Sites"]}},"/sites/{id}/config":{"get":{"operationId":"getSiteConfig","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigVersionOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Get the currently published banner config","tags":["Config"]}},"/sites/{id}/config/publish":{"post":{"description":"The body is the banner config document. Compliance rules that block return 422 with one error per finding; warnings are returned with the new version.","operationId":"publishSiteConfig","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"contentMediaType":"application/octet-stream","format":"binary","type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigVersionOutputBody"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Validate, snapshot the policy, sign and publish a banner config","tags":["Config"]}},"/sites/{id}/config/versions":{"get":{"operationId":"listSiteConfigVersions","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigVersionListOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List published banner config versions","tags":["Config"]}},"/sites/{id}/config/versions/{version}":{"get":{"operationId":"getSiteConfigVersion","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"in":"path","name":"version","required":true,"schema":{"format":"int32","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigVersionOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"One published banner config version","tags":["Config"]}},"/sites/{id}/config/versions/{version}/restore":{"post":{"description":"Publishes the earlier version's banner as a new version. It goes through the same checks as any publish, with the privacy policy fetched again.","operationId":"restoreSiteConfigVersion","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"in":"path","name":"version","required":true,"schema":{"format":"int32","minimum":1,"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigVersionOutputBody"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Publish an earlier version again","tags":["Config"]}},"/sites/{id}/consents":{"get":{"operationId":"listConsentEvents","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"description":"RFC 3339 lower bound (inclusive)","explode":false,"in":"query","name":"from","schema":{"description":"RFC 3339 lower bound (inclusive)","type":"string"}},{"description":"RFC 3339 upper bound (exclusive)","explode":false,"in":"query","name":"to","schema":{"description":"RFC 3339 upper bound (exclusive)","type":"string"}},{"description":"Return events with seq below this; from the previous page's next_cursor","explode":false,"in":"query","name":"cursor","schema":{"description":"Return events with seq below this; from the previous page's next_cursor","format":"int64","type":"integer"}},{"explode":false,"in":"query","name":"limit","schema":{"default":100,"format":"int64","maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConsentEventsOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List consent events, newest first","tags":["Consent log"]}},"/sites/{id}/consents/evidence.zip":{"get":{"description":"A zip of manifest.json, keys.json, events.ndjson, heads.ndjson and configs.ndjson that verifies offline against the site's public keys. The export is recorded in the audit log.","operationId":"exportEvidenceBundle","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Download an evidence bundle","tags":["Consent log"]}},"/sites/{id}/consents/export.csv":{"get":{"description":"Streams the events in the range as CSV with every proof column. Cells that could be read as spreadsheet formulas are neutralised.","operationId":"exportConsentEvents","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"explode":false,"in":"query","name":"from","schema":{"type":"string"}},{"explode":false,"in":"query","name":"to","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Export consent events as CSV","tags":["Consent log"]}},"/sites/{id}/consents/verify":{"post":{"description":"Recomputes every hash, checks every signature, the chain, the signed day heads and their RFC 3161 time-stamps.","operationId":"verifyConsentLog","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyLogOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Verify the consent log","tags":["Consent log"]}},"/sites/{id}/consents/{consent_id}":{"get":{"description":"For data subject requests. The lookup is recorded in the audit log.","operationId":"getConsentSubject","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"in":"path","name":"consent_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentSubjectOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Every event for one consent id, each verified","tags":["Consent log"]}},"/sites/{id}/domains":{"get":{"operationId":"listSiteDomains","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainListOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List a site's hosts","tags":["Domains"]},"post":{"description":"Consent writes are only accepted from registered hosts.","operationId":"addSiteDomain","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDomainInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOutputBody"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Register a host for a site","tags":["Domains"]}},"/sites/{id}/domains/{domain_id}":{"delete":{"operationId":"removeSiteDomain","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"in":"path","name":"domain_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Remove a host from a site","tags":["Domains"]}},"/sites/{id}/domains/{domain_id}/verify":{"post":{"description":"Looks for the DNS TXT record, the meta tag or the well-known file.","operationId":"verifySiteDomain","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"in":"path","name":"domain_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Check that the site's owner controls a host","tags":["Domains"]}},"/sites/{id}/keys":{"get":{"operationId":"listSiteSigningKeys","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningKeyListOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"List a site's signing keys","tags":["Keys"]}},"/sites/{id}/keys/rotate":{"post":{"description":"Runs under the chain lock, so no event is signed with a retired key. The current config is republished under the new key.","operationId":"rotateSiteSigningKey","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotationOutputBody"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Retire the active signing key and install a new one","tags":["Keys"]}},"/sites/{id}/keys/{key_id}/compromise":{"post":{"description":"If it is the active key a rotation happens first. Events signed with the key are reported by verify from then on.","operationId":"compromiseSiteSigningKey","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"in":"path","name":"key_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompromiseInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningKeyListOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Mark a key as compromised","tags":["Keys"]}},"/sites/{id}/scans":{"get":{"operationId":"listScans","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScansOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Recent cookie scans","tags":["Scans"]},"post":{"operationId":"startScan","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanOutputBody"}}},"description":"Accepted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Queue a cookie scan","tags":["Scans"]}},"/sites/{id}/scans/{scan_id}":{"get":{"description":"Findings are classified with the current definitions, so a cookie resolved in review shows its category on older scans too.","operationId":"getScan","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"scan_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanDetailOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"A scan and what it found","tags":["Scans"]}},"/sites/{id}/stats":{"get":{"description":"Daily totals by choice for the period, plus country and device breakdowns and the banner versions the choices were made on. Counts are rolled up hourly, so today's figures fill in as the day goes on.","operationId":"siteStats","parameters":[{"description":"Resource ID","in":"path","name":"id","required":true,"schema":{"description":"Resource ID","format":"int64","type":"integer"}},{"description":"days back from today","explode":false,"in":"query","name":"days","schema":{"default":30,"description":"days back from today","format":"int64","maximum":365,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteStatsOutputBody"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Consent numbers for a site","tags":["Consent log"]}},"/staff/organizations/{organization_id}/agency":{"put":{"operationId":"setOrganizationAgency","parameters":[{"in":"path","name":"organization_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgencyInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Attach an organisation to an agency, or detach it","tags":["Staff"]}},"/staff/organizations/{organization_id}/plan":{"put":{"operationId":"setOrganizationPlan","parameters":[{"in":"path","name":"organization_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPlanInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Move an organisation to a plan","tags":["Staff"]}},"/staff/organizations/{organization_id}/suspension":{"post":{"operationId":"suspendOrganization","parameters":[{"in":"path","name":"organization_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspensionBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Suspend or reinstate every site of an organisation","tags":["Staff"]}},"/staff/plans/{key}":{"put":{"operationId":"setPlanDetails","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPlanDetailsInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Set a plan's price and Stripe price","tags":["Staff"]}},"/staff/sites/{site_id}/suspension":{"post":{"description":"A suspended site keeps serving its banner, so visitors stay protected, but consent is no longer recorded and nothing can be published.","operationId":"suspendSite","parameters":[{"in":"path","name":"site_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspensionBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Suspend or reinstate a site","tags":["Staff"]}},"/templates":{"get":{"operationId":"listTemplates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTemplatesOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Error"}},"summary":"Banner templates","tags":["Templates"]},"post":{"operationId":"createTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateOutputBody"}}},"description":"Created"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Save a site's published banner as a template","tags":["Templates"]}},"/templates/{template_id}":{"delete":{"description":"Sites keep their published banners.","operationId":"deleteTemplate","parameters":[{"in":"path","name":"template_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Delete a template","tags":["Templates"]},"get":{"operationId":"getTemplate","parameters":[{"in":"path","name":"template_id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"A template and the sites that use it","tags":["Templates"]},"patch":{"description":"Replacing the banner raises the revision; sites on an older revision show as outdated until it is rolled out.","operationId":"updateTemplate","parameters":[{"in":"path","name":"template_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplateInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Rename a template, or replace its banner with a site's","tags":["Templates"]}},"/templates/{template_id}/rollout":{"post":{"description":"Each site gets the template with its own privacy policy link and consent lifetime, checked and signed like any publish. A site that fails the checks is reported and left unchanged.","operationId":"rolloutTemplate","parameters":[{"in":"path","name":"template_id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutOutputBody"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIErrorEnvelope"}}},"description":"Internal Server Error"}},"summary":"Publish a template to sites","tags":["Templates"]}}},"servers":[{"url":"/api/v1"}]}