{"openapi":"3.1.0","info":{"title":"NextPages API","version":"1.0.0","description":"Publish HTML pages and static sites. Authenticate with `Authorization: Bearer mpk_…` (create tokens in Dashboard → Settings, any account). Publishing needs an account (signing up is free); requests without a token get `sign_in_required` (401). Errors are JSON `{error:{code,message}}`. Writes accept an `Idempotency-Key` header. Single-request uploads are limited to 25 MB; use staged uploads for larger sites."},"servers":[{"url":"https://mypages.page/api"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Page":{"type":"object","properties":{"id":{"type":"string","example":"a8x92kq0zt"},"title":{"type":"string"},"url":{"type":"string","format":"uri","description":"The page's link: https://<your subdomain>/<page> or https://share.<domain>/<page> (address), or a legacy page subdomain"},"share_url":{"type":"string","format":"uri"},"content_url":{"type":"string","format":"uri"},"urls":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","expired","deleted","removed"]},"password_protected":{"type":"boolean"},"viewer_verification":{"type":"boolean","description":"Viewers must verify their email (code or Google) before the page opens; views are tracked."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"storage_bytes":{"type":"integer","description":"Bytes of every kept version of the page (counts against your storage quota)"},"live_bytes":{"type":"integer","description":"Bytes of the live version alone; the rest of storage_bytes is older versions kept for history"},"file_count":{"type":"integer"},"view_count":{"type":"integer"},"subdomain":{"type":["string","null"],"description":"Legacy page subdomain (new ones can't be set)"},"address":{"type":"string","enum":["home","share"],"description":"\"home\": the link is on your (or the team's) subdomain; \"share\": on share.<domain>, without naming you"},"path_slug":{"type":["string","null"],"description":"The page's name in the path on its subdomain (free to change); the page id when null"},"share_slug":{"type":["string","null"],"description":"The page's name on share.<domain> (paid plans, limited per account); the page id when null"},"on_profile":{"type":"boolean","description":"Personal pages: listed on the owner's profile subdomain. Team pages: listed on the creator's member homepage once approved (see listing)"},"on_personal_profile":{"type":"boolean","description":"Team pages: also listed on the creator's personal profile subdomain (paid plans; never for team-only pages). Always false for personal pages"},"team_only":{"type":"boolean","description":"Team pages: only the team's audience may open it"},"listing":{"type":["object","null"],"description":"Team pages: member-homepage listing state (unlisted, pending, listed, rejected, flagged, hidden) and reason"},"archived":{"type":"boolean","description":"Kept under Archived in the dashboard; the page still serves and expires as usual"},"source_name":{"type":["string","null"],"description":"Name of the uploaded file (single file or ZIP) of the current version"},"github_repo":{"type":["string","null"],"description":"\"owner/repo\" when the page publishes from GitHub"},"org_id":{"type":["string","null"],"description":"The team the page belongs to; null for a page in your personal space"},"created_by":{"type":["string","null"],"description":"Account id of whoever published it"},"team_visible":{"type":"boolean","description":"Team pages: every member sees it (true), or only its creator and the team's owners and admins"},"permissions":{"type":"object","description":"Team listings only: what you may do with it","properties":{"edit":{"type":"boolean"},"manage":{"type":"boolean","description":"Owner/admin actions such as moving it out of the team"}}},"custom_url":{"type":["string","null"],"format":"uri","description":"Team pages of an Enterprise team with an active custom domain: the page there (https://docs.example.com/<label or id>/). The link to share; url keeps working. Null for pages with a password or verified viewers unless the team serves only on its custom domains: they stay on their own address."},"allow_fork":{"type":"boolean","description":"Visitors may fork (copy) the page to their own account. Protected pages never can, even with this on"},"fork_count":{"type":"integer","description":"Active forks of this page"},"forked_from":{"type":["object","null"],"description":"The page this one was forked from; url is null once the original is gone or expired","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":["string","null"],"format":"uri"}}},"summary":{"type":["string","null"],"description":"One line about the page, shown under its address on page cards, in the page's own language. Written by AI after each publish or update unless the owner wrote their own or turned AI summaries off. Null = not written yet; empty = none"},"summary_source":{"type":["string","null"],"enum":["ai","user",null],"description":"ai: written by AI (rewritten when the page changes); user: the owner's own (AI leaves it alone)"},"summary_hidden":{"type":"boolean","description":"The owner hides the summary on page cards"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"}}}}},"PublishResult":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string"},"share_url":{"type":"string"},"expires_at":{"type":["string","null"]},"password_protected":{"type":"boolean"},"page":{"$ref":"#/components/schemas/Page"},"workspace":{"$ref":"#/components/schemas/Workspace"},"warnings":{"type":"array","items":{"type":"string"}}}},"Workspace":{"type":"object","description":"Where a page lives: {\"kind\": \"personal\"} or {\"kind\": \"team\", \"id\", \"name\", \"slug\"}","properties":{"kind":{"type":"string","enum":["personal","team"]},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}},"Org":{"type":"object","properties":{"id":{"type":"string","example":"org_a1b2c3d4e5f6g7h8i9j0"},"name":{"type":"string"},"slug":{"type":"string","description":"The team's address, usable as `workspace`"},"plan":{"type":"string","enum":["team","enterprise","comp"]},"role":{"type":"string","enum":["owner","admin","member"],"description":"Your role"},"settings":{"type":"object","properties":{"members_can_edit_all":{"type":"boolean"},"home_comments":{"type":"boolean"},"members_publish_here":{"type":"boolean"}}},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/pages":{"get":{"summary":"List pages","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search title, custom subdomain, page id, uploaded file name and file paths"},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"},"description":"true: only archived pages; false: only pages not archived; omit for both"},{"name":"workspace","in":"query","required":false,"schema":{"type":"string"},"description":"Publish to (or list) \"personal\" (default) or one of your teams, by id (\"org_…\") or address (slug). Any member may publish into their team with their personal token; others get 404. Also accepted as a `workspace` body field."},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"description":"With a team workspace: only pages published by this account id, or \"me\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}},"workspace":{"$ref":"#/components/schemas/Workspace"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"post":{"summary":"Publish a page","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"workspace","in":"query","required":false,"schema":{"type":"string"},"description":"Publish to (or list) \"personal\" (default) or one of your teams, by id (\"org_…\") or address (slug). Any member may publish into their team with their personal token; others get 404. Also accepted as a `workspace` body field."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"An .html file, a .zip, or several files (repeat the field, with matching `path` fields)"},"path":{"type":"string","description":"Relative path for the file at the same position"},"html":{"type":"string","description":"HTML source (instead of file)"},"title":{"type":"string"},"password":{"type":"string"},"expiration":{"type":"string","example":"7d"},"address":{"type":"string","enum":["home","share"]},"share_slug":{"type":"string","description":"Paid plans: a name on share.<domain>"},"workspace":{"type":"string","description":"\"personal\" or a team id or address"}}}},"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"},"files":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"content":{"type":"string"},"content_base64":{"type":"string"}}}},"title":{"type":"string"},"password":{"type":"string"},"expiration":{"type":"string"},"address":{"type":"string","enum":["home","share"]},"share_slug":{"type":"string","description":"Paid plans: a name on share.<domain>"},"workspace":{"type":"string","description":"\"personal\" or a team id or address"}}}}}},"responses":{"201":{"description":"Published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"413":{"description":"Too large"},"422":{"description":"Invalid upload"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/search":{"get":{"summary":"Search everywhere you have pages","description":"Your pages, your teams' pages (as you may see them), saved pages, history, spaces and public pages. Matches page text (any language, substrings of 3+ characters) as well as titles, subdomains and file names; every word must match. Snippets mark matches with U+E000 and U+E001.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":100}},{"name":"scope","in":"query","required":false,"schema":{"type":"string"},"description":"all (default) or a comma-separated list of mine, team, saved, history, spaces, public"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50},"description":"Results per place (default 5, or 50 with one place)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"hits":{"type":"array","items":{"type":"object"}},"more":{"type":"boolean"}}}}}}}}}}}},"/pages/{id}":{"get":{"summary":"Get a page (yours, or a team page you can see)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"},"workspace":{"$ref":"#/components/schemas/Workspace"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"put":{"summary":"Replace a page's files (same URL)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"An .html file, a .zip, or several files (repeat the field, with matching `path` fields)"},"path":{"type":"string","description":"Relative path for the file at the same position"},"html":{"type":"string","description":"HTML source (instead of file)"},"title":{"type":"string"},"password":{"type":"string"},"expiration":{"type":"string","example":"7d"},"address":{"type":"string","enum":["home","share"]},"share_slug":{"type":"string","description":"Paid plans: a name on share.<domain>"},"workspace":{"type":"string","description":"\"personal\" or a team id or address"}}}},"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"},"files":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"},"content":{"type":"string"},"content_base64":{"type":"string"}}}},"title":{"type":"string"},"password":{"type":"string"},"expiration":{"type":"string"},"address":{"type":"string","enum":["home","share"]},"share_slug":{"type":"string","description":"Paid plans: a name on share.<domain>"},"workspace":{"type":"string","description":"\"personal\" or a team id or address"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"patch":{"summary":"Edit title, expiration, custom subdomain (Pro, up to 10 pages, 30 sets or changes a month), profile listing, archive, or (team pages) visibility to the team","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"expiration":{"type":"string"},"subdomain":{"type":["string","null"]},"on_profile":{"type":"boolean"},"on_personal_profile":{"type":"boolean","description":"Team pages you published: also show it on your personal profile subdomain (paid plans). The team's owners and admins may turn it off"},"archived":{"type":"boolean"},"team_visible":{"type":"boolean","description":"Team pages: false shows it only to its creator and the team's owners and admins (creator, owners and admins may change it)"},"allow_fork":{"type":"boolean","description":"Let visitors fork (copy) the page to their own account. Refused while the page is protected"},"summary":{"type":["string","null"],"maxLength":200,"description":"Your own one-line summary for page cards (empty string = none); AI won't replace it. null hands it back to AI, which writes it again right away"},"summary_hidden":{"type":"boolean","description":"Hide the summary on page cards (it's kept)"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"delete":{"summary":"Delete a page","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/forks/{id}":{"get":{"summary":"What a visitor sees before forking a page: title, size, whether it can be forked (no sign-in needed). Protected pages show nothing about themselves","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"post":{"summary":"Fork (copy) a page whose owner allows forks to your own space, or a team with workspace. Counts against your plan like a publish; the copy is marked forked_from","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/password":{"post":{"summary":"Set, change or remove (null) the password","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/viewer-verification":{"post":{"summary":"Require (or stop requiring) viewers to verify their email; each view is then recorded and emailed to the owner","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/views":{"get":{"summary":"Views by verified viewers: email, method, time, seconds visible, approximate location; newest first. With sections=1 or include=sections (Pro), each visit also lists seconds per section. With since, only visits active since then, oldest activity first (a visit comes again when it goes on: dedupe by id). Pages of limit (1–1000, default 200); pass next_cursor as cursor for the next page","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sections","in":"query","required":false,"schema":{"type":"string","enum":["1"]}},{"name":"include","in":"query","required":false,"schema":{"type":"string","enum":["sections"]}},{"name":"since","in":"query","required":false,"description":"ISO 8601 time or epoch milliseconds","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200}},{"name":"cursor","in":"query","required":false,"description":"next_cursor from the previous page of the same query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/viewer-settings":{"get":{"summary":"Allow/block lists, agreement (NDA), links-only, watermark and download protection of a page with verified viewers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"patch":{"summary":"Change any of them. Lists: one email or domain per line (or an array). nda_text null turns the agreement off; a new text asks everyone again. NDA, links-only, watermark and no-download are Pro","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allow":{"type":["string","array"],"items":{"type":"string"}},"block":{"type":["string","array"],"items":{"type":"string"}},"nda_text":{"type":["string","null"]},"links_only":{"type":"boolean"},"watermark":{"type":"boolean"},"no_download":{"type":"boolean"},"no_copy":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/viewers/block":{"post":{"summary":"Revoke one viewer: the address goes on the block list and loses access at once","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/agreements":{"get":{"summary":"Who accepted the page's agreement, which version, when","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/reading":{"get":{"summary":"Reading analytics (Pro): average time and scroll depth, time per section or PDF page","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/views.csv":{"get":{"summary":"Every verified visit as CSV (Pro)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV","content":{"text/csv":{}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/links":{"get":{"summary":"Share links (Pro): name, URL, opens and who opened them","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"post":{"summary":"Create a personal share link (mypages.page/l/<token>) with a name and an optional expiry","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"expires_at":{"type":["string","null"],"format":"date-time"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/links/{linkId}":{"patch":{"summary":"Rename, change the expiry, or turn a link off (revoked: true) or on","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"expires_at":{"type":["string","null"]},"revoked":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"delete":{"summary":"Delete a share link and its stats","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/notifications/hook":{"get":{"summary":"Your Slack or webhook notification URL","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/revoke":{"post":{"summary":"Sign out every visitor who unlocked the page","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/renew":{"post":{"summary":"Add another retention period to the link expiry and keep the files longer; also brings back a page whose link expired but whose files are kept (Free: 30 days, 3 renewals per account per calendar month)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/versions":{"get":{"summary":"Version history (Pro)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/github":{"post":{"summary":"Publish a new page from a GitHub repository: public, or private through the NextPages GitHub App (Pro)","parameters":[{"name":"workspace","in":"query","required":false,"schema":{"type":"string"},"description":"Publish to (or list) \"personal\" (default) or one of your teams, by id (\"org_…\") or address (slug). Any member may publish into their team with their personal token; others get 404. Also accepted as a `workspace` body field."}],"description":"The folder must contain built static files (index.html); no build step runs. The page stays connected: daily auto-sync, Sync now, and push webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["repo"],"properties":{"repo":{"type":"string","example":"https://github.com/owner/repo"},"branch":{"type":["string","null"],"description":"Default: the repository's default branch"},"path":{"type":["string","null"],"description":"Folder with the site, e.g. \"dist\" (default: root)"},"auto_sync":{"type":"boolean","default":true},"title":{"type":"string"},"workspace":{"type":"string","description":"\"personal\" or a team id or address"}}}}}},"responses":{"201":{"description":"Published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/github":{"get":{"summary":"GitHub connection, sync status, webhook URL and secret","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"put":{"summary":"Connect to a repository (or change branch/folder/auto-sync) and sync now (Pro)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["repo"],"properties":{"repo":{"type":"string","example":"https://github.com/owner/repo"},"branch":{"type":["string","null"],"description":"Default: the repository's default branch"},"path":{"type":["string","null"],"description":"Folder with the site, e.g. \"dist\" (default: root)"},"auto_sync":{"type":"boolean","default":true},"title":{"type":"string"},"workspace":{"type":"string","description":"\"personal\" or a team id or address"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"delete":{"summary":"Disconnect from GitHub (the page keeps its files)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/github/sync":{"post":{"summary":"Pull the latest commit now (Pro)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","description":"Publish even if the commit didn't change"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["updated","unchanged"]},"commit":{"type":"string"},"branch":{"type":"string"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/github":{"get":{"summary":"The NextPages GitHub App (if set up) and the GitHub accounts this user connected","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/github/repos":{"get":{"summary":"Repositories (public and private) the connected GitHub accounts let NextPages read (Pro)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/pages/{id}/analytics":{"get":{"summary":"Views, uniques and referrers for 30 days (Pro)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/uploads":{"post":{"summary":"Start a staged upload","description":"Declare files and exact sizes. Returns `upload_url` per file; PUT raw bytes to each (Content-Length must match), then POST /uploads/{id}/complete.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"}}}},"page_id":{"type":"string","description":"Update this page instead of creating one"},"title":{"type":"string"},"password":{"type":"string"},"expiration":{"type":"string"},"workspace":{"type":"string","description":"New pages: \"personal\" (default) or a team id or address"}}}}}},"responses":{"201":{"description":"Upload created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/uploads/{id}":{"get":{"summary":"Upload status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"delete":{"summary":"Cancel upload","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/uploads/{id}/files/{path}":{"put":{"summary":"Upload one file's bytes","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/uploads/{id}/complete":{"post":{"summary":"Verify and publish atomically","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/usage":{"get":{"summary":"Storage, page count and plan limits","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs":{"get":{"summary":"The teams you belong to, with your role (use a team's id or slug as `workspace`)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"orgs":{"type":"array","items":{"$ref":"#/components/schemas/Org"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"post":{"summary":"Create a team (dashboard sessions only); you become its owner","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"org":{"$ref":"#/components/schemas/Org"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}":{"get":{"summary":"One team: your role, its plan, seats and usage (members only)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"org":{"$ref":"#/components/schemas/Org"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"patch":{"summary":"Rename the team or change its settings (owners and admins, dashboard sessions only)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"settings":{"type":"object","properties":{"members_can_edit_all":{"type":"boolean"},"home_comments":{"type":"boolean"},"members_publish_here":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/pages":{"get":{"summary":"The team's pages you can see, each with your permissions (same as GET /pages?workspace=)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"},"description":"An account id, or \"me\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}},"workspace":{"$ref":"#/components/schemas/Workspace"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/pages/move-in":{"post":{"summary":"Move one of your personal pages into the team (any member). Link, subdomain, views and viewer settings stay; the team's plan and storage apply from now on","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["page_id"],"properties":{"page_id":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"},"workspace":{"$ref":"#/components/schemas/Workspace"},"warnings":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/pages/{pageId}/move-out":{"post":{"summary":"Move a team page into your personal space (team owners and admins). Your plan and storage apply from now on","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"},"workspace":{"$ref":"#/components/schemas/Workspace"},"warnings":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/pages/{pageId}":{"patch":{"summary":"Show a team page to every member, or only to its creator and the team's owners and admins (the creator, owners and admins)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["team_visible"],"properties":{"team_visible":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/viewer-defaults":{"get":{"summary":"The viewer controls new team pages start with (members)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}},"patch":{"summary":"Change the team's viewer defaults (owners and admins, dashboard sessions only). Only pages created afterwards get them","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"viewer_verification":{"type":"boolean"},"allow":{"type":"string","description":"One email or domain per line"},"block":{"type":"string","description":"One email or domain per line"},"nda_text":{"type":["string","null"]},"watermark":{"type":"boolean"},"no_download":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/activity":{"get":{"summary":"Verified visits to the team's pages by page and viewer company, and the latest visits (members see the pages they can see)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","enum":[7,30,90]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}},"/orgs/{id}/audit":{"get":{"summary":"The team's audit log, newest first (owners and admins; 90 days, a year on a custom agreement). Also /orgs/{id}/audit.csv","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","required":false,"schema":{"type":"integer"},"description":"The `next` of the previous page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200}},{"name":"action","in":"query","required":false,"schema":{"type":"string"},"description":"An action or prefix, e.g. \"page\" or \"org.member\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token"},"403":{"description":"Plan limit, quota or permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (or not yours)"},"429":{"description":"Rate limited (see Retry-After)"}}}}}}