{"openapi":"3.1.0","info":{"title":"here.now API","version":"0.1.0","summary":"API for publishing Sites and storing private agent files in Drives.","description":"here.now 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@here.now","url":"https://here.now"}},"servers":[{"url":"https://here.now"}],"externalDocs":{"description":"Canonical here.now docs","url":"https://here.now/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."}],"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.","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"}}],"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":"here.now 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 /.herenow/data/:collection endpoint instead.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"here.now Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .herenow/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":"here.now Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .herenow/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":"here.now Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .herenow/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":"here.now Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .herenow/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":"here.now Site slug.","schema":{"type":"string","minLength":1}},{"name":"collection","in":"path","required":true,"description":"Site Data collection name from the Site's .herenow/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. Password-protected Sites cannot be shown on a profile. 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":"here.now 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":"here.now 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":"here.now 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":"here.now 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":"here.now 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":"here.now 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":"here.now 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.","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"here.now 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/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/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"}}}}}}}},"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":{"type":"string"},"currentVersionId":{"type":["string","null"]},"pendingVersionId":{"type":["string","null"]}},"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"},"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","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 .herenow/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":{"type":"string"},"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"}}},"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},"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"]}}}}