{"openapi":"3.1.0","info":{"title":"cresa.one API","version":"0.2.0","summary":"API for publishing Sites and storing private agent files in Drives.","description":"cresa.one lets agents publish static Sites to live URLs and store private files in cloud Drives. This OpenAPI spec covers stable public API routes and intentionally excludes admin/internal endpoints.","contact":{"email":"hello@cresa.one","url":"https://cresa.one"}},"servers":[{"url":"https://cresa.one"}],"externalDocs":{"description":"Canonical cresa.one docs","url":"https://cresa.one/docs"},"tags":[{"name":"Auth","description":"Agent-assisted sign-in and API key creation."},{"name":"Sites","description":"Publish, update, finalize, query, and manage hosted Sites."},{"name":"Site Data","description":"Owner-authenticated access to built-in Site Data records."},{"name":"Analytics","description":"Paid-plan Site and account analytics rollups."},{"name":"Profiles","description":"Public profile settings and profile-listed Sites."},{"name":"Drives","description":"Private cloud storage for agent files."},{"name":"Domains","description":"Custom domains, subdomain handles, and links."},{"name":"Variables","description":"Account service variables for proxy routes."},{"name":"Support","description":"Authenticated support requests."},{"name":"Tags & Views","description":"Tag sites and group them into smart views."}],"paths":{"/api/auth/agent/request-code":{"post":{"tags":["Auth"],"operationId":"requestAgentAuthCode","summary":"Request an email sign-in code","description":"Starts the agent-assisted API key flow by emailing a one-time code to the user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAuthRequestCodeRequest"}}}},"responses":{"200":{"description":"Code sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAuthRequestCodeResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/auth/agent/verify-code":{"post":{"tags":["Auth"],"operationId":"verifyAgentAuthCode","summary":"Verify an email code and receive an API key","description":"Completes agent-assisted sign-in. If the email is new, the account is created.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAuthVerifyCodeRequest"}}}},"responses":{"200":{"description":"API key issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAuthVerifyCodeResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish":{"post":{"tags":["Sites"],"operationId":"createSite","summary":"Create a Site","description":"Creates a pending Site version and returns presigned upload URLs. Anonymous requests are allowed and create temporary Sites that expire after 24 hours.","security":[{},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCreateRequest"}}}},"responses":{"200":{"description":"Pending Site created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCreateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishes":{"get":{"tags":["Sites"],"operationId":"listSites","summary":"List account Sites","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Sites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/analytics":{"get":{"tags":["Analytics"],"operationId":"getAccountAnalytics","summary":"Get account analytics","description":"Returns aggregate analytics across all Sites owned by the authenticated paid account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"description":"Analytics time range. Defaults to 30d when omitted or invalid.","schema":{"$ref":"#/components/schemas/AnalyticsRange"}}],"responses":{"200":{"description":"Account analytics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountAnalyticsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishes/search":{"get":{"tags":["Sites"],"operationId":"searchSites","summary":"Search account Sites","description":"Searches the authenticated user's active owned Sites by slug, URL/domain, viewer metadata, file path, and indexed text content. Password-protected Sites are included for the owner because search reads stored publish files, not public URLs. Set includeShared=1 to also search accepted/opened Sites shared with the authenticated account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":true,"description":"Search query. Uses Postgres websearch syntax with the simple text search configuration.","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"description":"Maximum results to return. Defaults to 20 and is capped at 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","required":false,"description":"Opaque pagination cursor returned as nextCursor from a previous response.","schema":{"type":"string"}},{"name":"includeShared","in":"query","required":false,"description":"When set to 1, include accepted/opened Sites shared with the authenticated account.","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSearchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishes/{slug}/analytics":{"get":{"tags":["Analytics","Sites"],"operationId":"getSiteAnalytics","summary":"Get Site analytics","description":"Returns analytics for one Site owned by the authenticated paid account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}},{"name":"range","in":"query","required":false,"description":"Analytics time range. Defaults to 30d when omitted or invalid.","schema":{"$ref":"#/components/schemas/AnalyticsRange"}}],"responses":{"200":{"description":"Site analytics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteAnalyticsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishes/{slug}/data/{collection}":{"get":{"tags":["Site Data","Sites"],"operationId":"listSiteDataRecords","summary":"List Site Data records","description":"Lists active records in one Site Data collection for a Site owned by the authenticated account. This is the central owner API; browser pages usually use the Site-local /.cresaone/data/:collection endpoint instead.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .cresaone/data.json manifest.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"}},{"name":"limit","in":"query","required":false,"description":"Maximum records to return. Defaults to 50 and is capped at 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"Opaque pagination cursor returned as nextCursor from a previous response.","schema":{"type":"string"}}],"responses":{"200":{"description":"Site Data records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataRecordListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Site Data","Sites"],"operationId":"createSiteDataRecord","summary":"Create a Site Data record","description":"Creates one record in a Site Data collection for a Site owned by the authenticated account. The request body is validated against the collection schema.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .cresaone/data.json manifest.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional key for retry-safe record creation. Keys are scoped to the account, Site, and collection for a short window.","schema":{"type":"string","minLength":1,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataRecordInput"}}}},"responses":{"201":{"description":"Record created. Idempotent replays also return 201.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataRecordResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publishes/{slug}/data/{collection}/{recordId}":{"get":{"tags":["Site Data","Sites"],"operationId":"getSiteDataRecord","summary":"Get a Site Data record","description":"Returns one active record from a Site Data collection for a Site owned by the authenticated account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .cresaone/data.json manifest.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"}},{"name":"recordId","in":"path","required":true,"description":"Site Data record id.","schema":{"type":"string","pattern":"^rec_[0-9A-HJKMNP-TV-Z]{26}$"}}],"responses":{"200":{"description":"Site Data record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataRecordResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Site Data","Sites"],"operationId":"patchSiteDataRecord","summary":"Patch a Site Data record","description":"Merges submitted fields into an existing Site Data record for a Site owned by the authenticated account. The resulting record is validated against the collection schema.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .cresaone/data.json manifest.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"}},{"name":"recordId","in":"path","required":true,"description":"Site Data record id.","schema":{"type":"string","pattern":"^rec_[0-9A-HJKMNP-TV-Z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataRecordInput"}}}},"responses":{"200":{"description":"Record updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataRecordResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Site Data","Sites"],"operationId":"deleteSiteDataRecord","summary":"Delete a Site Data record","description":"Soft-deletes one active record from a Site Data collection for a Site owned by the authenticated account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .cresaone/data.json manifest.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"}},{"name":"recordId","in":"path","required":true,"description":"Site Data record id.","schema":{"type":"string","pattern":"^rec_[0-9A-HJKMNP-TV-Z]{26}$"}}],"responses":{"200":{"description":"Record deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDataDeleteResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/profile":{"get":{"tags":["Profiles"],"operationId":"getProfile","summary":"Get profile settings","description":"Returns the authenticated user's public profile settings and Sites shown on the profile.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Profile settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Profiles"],"operationId":"patchProfile","summary":"Update profile settings","description":"Turns the public profile on or off and controls whether future Sites are added to the profile automatically.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSettingsPatchRequest"}}}},"responses":{"200":{"description":"Profile settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/profile/username":{"patch":{"tags":["Profiles"],"operationId":"patchProfileUsername","summary":"Change profile username","description":"Changes the authenticated user's profile username and profile URL.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUsernamePatchRequest"}}}},"responses":{"200":{"description":"Profile username updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/profile/sites":{"get":{"tags":["Profiles"],"operationId":"listProfileSites","summary":"List Sites on profile","description":"Lists the authenticated user's Sites currently shown on their public profile.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Profile Sites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSitesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Profiles"],"operationId":"addProfileSite","summary":"Add Site to profile","description":"Shows an active owned Site on the authenticated user's public profile. Gated Sites (password-protected or restricted access) cannot be shown on a profile and return 409 site_gated. Adding a Site already on the profile is idempotent.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSiteAddRequest"}}}},"responses":{"200":{"description":"Site added to profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSitesMutationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/profile/sites/{slug}":{"delete":{"tags":["Profiles"],"operationId":"removeProfileSite","summary":"Remove Site from profile","description":"Removes a Site from the authenticated user's public profile without deleting the Site.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Site removed from profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSitesMutationResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}":{"get":{"tags":["Sites"],"operationId":"getSite","summary":"Get Site details","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Site details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDetailsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Sites"],"operationId":"updateSite","summary":"Update an existing Site","description":"Creates a pending replacement version for an existing Site. Authenticated Sites require API key ownership. Anonymous Sites require claimToken.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCreateRequest"}}}},"responses":{"200":{"description":"Pending Site update created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCreateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Anonymous Site expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Sites"],"operationId":"deleteSite","summary":"Delete a Site","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/finalize":{"post":{"tags":["Sites"],"operationId":"finalizeSiteVersion","summary":"Finalize a pending Site version","description":"Makes a pending version live after all files have been uploaded.","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizePublishRequest"}}}},"responses":{"200":{"description":"Version finalized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizePublishResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/claim":{"post":{"tags":["Sites"],"operationId":"claimAnonymousSite","summary":"Claim an anonymous Site","description":"Transfers an anonymous Site to the authenticated account or browser session using a claim token.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSiteRequest"}}}},"responses":{"200":{"description":"Site claimed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSiteResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Site deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/uploads/refresh":{"post":{"tags":["Sites"],"operationId":"refreshSiteUploadUrls","summary":"Refresh upload URLs for a pending Site version","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Upload URLs refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishCreateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/metadata":{"patch":{"tags":["Sites"],"operationId":"patchSiteMetadata","summary":"Patch Site metadata and access controls","description":"Updates TTL, viewer metadata, password protection, and SPA routing for an authenticated Site. Setting a password switches the Site to password access mode and clears restricted email/domain rules. Sending password null removes an existing password; on a Site without a password it is a no-op and does not change the access mode.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMetadataPatchRequest"}}}},"responses":{"200":{"description":"Metadata patched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMetadataPatchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/access":{"get":{"tags":["Sites"],"operationId":"getSiteAccess","summary":"Read the Site access policy","description":"Returns the active access mode (anyone_with_link, password, or restricted), the access policy version, and the restricted email/domain allowlists. Owner only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Access policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteAccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Sites"],"operationId":"patchSiteAccess","summary":"Update Site access mode and allowlists","description":"Sets link or restricted access for an owned Site. The request replaces the full email and domain allowlists; to add one entry, read the current policy, merge, and write the complete lists back. A successful PATCH switches the Site away from password mode and clears any existing password. Restricted access requires a claimed Site (409 otherwise). To enable password mode, use the metadata endpoint instead (mode password here returns 409). When notify is true, invite emails are sent only to exact-email addresses newly added by this request; domain rules never send invite emails.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteAccessPatchRequest"}}}},"responses":{"200":{"description":"Access policy updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteAccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/access/invites":{"post":{"tags":["Sites"],"operationId":"sendSiteAccessInvites","summary":"Send invite emails for an existing access policy","description":"Sends invite emails to exact-email recipients that are currently allowed on the Site. Emails not on the allowlist are reported in skipped with reason not_allowed. Domain rules do not send invite emails. Owner only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"cresa.one Site slug.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteAccessInviteRequest"}}}},"responses":{"200":{"description":"Invite delivery results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteAccessInviteResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/from-drive":{"post":{"tags":["Sites","Drives"],"operationId":"publishFromDrive","summary":"Publish a Drive version as a Site","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishFromDriveRequest"}}}},"responses":{"200":{"description":"Drive published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishFromDriveResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives":{"get":{"tags":["Drives"],"operationId":"listDrives","summary":"List account Drives","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Drives","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Drives"],"operationId":"createDrive","summary":"Create a Drive","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveCreateRequest"}}}},"responses":{"200":{"description":"Drive created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/default":{"get":{"tags":["Drives"],"operationId":"getDefaultDrive","summary":"Get or create the default Drive","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Drive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}":{"get":{"tags":["Drives"],"operationId":"getDrive","summary":"Get Drive details","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"responses":{"200":{"description":"Drive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Drives"],"operationId":"patchDrive","summary":"Patch Drive metadata","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrivePatchRequest"}}}},"responses":{"200":{"description":"Drive updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Drives"],"operationId":"deleteDrive","summary":"Soft-delete a Drive","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"responses":{"200":{"description":"Drive deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDriveResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}/files":{"get":{"tags":["Drives"],"operationId":"listDriveFiles","summary":"List Drive files","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Drives"],"operationId":"applyDriveFileBatch","summary":"Apply a batch of Drive file operations","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBatchRequest"}}}},"responses":{"200":{"description":"Batch applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBatchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}/files/{path}":{"get":{"tags":["Drives"],"operationId":"readDriveFile","summary":"Read a Drive file","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File bytes","content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Drives"],"operationId":"deleteDriveFile","summary":"Delete a Drive file or prefix","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}},{"name":"recursive","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"baseVersionId","in":"query","required":false,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBatchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}/files/uploads":{"post":{"tags":["Drives"],"operationId":"createDriveFileUpload","summary":"Stage a Drive file write","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveUploadCreateRequest"}}}},"responses":{"200":{"description":"Upload staged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveUploadCreateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}/files/finalize":{"post":{"tags":["Drives"],"operationId":"finalizeDriveFileUpload","summary":"Finalize a staged Drive upload","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFinalizeRequest"}}}},"responses":{"200":{"description":"Upload finalized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBatchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}/files/move":{"post":{"tags":["Drives"],"operationId":"moveDriveFile","summary":"Move a Drive file","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveMoveRequest"}}}},"responses":{"200":{"description":"File moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBatchResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/drives/{driveId}/tokens":{"get":{"tags":["Drives"],"operationId":"listDriveTokens","summary":"List Drive tokens","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"responses":{"200":{"description":"Tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveTokenListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Drives"],"operationId":"createDriveToken","summary":"Create a scoped Drive token","security":[{"bearerAuth":[]}],"parameters":[{"name":"driveId","in":"path","required":true,"description":"Drive identifier.","schema":{"type":"string","minLength":1,"example":"drv_01j..."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveTokenCreateRequest"}}}},"responses":{"200":{"description":"Token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveTokenCreateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/domains":{"get":{"tags":["Domains"],"operationId":"listDomains","summary":"List custom domains","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Domains"],"operationId":"createDomain","summary":"Add a custom domain","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}}},"responses":{"200":{"description":"Domain created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/domains/{domain}":{"get":{"tags":["Domains"],"operationId":"getDomain","summary":"Get custom domain status","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Domains"],"operationId":"deleteDomain","summary":"Remove a custom domain","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/handle":{"get":{"tags":["Domains"],"operationId":"getHandle","summary":"Get account subdomain handle","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Subdomain handle","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Domains"],"operationId":"createHandle","summary":"Create account subdomain handle","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleRequest"}}}},"responses":{"200":{"description":"Subdomain handle created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Domains"],"operationId":"updateHandle","summary":"Update account subdomain handle","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleRequest"}}}},"responses":{"200":{"description":"Subdomain handle updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Domains"],"operationId":"deleteHandle","summary":"Delete account subdomain handle","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Subdomain handle deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/links":{"get":{"tags":["Domains"],"operationId":"listLinks","summary":"List subdomain handle or domain links","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Domains"],"operationId":"createLink","summary":"Create a link from a subdomain handle/domain path to a Site","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRequest"}}}},"responses":{"200":{"description":"Link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/links/{location}":{"get":{"tags":["Domains"],"operationId":"getLink","summary":"Get a link","security":[{"bearerAuth":[]}],"parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Domains"],"operationId":"updateLink","summary":"Update a link","security":[{"bearerAuth":[]}],"parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPatchRequest"}}}},"responses":{"200":{"description":"Link updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Domains"],"operationId":"deleteLink","summary":"Delete a link","security":[{"bearerAuth":[]}],"parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Link deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLinkResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/me/variables":{"get":{"tags":["Variables"],"operationId":"listVariables","summary":"List service variables","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Variables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/me/variables/{name}":{"put":{"tags":["Variables"],"operationId":"setVariable","summary":"Create or update a service variable","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableSetRequest"}}}},"responses":{"200":{"description":"Variable stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Variables"],"operationId":"deleteVariable","summary":"Delete a service variable","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Variable deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/me/keys":{"get":{"tags":["Auth"],"operationId":"listApiKeys","summary":"List API keys","description":"Lists active API keys for the account with masked values. Fetch a full value with the reveal endpoint, or roll a key to rotate its secret. `current` marks the key used to authenticate this request.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Auth"],"operationId":"createApiKey","summary":"Create a named API key","description":"Creates a new named API key (`csk_` prefix). Accounts can hold up to 50 active keys. The full value is also retrievable later via the reveal endpoint.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/me/keys/{id}":{"delete":{"tags":["Auth"],"operationId":"revokeApiKey","summary":"Revoke an API key","description":"Revokes one API key immediately; other keys are unaffected. Use the special id `legacy` to revoke the account's original default key.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRevokeResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Auth"],"operationId":"renameApiKey","summary":"Rename an API key","description":"Updates the display name of an API key. The key value is unchanged.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRenameRequest"}}}},"responses":{"200":{"description":"API key renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRenameResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/support":{"post":{"tags":["Support"],"operationId":"createSupportRequest","summary":"Send an authenticated support request","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequest"}}}},"responses":{"200":{"description":"Support request sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/me/keys/{id}/reveal":{"get":{"tags":["Auth"],"operationId":"revealApiKey","summary":"Reveal an API key","description":"Returns the full plaintext value of an API key (owner only). Only works for keys created with reveal support (stored encrypted at rest); older hash-only keys return 410 — roll them to obtain a revealable value.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Full API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRevealResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/me/keys/{id}/roll":{"post":{"tags":["Auth"],"operationId":"rollApiKey","summary":"Roll (rotate) an API key","description":"Rotates the secret of an API key in place, keeping the same id and name. The previous value stops working immediately. The new full value is returned once (and stored encrypted for later reveal).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key rolled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRollResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/rename":{"post":{"tags":["Sites"],"operationId":"renameSite","summary":"Rename a Site's slug","description":"Changes the Site's slug (its {slug}.cresa.one subdomain). Validates format, reserved names, and availability. Stored files are unaffected; only the public URL changes. Links, profile listings, and analytics are updated to the new slug.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteRenameRequest"}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteRenameResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/slug-available":{"get":{"tags":["Sites"],"operationId":"checkSlugAvailable","summary":"Check slug availability","description":"Returns whether a slug is valid and free to use for a new or renamed Site.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugAvailabilityResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/slug-suggest":{"get":{"tags":["Sites"],"operationId":"suggestSlug","summary":"Suggest an available slug","description":"Returns a fresh, available friendly slug ({adjective}-{noun}-{aDaD}).","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Suggested slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugSuggestResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/tags":{"get":{"tags":["Tags & Views"],"operationId":"listTags","summary":"List tags with counts","description":"All distinct tags used across the account's Sites, with usage counts.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagsListResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/tags":{"get":{"tags":["Tags & Views"],"operationId":"getSiteTags","summary":"Get a Site's tags","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteTagsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Tags & Views"],"operationId":"setSiteTags","summary":"Replace a Site's tags","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteTagsPutRequest"}}}},"responses":{"200":{"description":"Updated tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteTagsResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/views":{"get":{"tags":["Tags & Views"],"operationId":"listViews","summary":"List smart views","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Views","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewsListResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Tags & Views"],"operationId":"createView","summary":"Create a smart view","description":"A view groups Sites by tags (matchMode any|all); membership is computed live.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewCreateRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/views/{id}":{"patch":{"tags":["Tags & Views"],"operationId":"updateView","summary":"Update a smart view","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewUpdateRequest"}}}},"responses":{"200":{"description":"Updated view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Tags & Views"],"operationId":"deleteView","summary":"Delete a smart view","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewDeleteResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/views/{id}/sites":{"get":{"tags":["Tags & Views"],"operationId":"getViewSites","summary":"Resolve a view's Sites","description":"Sites currently matching the view's tags, computed live.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Matching sites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewSitesResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/publish/{slug}/status":{"post":{"tags":["Sites"],"operationId":"setSiteStatus","summary":"Change a Site's publish status","description":"Sets the Site status to one of the supported values (published, pending, archived, disabled). Owner only.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteStatusSetRequest"}}}},"responses":{"200":{"description":"Updated status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteStatusResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/uploads/{kind}/{id}":{"put":{"tags":["Sites"],"operationId":"uploadToTarget","summary":"Upload bytes to a staged file target","description":"Local upload sink. The upload URLs returned by the Site publish flow (POST /api/v1/publish) and the Drive staging flow (POST /api/v1/drives/{driveId}/files/uploads) point here; the {id} segment is the single-use upload capability, so no Authorization header is required. Send the raw file bytes as the request body with the file Content-Type.","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["site","drive"]},"description":"Whether the target is a Site file or a Drive file."},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Upload target id (capability) from the create/stage response."}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSinkResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Upload target not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"Use `Authorization: Bearer <API_KEY>`. Drive share tokens also use Bearer auth for Drive-scoped operations."}},"schemas":{"ErrorResponse":{"type":"object","description":"Structured JSON error envelope. The `error` field is retained for backwards compatibility; agents should prefer `code`, `message`, `retry_after`, and `docs_url` when present.","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["bad_request","invalid_json","invalid_request","unauthorized","forbidden","not_found","conflict","gone","rate_limit_exceeded","storage_not_configured","service_unavailable","internal_error"]},"message":{"type":"string"},"details":{"description":"Optional route-specific details. May be a string, object, or array."},"retry_after":{"type":"integer","description":"Seconds to wait before retrying. Also mirrored in the Retry-After header when present."},"docs_url":{"type":"string","format":"uri"}},"required":["error","code","message"],"additionalProperties":true},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":true},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"AgentAuthRequestCodeRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"]},"AgentAuthRequestCodeResponse":{"type":"object","properties":{"success":{"type":"boolean"},"requiresCodeEntry":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}},"required":["success","requiresCodeEntry","expiresAt"]},"AgentAuthVerifyCodeRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"code":{"type":"string","minLength":4,"maxLength":32}},"required":["email","code"]},"AgentAuthVerifyCodeResponse":{"type":"object","properties":{"success":{"type":"boolean"},"email":{"type":"string","format":"email"},"apiKey":{"type":"string"},"isNewUser":{"type":"boolean"}},"required":["success","email","apiKey","isNewUser"]},"PublishFile":{"type":"object","properties":{"path":{"type":"string","minLength":1},"size":{"type":"integer","minimum":0},"contentType":{"type":"string"},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["path","size"]},"ViewerMetadata":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":2000},"ogImagePath":{"type":"string","minLength":1}}},"PublishCreateRequest":{"type":"object","properties":{"files":{"type":"array","minItems":1,"maxItems":1000,"items":{"$ref":"#/components/schemas/PublishFile"}},"ttlSeconds":{"type":["integer","null"],"minimum":1},"viewer":{"$ref":"#/components/schemas/ViewerMetadata"},"claimToken":{"type":"string","minLength":1},"spaMode":{"type":"boolean"}},"required":["files"]},"UploadTarget":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string","const":"PUT"},"url":{"type":"string","format":"uri"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["path","method","url","headers"]},"PublishUpload":{"type":"object","properties":{"versionId":{"type":"string"},"uploads":{"type":"array","items":{"$ref":"#/components/schemas/UploadTarget"}},"skipped":{"type":"array","items":{"type":"string"}},"finalizeUrl":{"type":"string","format":"uri"},"expiresInSeconds":{"type":"integer"}},"required":["versionId","uploads","finalizeUrl","expiresInSeconds"]},"PublishCreateResponse":{"type":"object","properties":{"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"status":{"type":"string"},"isLive":{"type":"boolean"},"requiresFinalize":{"type":"boolean"},"note":{"type":"string"},"upload":{"$ref":"#/components/schemas/PublishUpload"},"claimToken":{"type":"string"},"claimUrl":{"type":"string","format":"uri"},"expiresAt":{"type":["string","null"],"format":"date-time"},"anonymous":{"type":"boolean"},"warning":{"type":"string"}},"required":["slug","siteUrl","status","isLive","requiresFinalize","upload"],"additionalProperties":true},"FinalizePublishRequest":{"type":"object","properties":{"versionId":{"type":"string","minLength":1}},"required":["versionId"]},"FinalizePublishResponse":{"type":"object","properties":{"success":{"type":"boolean"},"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"currentVersionId":{"type":"string"},"previousVersionId":{"type":["string","null"]}},"required":["success","slug","siteUrl","currentVersionId"],"additionalProperties":true},"PublishListResponse":{"type":"object","properties":{"publishes":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/SiteStatus"},"currentVersionId":{"type":["string","null"]},"pendingVersionId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"description":"Tags on the Site."},"title":{"type":"string","nullable":true,"description":"Viewer title, or null."},"description":{"type":"string","nullable":true,"description":"Viewer description, or null."},"viewer":{"type":"object","nullable":true,"description":"Viewer metadata, or null.","properties":{"title":{"type":"string"},"description":{"type":"string"},"ogImagePath":{"type":"string"}}}},"required":["slug","siteUrl","updatedAt","expiresAt","status","currentVersionId","pendingVersionId"]}}},"required":["publishes"]},"SiteSearchResult":{"type":"object","properties":{"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"primaryUrl":{"type":["string","null"],"format":"uri"},"ownership":{"type":"string","enum":["owned","shared"]},"sharedSource":{"type":["string","null"],"enum":["email","domain",null]},"currentVersionId":{"type":["string","null"]},"indexedVersionId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"matchedFields":{"type":"array","items":{"type":"string","examples":["slug","url","domain","viewer_title","viewer_description","content"]}},"matchedPaths":{"type":"array","items":{"type":"string"}},"snippet":{"type":["string","null"]}},"required":["slug","siteUrl","primaryUrl","ownership","sharedSource","currentVersionId","indexedVersionId","updatedAt","matchedFields","matchedPaths","snippet"]},"SiteSearchResponse":{"type":"object","properties":{"query":{"type":"string"},"nextCursor":{"type":["string","null"]},"results":{"type":"array","items":{"$ref":"#/components/schemas/SiteSearchResult"}}},"required":["query","nextCursor","results"]},"SiteDataRecordInput":{"type":"object","description":"Record data validated against the target collection schema from .cresaone/data.json. Allowed fields and value types depend on that collection.","additionalProperties":true},"SiteDataRecord":{"type":"object","properties":{"id":{"type":"string","pattern":"^rec_[0-9A-HJKMNP-TV-Z]{26}$"},"data":{"type":"object","description":"Projected record data after validation against the current collection schema.","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","data","createdAt","updatedAt"]},"SiteDataRecordResponse":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/SiteDataRecord"}},"required":["record"]},"SiteDataRecordListResponse":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/SiteDataRecord"}},"nextCursor":{"type":["string","null"]}},"required":["records","nextCursor"]},"SiteDataDeleteResponse":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"]},"ProfileSettings":{"type":"object","properties":{"profileFeedId":{"type":"string","pattern":"^pf_[a-z0-9]{10}$"},"username":{"type":"string","minLength":3,"maxLength":30},"enabled":{"type":"boolean"},"addNewSitesToProfile":{"type":"boolean"},"url":{"type":"string","format":"uri"},"feedUrl":{"type":"string","format":"uri"},"updatedAt":{"type":"string","format":"date-time"}},"required":["profileFeedId","username","enabled","addNewSitesToProfile","url","feedUrl","updatedAt"]},"ProfileSite":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"addedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"profileUpdatedAt":{"type":"string","format":"date-time"}},"required":["slug","url","thumbnailUrl","addedAt","updatedAt","profileUpdatedAt"],"additionalProperties":true},"ProfileResponse":{"allOf":[{"$ref":"#/components/schemas/ProfileSettings"},{"type":"object","properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/ProfileSite"}}},"required":["sites"]}]},"ProfileSitesResponse":{"type":"object","properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/ProfileSite"}}},"required":["sites"]},"ProfileSitesMutationResponse":{"type":"object","properties":{"success":{"type":"boolean"},"sites":{"type":"array","items":{"$ref":"#/components/schemas/ProfileSite"}}},"required":["success","sites"]},"ProfileSettingsPatchRequest":{"type":"object","properties":{"enabled":{"type":"boolean"},"addNewSitesToProfile":{"type":"boolean"}}},"ProfileUsernamePatchRequest":{"type":"object","properties":{"username":{"type":"string","minLength":1}},"required":["username"]},"ProfileSiteAddRequest":{"type":"object","properties":{"slug":{"type":"string","minLength":1}},"required":["slug"]},"PublishDetailsResponse":{"type":"object","properties":{"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"status":{"$ref":"#/components/schemas/SiteStatus"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"currentVersionId":{"type":["string","null"]},"pendingVersionId":{"type":["string","null"]},"manifest":{"type":"array","items":{"$ref":"#/components/schemas/PublishFile"}},"spaRouting":{"type":"boolean","description":"Whether SPA routing (index.html fallback) is enabled."},"viewer":{"type":"object","nullable":true,"description":"Viewer metadata, or null.","properties":{"title":{"type":"string"},"description":{"type":"string"},"ogImagePath":{"type":"string"}}},"tags":{"type":"array","items":{"type":"string"},"description":"Tags on the Site."}},"required":["slug","siteUrl","status","createdAt","updatedAt","expiresAt","currentVersionId","pendingVersionId","manifest"]},"AnalyticsRange":{"type":"string","enum":["24h","7d","30d","90d","all"],"default":"30d"},"AnalyticsSeriesPoint":{"type":"object","properties":{"bucket":{"type":"string","format":"date","description":"UTC day in YYYY-MM-DD format."},"views":{"type":"integer","minimum":0},"visitors":{"type":"integer","minimum":0}},"required":["bucket","views","visitors"]},"SiteAnalyticsResponse":{"type":"object","properties":{"slug":{"type":"string"},"analyticsStartedAt":{"type":["string","null"],"format":"date-time"},"lastEventAt":{"type":["string","null"],"format":"date-time"},"range":{"$ref":"#/components/schemas/AnalyticsRange"},"totals":{"type":"object","properties":{"allTimeViews":{"type":"integer","minimum":0},"rangeViews":{"type":"integer","minimum":0},"rangeVisitors":{"type":"integer","minimum":0}},"required":["allTimeViews","rangeViews","rangeVisitors"]},"series":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsSeriesPoint"}},"topPaths":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"views":{"type":"integer","minimum":0}},"required":["path","views"]}},"topReferrers":{"type":"array","items":{"type":"object","properties":{"referrer":{"type":"string"},"views":{"type":"integer","minimum":0}},"required":["referrer","views"]}},"topCountries":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"Coarse country code or Unknown."},"views":{"type":"integer","minimum":0}},"required":["country","views"]}},"topCrawlers":{"type":"array","items":{"type":"object","properties":{"crawler":{"type":"string"},"hits":{"type":"integer","minimum":0}},"required":["crawler","hits"]}},"top404Paths":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"referrer":{"type":"string"},"hits":{"type":"integer","minimum":0}},"required":["path","referrer","hits"]}}},"required":["slug","analyticsStartedAt","lastEventAt","range","totals","series","topPaths","topReferrers","topCountries","topCrawlers","top404Paths"]},"AccountAnalyticsResponse":{"type":"object","properties":{"analyticsStartedAt":{"type":["string","null"],"format":"date-time"},"lastEventAt":{"type":["string","null"],"format":"date-time"},"range":{"$ref":"#/components/schemas/AnalyticsRange"},"totals":{"type":"object","properties":{"allTimeViews":{"type":"integer","minimum":0},"rangeViews":{"type":"integer","minimum":0},"rangeVisitors":{"type":"integer","minimum":0},"assetHits":{"type":"integer","minimum":0},"notFoundHits":{"type":"integer","minimum":0},"botHits":{"type":"integer","minimum":0}},"required":["allTimeViews","rangeViews","rangeVisitors","assetHits","notFoundHits","botHits"]},"series":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsSeriesPoint"}},"topSites":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"views":{"type":"integer","minimum":0},"visitors":{"type":"integer","minimum":0}},"required":["slug","views","visitors"]}},"topReferrers":{"type":"array","items":{"type":"object","properties":{"referrer":{"type":"string"},"views":{"type":"integer","minimum":0}},"required":["referrer","views"]}},"topPaths":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"path":{"type":"string"},"views":{"type":"integer","minimum":0}},"required":["slug","path","views"]}},"topCountries":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"Coarse country code or Unknown."},"views":{"type":"integer","minimum":0}},"required":["country","views"]}},"topCrawlers":{"type":"array","items":{"type":"object","properties":{"crawler":{"type":"string"},"hits":{"type":"integer","minimum":0}},"required":["crawler","hits"]}},"top404Paths":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"path":{"type":"string"},"hits":{"type":"integer","minimum":0}},"required":["slug","path","hits"]}}},"required":["analyticsStartedAt","lastEventAt","range","totals","series","topSites","topReferrers","topPaths","topCountries","topCrawlers","top404Paths"]},"ClaimSiteRequest":{"type":"object","properties":{"claimToken":{"type":"string","minLength":1}},"required":["claimToken"]},"ClaimSiteResponse":{"type":"object","properties":{"success":{"type":"boolean"},"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"expiresAt":{"type":"null"}},"required":["success","slug","siteUrl","expiresAt"]},"PublishMetadataPatchRequest":{"type":"object","properties":{"ttlSeconds":{"type":["integer","null"],"minimum":1},"viewer":{"$ref":"#/components/schemas/ViewerMetadata"},"password":{"type":["string","null"],"minLength":1,"maxLength":128},"spaMode":{"type":["boolean","null"]}}},"PublishMetadataPatchResponse":{"type":"object","properties":{"success":{"type":"boolean"},"passwordProtected":{"type":"boolean"},"spaMode":{"type":"boolean"},"note":{"type":"string"}},"required":["success"],"additionalProperties":true},"SiteAccessPolicy":{"type":"object","properties":{"mode":{"type":"string","enum":["anyone_with_link","password","restricted"],"description":"Active access mode for the Site."},"accessPolicyVersion":{"type":"integer","minimum":0,"description":"Increments on every access change. Changing the policy invalidates older viewer grants."},"allowedEmails":{"type":"array","items":{"type":"string","format":"email"},"description":"Exact-email allowlist. Empty unless mode is restricted."},"allowedDomains":{"type":"array","items":{"type":"string"},"description":"Email-domain allowlist. Empty unless mode is restricted."}},"required":["mode","accessPolicyVersion","allowedEmails","allowedDomains"]},"SiteAccessResponse":{"type":"object","properties":{"access":{"$ref":"#/components/schemas/SiteAccessPolicy"},"notifications":{"$ref":"#/components/schemas/SiteAccessNotifications","description":"Present on PATCH responses when notify is true and invite emails were sent or skipped."}},"required":["access"],"additionalProperties":true},"SiteAccessPatchRequest":{"type":"object","properties":{"mode":{"type":"string","enum":["anyone_with_link","restricted"],"description":"Target access mode. Use the metadata endpoint to enable password mode."},"allowedEmails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":200,"description":"Full replacement exact-email allowlist. Used only with restricted mode. Normalized to lowercase."},"allowedDomains":{"type":"array","items":{"type":"string"},"maxItems":200,"description":"Full replacement email-domain allowlist (e.g. example.com). Used only with restricted mode. Normalized to lowercase."},"notify":{"type":"boolean","description":"When true, sends invite emails to exact-email addresses newly added by this request. Confirm with the user before sending."}},"required":["mode"]},"SiteAccessInviteRequest":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":200}},"required":["emails"]},"SiteAccessNotifications":{"type":"object","properties":{"sent":{"type":"array","items":{"type":"string","format":"email"}},"failed":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"error":{"type":"string"}},"required":["email","error"]}},"skipped":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"reason":{"type":"string","enum":["not_allowed"]}},"required":["email","reason"]}}},"required":["sent","failed","skipped"]},"SiteAccessInviteResponse":{"type":"object","properties":{"notifications":{"$ref":"#/components/schemas/SiteAccessNotifications"}},"required":["notifications"]},"PublishFromDriveRequest":{"type":"object","properties":{"driveId":{"type":"string","minLength":1},"versionId":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"spaMode":{"type":"boolean"},"password":{"type":"string","minLength":1,"maxLength":128},"viewer":{"$ref":"#/components/schemas/ViewerMetadata"}},"required":["driveId"]},"PublishFromDriveResponse":{"type":"object","properties":{"success":{"type":"boolean"},"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"driveId":{"type":"string"},"driveVersionId":{"type":"string"},"currentVersionId":{"type":"string"},"filesCount":{"type":"integer"}},"required":["success","slug","siteUrl","driveId","driveVersionId","currentVersionId","filesCount"]},"Drive":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"isDefault":{"type":"boolean"},"headVersionId":{"type":["string","null"]},"dashboardUrl":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","isDefault","headVersionId","dashboardUrl","createdAt","updatedAt"],"additionalProperties":true},"DriveCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"isDefault":{"type":"boolean"}}},"DrivePatchRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"isDefault":{"type":"boolean"}}},"DriveResponse":{"type":"object","properties":{"drive":{"$ref":"#/components/schemas/Drive"},"headVersionId":{"type":["string","null"]},"token":{"type":"object","properties":{"id":{"type":"string"},"perms":{"type":"string","enum":["read","write"]},"manageTokens":{"type":"boolean"},"pathPrefix":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"}}}},"required":["drive"],"additionalProperties":true},"DriveListResponse":{"type":"object","properties":{"drives":{"type":"array","items":{"$ref":"#/components/schemas/Drive"}}},"required":["drives"]},"DeleteDriveResponse":{"type":"object","properties":{"success":{"type":"boolean"},"recoverableUntil":{"type":"string","format":"date-time"}},"required":["success","recoverableUntil"]},"DriveFile":{"type":"object","properties":{"path":{"type":"string"},"etag":{"type":"string"},"versionId":{"type":["string","null"]},"size":{"type":"integer"},"contentType":{"type":"string"},"sha256":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"lastModifiedBy":{"type":["object","null"],"additionalProperties":true},"lastOperation":{"type":["string","null"]}},"required":["path","etag","versionId","size","contentType","sha256","updatedAt"]},"DriveFileListResponse":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/DriveFile"}},"nextCursor":{"type":["string","null"]}},"required":["files","nextCursor"]},"DriveUploadCreateRequest":{"type":"object","properties":{"path":{"type":"string","minLength":1},"size":{"type":"integer","minimum":0},"contentType":{"type":"string"},"sha256":{"type":"string","pattern":"^(sha256:)?[a-f0-9]{64}$"},"ifMatch":{"type":"string"},"ifNoneMatch":{"type":"string","const":"*"}},"required":["path","size"]},"DriveUploadCreateResponse":{"type":"object","properties":{"uploadId":{"type":"string"},"method":{"type":"string","const":"PUT"},"url":{"type":"string","format":"uri"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"expiresInSeconds":{"type":"integer"}},"required":["uploadId","method","url","headers","expiresInSeconds"],"additionalProperties":true},"DriveFinalizeRequest":{"type":"object","properties":{"uploadId":{"type":"string","minLength":1},"path":{"type":"string","minLength":1}},"required":["uploadId"]},"DriveMoveRequest":{"type":"object","properties":{"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"ifMatch":{"type":"string","minLength":1},"overwriteIfMatch":{"type":"string","minLength":1}},"required":["from","to","ifMatch"]},"DriveBatchRequest":{"type":"object","properties":{"baseVersionId":{"type":"string"},"ops":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"op":{"type":"string","enum":["write","create","delete","move"]},"path":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"uploadId":{"type":"string"},"ifMatch":{"type":"string"},"ifNoneMatch":{"type":"string","const":"*"},"overwriteIfMatch":{"type":"string"}},"required":["op"],"additionalProperties":false}}},"required":["ops"]},"DriveBatchResponse":{"type":"object","properties":{"success":{"type":"boolean"},"driveId":{"type":"string"},"versionId":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/DriveFile"}},"deleted":{"type":"boolean"}},"additionalProperties":true},"DriveTokenCreateRequest":{"type":"object","properties":{"perms":{"type":"string","enum":["read","write"]},"permissions":{"type":"string","enum":["read","write"]},"manageTokens":{"type":"boolean","default":false},"pathPrefix":{"type":["string","null"]},"ttl":{"type":["string","null"],"example":"7d"},"label":{"type":["string","null"],"maxLength":200}}},"DriveToken":{"type":"object","properties":{"id":{"type":"string"},"perms":{"type":"string","enum":["read","write"]},"manageTokens":{"type":"boolean"},"pathPrefix":{"type":["string","null"]},"label":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true},"DriveTokenListResponse":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/DriveToken"}}},"required":["tokens"]},"DriveTokenCreateResponse":{"type":"object","properties":{"token":{"type":"string","description":"Secret token value. Returned only when created."},"drive":{"$ref":"#/components/schemas/Drive"}},"additionalProperties":true},"CreateDomainRequest":{"type":"object","properties":{"domain":{"type":"string"}},"required":["domain"]},"DnsInstruction":{"type":"object","properties":{"type":{"type":"string"},"host":{"type":"string"},"value":{"type":"string"}},"required":["type","host","value"]},"DomainResponse":{"type":"object","properties":{"domain":{"type":"string"},"namespace_id":{"type":"string"},"status":{"type":"string","enum":["pending","active","error"]},"ssl_status":{"type":["string","null"]},"is_apex":{"type":"boolean"},"dns_instructions":{"type":"array","items":{"$ref":"#/components/schemas/DnsInstruction"}},"www_companion":{"type":"object","additionalProperties":true}},"additionalProperties":true},"DomainListResponse":{"type":"object","properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/DomainResponse"}}},"required":["domains"]},"HandleRequest":{"type":"object","properties":{"handle":{"type":"string"},"username":{"type":"string"}}},"HandleResponse":{"type":"object","properties":{"handle":{"type":["string","null"]},"hostname":{"type":["string","null"]},"links":{"type":"array","items":{"$ref":"#/components/schemas/LinkResponse"}}},"additionalProperties":true},"LinkRequest":{"type":"object","properties":{"location":{"type":"string"},"mount_path":{"type":"string"},"slug":{"type":"string"},"domain":{"type":"string"},"namespace_id":{"type":"string"}},"required":["slug"]},"LinkPatchRequest":{"type":"object","properties":{"slug":{"type":"string"},"domain":{"type":"string"},"namespace_id":{"type":"string"}},"required":["slug"]},"LinkResponse":{"type":"object","properties":{"location":{"type":["string","null"]},"slug":{"type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"type":["string","null"],"format":"uri"},"created_at":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true},"LinkListResponse":{"type":"object","properties":{"hostname":{"type":["string","null"]},"links":{"type":"array","items":{"$ref":"#/components/schemas/LinkResponse"}}},"required":["links"]},"DeleteLinkResponse":{"type":"object","properties":{"deleted":{"type":"boolean"},"location":{"type":["string","null"]}},"required":["deleted"]},"VariableListResponse":{"type":"object","properties":{"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}}},"required":["variables"]},"VariableSetRequest":{"type":"object","properties":{"value":{"type":"string"},"pinToUpstreamOrigin":{"type":"boolean"}},"required":["value"]},"VariableResponse":{"type":"object","properties":{"success":{"type":"boolean"},"name":{"type":"string"}},"additionalProperties":true},"SupportRequest":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","minLength":1,"maxLength":5000}},"required":["subject","message"]},"ApiKeyListResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Key UUID, or `legacy` for the original sign-up key."},"name":{"type":"string","description":"Key label; blank for the original sign-up key."},"key":{"type":"string","description":"Masked key (prefix…suffix). Use the reveal endpoint for the full value."},"keySuffix":{"type":"string","description":"Last 4 characters of the key, for display."},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"current":{"type":"boolean","description":"True for the key that authenticated this request."},"keyPrefix":{"type":"string","description":"Visible key prefix (e.g. csk_…)."},"revealable":{"type":"boolean","description":"True if the full value can be fetched via the reveal endpoint."}},"required":["id","name","key","keySuffix","createdAt","keyPrefix","revealable"]}},"limit":{"type":"integer","description":"Maximum active named keys per account."}},"required":["keys","limit"]},"ApiKeyCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Label for the key, e.g. the agent or tool that will use it (claude, cursor)."}},"required":["name"]},"ApiKeyCreateResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":"string","description":"Full API key (`csk_` prefix)."},"keySuffix":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","key","keySuffix","createdAt"]},"ApiKeyRevokeResponse":{"type":"object","properties":{"revoked":{"type":"boolean","const":true},"id":{"type":"string"}},"required":["revoked","id"]},"ApiKeyRenameRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"New label for the key."}},"required":["name"]},"ApiKeyRenameResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"ApiKeyRevealResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string","description":"Full API key value (`csk_` prefix)."}},"required":["id","name","key"]},"ApiKeyRollResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string","description":"New full API key value (`csk_` prefix)."},"keySuffix":{"type":"string"},"rolled":{"type":"boolean","const":true}},"required":["id","name","key","keySuffix","rolled"]},"SiteRenameRequest":{"type":"object","properties":{"slug":{"type":"string","minLength":3,"maxLength":63,"description":"New slug (3–63 chars, lowercase letters/numbers/hyphens)."}},"required":["slug"]},"SiteRenameResponse":{"type":"object","properties":{"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"}},"required":["slug","siteUrl"]},"SlugAvailabilityResponse":{"type":"object","properties":{"slug":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":"string","description":"Why it is unavailable, when available is false."}},"required":["slug","available"]},"SlugSuggestResponse":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]},"TagCount":{"type":"object","properties":{"tag":{"type":"string"},"count":{"type":"integer"}},"required":["tag","count"]},"TagsListResponse":{"type":"object","properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/TagCount"}}},"required":["tags"]},"SiteTagsResponse":{"type":"object","properties":{"slug":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["slug","tags"]},"SiteTagsPutRequest":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"},"maxItems":200,"description":"Full replacement tag list. Normalized to lowercase, deduped, max 50 kept, ≤32 chars each."}},"required":["tags"]},"SmartView":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"matchMode":{"type":"string","enum":["any","all"]},"count":{"type":"integer","description":"Number of Sites currently in the view."},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","tags","matchMode","updatedAt"]},"ViewsListResponse":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/SmartView"}}},"required":["views"]},"ViewCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"tags":{"type":"array","items":{"type":"string"},"default":[]},"matchMode":{"type":"string","enum":["any","all"],"default":"any"}},"required":["name"]},"ViewUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"tags":{"type":"array","items":{"type":"string"}},"matchMode":{"type":"string","enum":["any","all"]}}},"ViewDeleteResponse":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"id":{"type":"string"}},"required":["deleted","id"]},"ViewSitesResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"matchMode":{"type":"string","enum":["any","all"]},"tags":{"type":"array","items":{"type":"string"}},"publishes":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"siteUrl":{"type":"string","format":"uri"},"updatedAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}}},"required":["id","name","matchMode","tags","publishes"]},"SiteStatus":{"type":"string","enum":["published","pending","archived","disabled"],"description":"Publish status of a Site. published = publicly served; pending = created but not yet finalized; archived = retained but delisted; disabled = access turned off."},"SiteStatusSetRequest":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/SiteStatus"}}},"SiteStatusResponse":{"type":"object","required":["slug","status"],"properties":{"slug":{"type":"string"},"status":{"$ref":"#/components/schemas/SiteStatus"}}},"UploadSinkResponse":{"type":"object","required":["ok","path","size"],"properties":{"ok":{"type":"boolean"},"path":{"type":"string","description":"Stored file path."},"size":{"type":"integer","description":"Bytes written."}}}}}}