{"openapi":"3.1.0","info":{"version":"1.0.0","title":"me.io API","description":"Create and publish personal pages, read their analytics and inbox, and manage custom domains on me.io from your own code.\n\n**Authentication.** Create an API key in your workspace (Settings → API keys) and send it as the `x-api-key` header. A `read` key lists and reads; a `write` key also creates, changes, publishes and deletes pages; an `admin` key can do everything its owner can. Every call acts on the workspace of the key. Guide: https://api.me.io/developers/auth.md\n\n**Errors.** Failures answer `{ \"error\": \"UPPER_SNAKE_CODE\", \"message\": \"...\" }` with the HTTP status; validation errors add `issues`. `429` means slow down (see the `ratelimit-*` headers).\n\n**Ids** are UUIDv7 strings; times are ISO 8601 UTC.\n\n## AI Agents (MCP)\n\nThis API is also available as a hosted [MCP](https://modelcontextprotocol.io) server for AI agents at `https://mcp.me.io/mcp` — Streamable HTTP (JSON-RPC 2.0), authenticated with the same `x-api-key` header and scoped to the key's workspace. Tools: create_page, list_pages, get_page, update_page, delete_page, get_page_analytics, list_page_visits, list_page_messages, list_domains, list_activity. API catalog: `https://api.me.io/.well-known/api-catalog`."},"servers":[{"url":"https://api.me.io","description":"me.io"}],"components":{"schemas":{"BadRequestError":{"type":"object","properties":{"error":{"type":"string","example":"VALIDATION_ERROR","description":"Error code identifier"},"message":{"type":"string","example":"Invalid request parameters","description":"Human-readable error message"}},"required":["error","message"]},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string","example":"AUTHENTICATION_REQUIRED","description":"Error code"},"message":{"type":"string","example":"Authentication token is required","description":"Error message"}},"required":["error","message"]},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","example":"ACCESS_DENIED","description":"Error code"},"message":{"type":"string","example":"You do not have permission to perform this action","description":"Error message"}},"required":["error","message"]},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","example":"NOT_FOUND","description":"Error code"},"message":{"type":"string","example":"The requested resource was not found","description":"Error message"}},"required":["error","message"]},"TooManyRequestsError":{"type":"object","properties":{"error":{"type":"string","example":"RATE_LIMIT_EXCEEDED","description":"Error code"},"message":{"type":"string","example":"Too many requests, please try again later","description":"Error message"}},"required":["error","message"]},"InternalServerError":{"type":"object","properties":{"error":{"type":"string","example":"INTERNAL_SERVER_ERROR","description":"Error code"},"message":{"type":"string","example":"An unexpected error occurred","description":"Error message"}},"required":["error","message"]},"ServiceUnavailableError":{"type":"object","properties":{"error":{"type":"string","example":"AUTHENTICATION_UNAVAILABLE","description":"Error code"},"message":{"type":"string","example":"Service temporarily unavailable","description":"Error message"}},"required":["error","message"]},"RequestOrigin":{"type":"object","properties":{"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","visitor","api-key","system"],"description":"Who acted: a signed-in member, a visitor without an account, an API key, or the platform itself"},"userId":{"type":"string","description":"The member, or the API key's owner"},"apiKeyId":{"type":"string"}},"required":["type"],"additionalProperties":{}},"impersonatedBy":{"type":"string","description":"The BackOffice staff member acting as the user"},"via":{"$ref":"#/components/schemas/RequestOriginVia"},"sparkpost":{"type":"object","properties":{"eventId":{"type":"string"}},"description":"The SparkPost bounce or complaint event that recorded it"},"ipAddress":{"type":"string","description":"The client's IP address, resolved once at the edge"},"ipCountry":{"type":"string","description":"ISO country code of the client IP"},"ipCity":{"type":"string","description":"City of the client IP, approximate"},"ipSource":{"type":"string","enum":["cloudflare","forwarded","direct"],"description":"Where the client IP and location came from: `cloudflare` (Cloudflare's visitor headers), `forwarded` (one of our services passed on the browser's headers) or `direct` (no Cloudflare in front, so it is the address Traefik saw, with no location)"},"userAgent":{"type":"string"},"requestId":{"type":"string"},"service":{"type":"string","description":"The API that wrote the record"}},"additionalProperties":{},"description":"Who signed the user up, and from where"},"RequestOriginVia":{"type":"string","enum":["web","backoffice","api","job"]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"limit":{"type":"integer","minimum":1,"maximum":200},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"}},"required":["page","limit","total","totalPages","hasNext","hasPrev"]},"PlanCode":{"type":"string","enum":["free","starter","plus"]},"PageStatus":{"type":"string","enum":["draft","published","disabled"],"description":"`draft` (only members see it), `published` (live at its address), `disabled` (turned off by staff or the abuse scan)"},"PageOccupation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":80,"example":"Product designer"},"organization":{"type":"string","minLength":1,"maxLength":80,"example":"Acme"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["id","title"]},"PageEducation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"school":{"type":"string","minLength":1,"maxLength":80,"example":"University of Lisbon"},"degree":{"type":"string","minLength":1,"maxLength":80,"example":"BSc Design"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["id","school"]},"PageLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable link id (analytics `link` dimension); assigned when omitted","example":"018f6b1c-7e2a-7000-9d3e-000000000031"},"kind":{"$ref":"#/components/schemas/PageLinkKind"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"Text shown on the link; default: the network or address","example":"My portfolio"},"url":{"type":"string","minLength":1,"maxLength":2048,"example":"https://github.com/jane"},"isHidden":{"type":"boolean","description":"Kept on the page but not shown to visitors"}},"required":["id","kind","url","isHidden"]},"PageLinkKind":{"type":"string","enum":["website","email","phone","custom","x","instagram","linkedin","github","youtube","tiktok","facebook","threads","bluesky","mastodon","twitch","discord","telegram","whatsapp","spotify","soundcloud","dribbble","behance","medium","substack","pinterest","reddit","snapchat","calendly"],"description":"`website`, `email`, `phone`, `custom`, or a social network"},"PageCta":{"type":["object","null"],"properties":{"label":{"type":"string","minLength":1,"maxLength":40,"example":"Hire me"},"action":{"type":"string","enum":["url","contact","email"],"description":"`url` opens `url`; `contact` opens the contact form; `email` opens `url` (`mailto:`)"},"url":{"type":"string","maxLength":2048,"description":"http(s) for `url`, `mailto:` for `email`; none for `contact`","example":"https://cal.com/jane"}},"required":["label","action"]},"PageTheme":{"type":"object","properties":{"layout":{"type":"string","enum":["centered","split","cover"],"description":"`centered` card, `split` photo beside the text, `cover` full-bleed cover image"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#0f766e"},"font":{"type":"string","enum":["sans","serif","mono"]},"coverOverlay":{"type":"integer","minimum":0,"maximum":80,"description":"Darkening over the cover image, in percent","example":30}},"required":["layout","colorScheme","accentColor","font","coverOverlay"]},"PagePreview":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":500},"imageMediaId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`, kind `preview`)"}}},"Page":{"allOf":[{"$ref":"#/components/schemas/PageModel"},{"type":"object","properties":{"publicUrl":{"type":"string","description":"The address to share","example":"https://me.io/jane"}},"required":["publicUrl"]}]},"PageModel":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"createdByUserId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"domain":{"type":"string","description":"Full host the page lives on: a brand domain, a workspace subdomain or a verified custom domain","example":"me.io"},"slug":{"type":"string","description":"Path on its domain; `\"\"` for a root page","example":"jane"},"status":{"$ref":"#/components/schemas/PageStatus"},"displayName":{"type":"string","minLength":1,"maxLength":80,"example":"Jane Doe"},"headline":{"type":"string","maxLength":140,"example":"Product designer in Lisbon"},"bio":{"type":"string","maxLength":3000,"description":"Plain text with line breaks; URLs are linked when shown"},"location":{"type":"string","maxLength":80,"example":"Lisbon, Portugal"},"pronouns":{"type":"string","maxLength":24,"example":"she/her"},"avatarMediaId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`)"},"coverMediaId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`)"},"occupations":{"type":"array","items":{"$ref":"#/components/schemas/PageOccupation"},"maxItems":10},"education":{"type":"array","items":{"$ref":"#/components/schemas/PageEducation"},"maxItems":10},"interests":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"links":{"type":"array","items":{"$ref":"#/components/schemas/PageLink"},"maxItems":30},"cta":{"$ref":"#/components/schemas/PageCta"},"theme":{"$ref":"#/components/schemas/PageTheme"},"preview":{"$ref":"#/components/schemas/PagePreview"},"isIndexed":{"type":"boolean","description":"Search engines may index the page; false adds `noindex`"},"isContactEnabled":{"type":"boolean","description":"Visitors can write through the contact form"},"viewCount":{"type":"integer","minimum":0},"clickCount":{"type":"integer","minimum":0},"messageCount":{"type":"integer","minimum":0},"lastViewedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"publishedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"When the page was first published"},"isLocked":{"type":"boolean","description":"Locked by staff: its owner can no longer change it (delete still works)"},"origin":{"$ref":"#/components/schemas/RequestOrigin"},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"}},"required":["_id","workspaceId","createdByUserId","domain","slug","status","displayName","occupations","education","interests","links","theme","isIndexed","isContactEnabled","viewCount","clickCount","messageCount","isLocked","createdAt","updatedAt"]},"PageMessage":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"pageId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"name":{"type":"string","minLength":1,"maxLength":80,"example":"Alex Smith"},"email":{"type":"string","maxLength":254,"format":"email","example":"alex@example.com"},"subject":{"type":"string","maxLength":140,"example":"Speaking at our meetup"},"message":{"type":"string","minLength":1,"maxLength":5000,"example":"Hi Jane, would you speak at our design meetup in May?"},"status":{"$ref":"#/components/schemas/PageMessageStatus"},"origin":{"$ref":"#/components/schemas/RequestOrigin"},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"}},"required":["_id","pageId","workspaceId","name","email","message","status","createdAt","updatedAt"]},"PageMessageStatus":{"type":"string","enum":["unread","read","archived"]},"PageAnalyticsSummaryResponse":{"type":"object","properties":{"from":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"to":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"views":{"type":"integer","description":"Human views"},"uniqueViews":{"type":"integer","description":"Sum of distinct visitors per day"},"clicks":{"type":"integer","description":"Links and the button followed"},"bots":{"type":"integer"},"top":{"type":"object","properties":{"country":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"city":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"device":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"browser":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"os":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"referrer":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"link":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}},"source":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}}},"description":"Top 5 values per dimension"}},"required":["from","to","views","uniqueViews","clicks","bots","top"]},"PageAnalyticsCount":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}},"required":["key","count"]},"PageAnalyticsTimelineResponse":{"type":"object","properties":{"interval":{"type":"string","enum":["day","week","month"]},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Bucket start (UTC)"},"views":{"type":"integer"},"uniqueViews":{"type":"integer"},"clicks":{"type":"integer"}},"required":["date","views","uniqueViews","clicks"]}}},"required":["interval","points"]},"PageAnalyticsBreakdownResponse":{"type":"object","properties":{"dimension":{"$ref":"#/components/schemas/PageAnalyticsDimension"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PageAnalyticsCount"}}},"required":["dimension","items"]},"PageAnalyticsDimension":{"type":"string","enum":["country","city","device","browser","os","referrer","link","source"]},"PageAnalyticsVisitsListResponse":{"type":"object","properties":{"visits":{"type":"array","items":{"$ref":"#/components/schemas/PageVisit"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page"}},"required":["visits","nextCursor"]},"PageVisit":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"pageId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"kind":{"$ref":"#/components/schemas/PageVisitKind"},"linkId":{"type":"string","description":"Click only: the link followed, or `cta` for the button"},"occurredAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"ipAnonymized":{"type":"string","description":"The visitor IP without its host part: IPv4 /24 (last octet 0), IPv6 /48. Never the full IP.","example":"203.0.113.0"},"ipCountry":{"type":"string","description":"ISO country code of the visitor IP","example":"CA"},"ipRegion":{"type":"string","description":"Region of the visitor IP, approximate","example":"Ontario"},"ipCity":{"type":"string","description":"City of the visitor IP, approximate","example":"Toronto"},"device":{"type":"string","example":"mobile"},"browser":{"type":"string","example":"Chrome"},"browserVersion":{"type":"string","example":"126.0.6478.61"},"os":{"type":"string","example":"iOS"},"userAgent":{"type":"string","description":"The full user agent","example":"Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) ..."},"referrer":{"type":"string","description":"The full referring URL (up to 2 KB)","example":"https://news.ycombinator.com/item?id=1"},"referrerHost":{"type":"string","description":"Referring host, `direct` when none","example":"news.ycombinator.com"},"source":{"$ref":"#/components/schemas/PageVisitSource"},"isBot":{"type":"boolean"}},"required":["_id","pageId","kind","occurredAt","ipCountry","device","browser","os","referrerHost","source","isBot"]},"PageVisitKind":{"type":"string","enum":["view","click"],"description":"`view` (the page was opened) or `click` (a link or the button was followed)"},"PageVisitSource":{"type":"string","enum":["page","qr"],"description":"How the visitor arrived: `page` (opened the address) or `qr` (scanned its QR code)"},"DomainListResponse":{"type":"object","properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/DomainOption"}}},"required":["domains"]},"DomainOption":{"type":"object","properties":{"domain":{"type":"string","description":"Host a page can live on (the upsell entry carries a placeholder)","example":"me.io"},"kind":{"type":"string","enum":["brand","workspace-subdomain","custom","upsell"],"description":"A brand domain, the workspace subdomain, a custom domain, or (Free) the custom-domain upsell"},"brandName":{"type":"string","example":"me.io"},"tagline":{"type":"string","example":"Personal pages"},"isDefault":{"type":"boolean","description":"The current host's own domain: the picker's preselected option"},"available":{"type":"boolean","description":"Whether pages can be put on it now; an unavailable one shows disabled with `message`"},"unavailableReason":{"type":"string","enum":["PENDING_VERIFICATION","VERIFICATION_FAILED","PLAN_LIMIT"],"description":"Why it is unavailable"},"message":{"type":"string","description":"What to show beside an unavailable option","example":"Add the TXT record, then verify the domain"},"plan":{"allOf":[{"$ref":"#/components/schemas/PlanCode"},{"description":"The upsell: the plan that unlocks custom domains","example":"starter"}]}},"required":["domain","kind","brandName","isDefault","available"]},"PageListResponse":{"type":"object","properties":{"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["pages","pagination"]},"ConflictError":{"type":"object","properties":{"error":{"type":"string","example":"SLUG_TAKEN"},"message":{"type":"string"}},"required":["error","message"]},"PageCreateRequest":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":80,"example":"Jane Doe"},"headline":{"type":"string","maxLength":140,"example":"Product designer in Lisbon"},"bio":{"type":"string","maxLength":3000,"description":"Plain text with line breaks; URLs are linked when shown"},"location":{"type":"string","maxLength":80,"example":"Lisbon, Portugal"},"pronouns":{"type":"string","maxLength":24,"example":"she/her"},"avatarMediaId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`); null removes it"},"coverMediaId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`); null removes it"},"occupations":{"type":"array","items":{"$ref":"#/components/schemas/PageOccupationInput"},"maxItems":10},"education":{"type":"array","items":{"$ref":"#/components/schemas/PageEducationInput"},"maxItems":10},"interests":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"links":{"type":"array","items":{"$ref":"#/components/schemas/PageLinkInput"},"maxItems":30,"description":"The links in order (≤30); ids are assigned when omitted"},"cta":{"type":["object","null"],"anyOf":[{"$ref":"#/components/schemas/PageCta"},{"type":"null"}],"description":"The button; null removes it"},"theme":{"type":"object","properties":{"layout":{"type":"string","enum":["centered","split","cover"],"description":"`centered` card, `split` photo beside the text, `cover` full-bleed cover image"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#0f766e"},"font":{"type":"string","enum":["sans","serif","mono"]},"coverOverlay":{"type":"integer","minimum":0,"maximum":80,"description":"Darkening over the cover image, in percent","example":30}},"description":"Theme fields to change; the others keep their value"},"preview":{"type":["object","null"],"anyOf":[{"$ref":"#/components/schemas/PagePreview"},{"type":"null"}],"description":"Crawler preview; null resets it to the page defaults"},"isIndexed":{"type":"boolean"},"isContactEnabled":{"type":"boolean"},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace the page belongs to"},"domain":{"type":"string","maxLength":253,"description":"Host to put the page on: a brand domain, the workspace's subdomain or a verified custom domain. Default: the current host's brand.","example":"me.io"},"slug":{"type":"string","pattern":"^([a-z0-9][a-z0-9_-]{1,39})?$","description":"Path on its domain (`^[a-z0-9][a-z0-9_-]{1,39}$`, not a reserved path); `\"\"` serves the page at `/` of a workspace subdomain or custom domain","example":"jane"},"status":{"type":"string","enum":["draft","published"],"default":"draft","description":"Publish at once, or keep it as a draft (default)"}},"required":["displayName","workspaceId","slug"]},"PageOccupationInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":80,"example":"Product designer"},"organization":{"type":"string","minLength":1,"maxLength":80,"example":"Acme"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["title"]},"PageEducationInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"school":{"type":"string","minLength":1,"maxLength":80,"example":"University of Lisbon"},"degree":{"type":"string","minLength":1,"maxLength":80,"example":"BSc Design"},"url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["school"]},"PageLinkInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable link id (analytics `link` dimension); assigned when omitted","example":"018f6b1c-7e2a-7000-9d3e-000000000031"},"kind":{"$ref":"#/components/schemas/PageLinkKind"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"Text shown on the link; default: the network or address","example":"My portfolio"},"url":{"type":"string","minLength":1,"maxLength":2048,"example":"https://github.com/jane"},"isHidden":{"type":"boolean","description":"Kept on the page but not shown to visitors"}},"required":["kind","url"]},"PageUpdateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"Page id"},"set":{"$ref":"#/components/schemas/PageUpdateSet"}},"required":["id","set"]},"PageUpdateSet":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":80,"example":"Jane Doe"},"headline":{"type":"string","maxLength":140,"example":"Product designer in Lisbon"},"bio":{"type":"string","maxLength":3000,"description":"Plain text with line breaks; URLs are linked when shown"},"location":{"type":"string","maxLength":80,"example":"Lisbon, Portugal"},"pronouns":{"type":"string","maxLength":24,"example":"she/her"},"avatarMediaId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`); null removes it"},"coverMediaId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"An image of this workspace (`/media/upload`); null removes it"},"occupations":{"type":"array","items":{"$ref":"#/components/schemas/PageOccupationInput"},"maxItems":10},"education":{"type":"array","items":{"$ref":"#/components/schemas/PageEducationInput"},"maxItems":10},"interests":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"links":{"type":"array","items":{"$ref":"#/components/schemas/PageLinkInput"},"maxItems":30,"description":"The links in order (≤30); ids are assigned when omitted"},"cta":{"type":["object","null"],"anyOf":[{"$ref":"#/components/schemas/PageCta"},{"type":"null"}],"description":"The button; null removes it"},"theme":{"type":"object","properties":{"layout":{"type":"string","enum":["centered","split","cover"],"description":"`centered` card, `split` photo beside the text, `cover` full-bleed cover image"},"colorScheme":{"type":"string","enum":["auto","light","dark"]},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#0f766e"},"font":{"type":"string","enum":["sans","serif","mono"]},"coverOverlay":{"type":"integer","minimum":0,"maximum":80,"description":"Darkening over the cover image, in percent","example":30}},"description":"Theme fields to change; the others keep their value"},"preview":{"type":["object","null"],"anyOf":[{"$ref":"#/components/schemas/PagePreview"},{"type":"null"}],"description":"Crawler preview; null resets it to the page defaults"},"isIndexed":{"type":"boolean"},"isContactEnabled":{"type":"boolean"},"domain":{"type":"string","maxLength":253,"description":"Move the page to another domain the workspace may use"},"slug":{"type":"string","pattern":"^([a-z0-9][a-z0-9_-]{1,39})?$","description":"New slug (the old address stops answering)","example":"jane"},"status":{"type":"string","enum":["draft","published"],"description":"Publish the page or take it back to a draft"}}},"PageDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"PageDeleteRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"Page id"}},"required":["id"]},"PageDuplicateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"Page to copy"},"slug":{"type":"string","pattern":"^([a-z0-9][a-z0-9_-]{1,39})?$","description":"Path on its domain (`^[a-z0-9][a-z0-9_-]{1,39}$`, not a reserved path); `\"\"` serves the page at `/` of a workspace subdomain or custom domain","example":"jane"},"domain":{"type":"string","maxLength":253,"description":"Host of the copy; default: the original's","example":"me.io"}},"required":["id","slug"]},"PageCheckSlugResponse":{"type":"object","properties":{"slug":{"type":"string","description":"The slug as it would be saved (lower-cased)","example":"jane"},"available":{"type":"boolean"},"reason":{"type":"string","enum":["SLUG_TAKEN","SLUG_RESERVED","SLUG_INVALID"]}},"required":["slug","available"]},"PageMessageListResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/PageMessage"}},"unreadCount":{"type":"integer","description":"Unread messages in the workspace (all pages)"},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["messages","unreadCount","pagination"]},"PageMessageUpdateResponse":{"type":"object","properties":{"updated":{"type":"integer"}},"required":["updated"]},"PageMessageUpdateRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"minItems":1,"maxItems":100},"set":{"$ref":"#/components/schemas/PageMessageUpdateSet"}},"required":["ids","set"]},"PageMessageUpdateSet":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PageMessageStatus"}},"required":["status"]},"PageMessageDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"},"deleted":{"type":"integer"}},"required":["success","deleted"]},"PageMessageDeleteRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"minItems":1,"maxItems":100}},"required":["ids"]},"MediaModel":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"Media id (UUIDv7); also its public address `/media/view/{_id}`"},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"createdByUserId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"kind":{"$ref":"#/components/schemas/MediaKind"},"originalName":{"type":"string","description":"File name as uploaded (never used to store or serve it)","example":"me.jpg"},"mimeType":{"$ref":"#/components/schemas/MediaMimeType"},"size":{"type":"integer","exclusiveMinimum":0,"description":"Bytes","example":120000},"storageType":{"$ref":"#/components/schemas/MediaStorageType"},"storagePath":{"type":"string","description":"Storage key: `media/<workspaceId>/<mediaId>.<ext>`"},"origin":{"$ref":"#/components/schemas/RequestOrigin"},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"}},"required":["_id","workspaceId","createdByUserId","kind","originalName","mimeType","size","storageType","storagePath","createdAt","updatedAt"]},"MediaKind":{"type":"string","enum":["avatar","cover","preview"],"description":"Where the image goes: the page avatar, its cover, or its crawler preview"},"MediaMimeType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif","image/avif"],"description":"Type detected from the file bytes"},"MediaStorageType":{"type":"string","enum":["local","r2"]},"MediaListResponse":{"type":"object","properties":{"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaModel"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["media","pagination"]},"MediaDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"MediaDeleteRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"Media id"}},"required":["id"]},"CustomDomainListResponse":{"type":"object","properties":{"customDomains":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomain"}}},"required":["customDomains"]},"CustomDomain":{"allOf":[{"$ref":"#/components/schemas/CustomDomainModel"},{"type":"object","properties":{"dnsRecords":{"$ref":"#/components/schemas/CustomDomainDnsRecords"}},"required":["dnsRecords"]}]},"CustomDomainStatus":{"type":"string","enum":["pending","verified","failed"]},"CustomDomainDnsRecords":{"type":"object","properties":{"cname":{"type":"object","properties":{"type":{"type":"string","enum":["CNAME"]},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"example":{"type":"CNAME","name":"jane.com","value":"custom.me.io"}},"txt":{"type":"object","properties":{"type":{"type":"string","enum":["TXT"]},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"example":{"type":"TXT","name":"_me-io-verify.jane.com","value":"me-io-verify=4f2c…"}}},"required":["cname","txt"]},"CustomDomainModel":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"createdByUserId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"host":{"type":"string","description":"The custom host pages live on","example":"jane.com"},"status":{"$ref":"#/components/schemas/CustomDomainStatus"},"verificationToken":{"type":"string","description":"Value of the ownership TXT record","example":"me-io-verify=4f2c9a…"},"verifiedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"lastCheckedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"origin":{"$ref":"#/components/schemas/RequestOrigin"},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"}},"required":["_id","workspaceId","createdByUserId","host","status","verificationToken","createdAt","updatedAt"]},"CustomDomainCreateRequest":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace the domain belongs to"},"host":{"type":"string","maxLength":253,"description":"The host pages will live on (`jane.com`, or a subdomain such as `me.jane.com`)","example":"jane.com"}},"required":["workspaceId","host"]},"CustomDomainVerifyRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Custom domain id"}},"required":["id"]},"CustomDomainDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"CustomDomainDeleteRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Custom domain id"}},"required":["id"]}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API Key authentication using the `x-api-key` header."}}},"paths":{"/domain/list":{"get":{"summary":"List page domains","description":"List the domains a page can live on from the current host: every brand domain, plus the workspace subdomains and custom domains of the signed-in workspace (`x-workspace-id`, else the default one). A custom domain not verified yet, failed or past the plan limit comes with `available: false`, `unavailableReason` and `message`; a Free workspace gets an `upsell` entry.","security":[],"responses":{"200":{"description":"Domains usable from the current host","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainListResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/list":{"get":{"summary":"List the workspace's pages","description":"List the workspace's pages, filtered by status, domain or a search.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"default":1,"example":1,"description":"Page number for pagination"},"required":false,"description":"Page number for pagination","name":"page","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":20,"example":20,"description":"Number of records per page (max 200)"},"required":false,"description":"Number of records per page (max 200)","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace to list (required)"},"required":true,"description":"Workspace to list (required)","name":"workspaceId","in":"query"},{"schema":{"type":"string","description":"Filter by multiple UUID v7 values (comma-separated)","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e8f,018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e8f"},"required":false,"description":"Filter by multiple UUID v7 values (comma-separated)","name":"ids","in":"query"},{"schema":{"type":"string","description":"Statuses (comma-separated)","example":"draft,published"},"required":false,"description":"Statuses (comma-separated)","name":"status","in":"query"},{"schema":{"type":"string","description":"Domains (comma-separated)","example":"me.io,jane.com"},"required":false,"description":"Domains (comma-separated)","name":"domain","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Search slug, name and headline","example":"jane"},"required":false,"description":"Search slug, name and headline","name":"q","in":"query"},{"schema":{"type":"string","enum":["createdAt","updatedAt","viewCount","clickCount","messageCount","lastViewedAt","displayName"],"default":"createdAt"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"sortOrder","in":"query"}],"responses":{"200":{"description":"Pages retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageListResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/details":{"get":{"summary":"Get a page","description":"Get one page of a workspace you belong to, drafts included.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"Page id"},"required":true,"description":"Page id","name":"id","in":"query"}],"responses":{"200":{"description":"Page retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/create":{"post":{"summary":"Create a page","description":"Create a page in the workspace at `<domain>/<slug>` (the empty slug is a root page, only off a brand domain), counted against its plan. Images must be media of the workspace (400 MEDIA_NOT_FOUND); every link is checked for abuse (400 DESTINATION_BLOCKED).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageCreateRequest"}}}},"responses":{"201":{"description":"Page created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/update":{"post":{"summary":"Change a page","description":"Change a page's profile, links, button, theme, preview, settings, address or status (`draft` or `published`); null clears avatar, cover, button and preview, and `theme` changes only the fields given. A page staff locked answers 403 PAGE_LOCKED; one turned off by staff or the abuse scan cannot be published again by its owner (403 PAGE_DISABLED).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageUpdateRequest"}}}},"responses":{"200":{"description":"Page updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/delete":{"post":{"summary":"Delete a page","description":"Delete a page; its address stops answering at once and its slug is free again. Its messages and analytics stay until they expire. Deleting one that is already gone succeeds.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDeleteRequest"}}}},"responses":{"200":{"description":"Page deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDeleteResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/duplicate":{"post":{"summary":"Duplicate a page","description":"Copy a page (content, links, theme and settings) to a new address as a draft, counted against the plan; analytics and messages are not copied. A page staff locked or turned off cannot be copied (403 PAGE_LOCKED / PAGE_DISABLED), and its links pass the same check as create.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageDuplicateRequest"}}}},"responses":{"201":{"description":"The copy, as a draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page/check-slug":{"get":{"summary":"Check a page slug","description":"Check whether `<domain>/<slug>` is free to claim: the homepage asks before sign-up. A taken, reserved or malformed slug answers `available: false` with its reason.","security":[],"parameters":[{"schema":{"type":"string","maxLength":253,"description":"Host to check on; default: the current host's brand domain","example":"me.io"},"required":false,"description":"Host to check on; default: the current host's brand domain","name":"domain","in":"query"},{"schema":{"type":"string","maxLength":80,"example":"jane"},"required":true,"name":"slug","in":"query"}],"responses":{"200":{"description":"Whether the slug is free","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageCheckSlugResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-analytics/summary":{"get":{"summary":"Get page analytics totals","description":"Get totals (views, unique visitors, clicks, bots) and the top countries, cities, devices, browsers, systems, referrers, sources (page or QR) and links of one page or the whole workspace, within the plan's retention.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"One page (else `workspaceId`)"},"required":false,"description":"One page (else `workspaceId`)","name":"pageId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Every page of the workspace (when `pageId` is not given)"},"required":false,"description":"Every page of the workspace (when `pageId` is not given)","name":"workspaceId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Start (inclusive); default 30 days ago, never before the plan analytics retention"},"required":false,"description":"Start (inclusive); default 30 days ago, never before the plan analytics retention","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"End (inclusive); default now"},"required":false,"description":"End (inclusive); default now","name":"to","in":"query"}],"responses":{"200":{"description":"Analytics summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAnalyticsSummaryResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-analytics/timeline":{"get":{"summary":"Get page analytics over time","description":"Get views, unique visitors and clicks per day, week or month for one page or the whole workspace; buckets with no traffic are included as zero.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"One page (else `workspaceId`)"},"required":false,"description":"One page (else `workspaceId`)","name":"pageId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Every page of the workspace (when `pageId` is not given)"},"required":false,"description":"Every page of the workspace (when `pageId` is not given)","name":"workspaceId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Start (inclusive); default 30 days ago, never before the plan analytics retention"},"required":false,"description":"Start (inclusive); default 30 days ago, never before the plan analytics retention","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"End (inclusive); default now"},"required":false,"description":"End (inclusive); default now","name":"to","in":"query"},{"schema":{"type":"string","enum":["day","week","month"],"default":"day","description":"Bucket size (UTC; weeks start Monday)"},"required":false,"description":"Bucket size (UTC; weeks start Monday)","name":"interval","in":"query"}],"responses":{"200":{"description":"Analytics timeline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAnalyticsTimelineResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-analytics/breakdown":{"get":{"summary":"Break down page analytics","description":"Count views of one page or the whole workspace by country, city (`City, CC`), device, browser, operating system, referrer or source (`page`, `qr`), or its clicks by link (`link`: a link id, `cta` for the button), highest first.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"One page (else `workspaceId`)"},"required":false,"description":"One page (else `workspaceId`)","name":"pageId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Every page of the workspace (when `pageId` is not given)"},"required":false,"description":"Every page of the workspace (when `pageId` is not given)","name":"workspaceId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Start (inclusive); default 30 days ago, never before the plan analytics retention"},"required":false,"description":"Start (inclusive); default 30 days ago, never before the plan analytics retention","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"End (inclusive); default now"},"required":false,"description":"End (inclusive); default now","name":"to","in":"query"},{"schema":{"$ref":"#/components/schemas/PageAnalyticsDimension"},"required":true,"name":"dimension","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Analytics breakdown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAnalyticsBreakdownResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-analytics/visits/list":{"get":{"summary":"List page visits","description":"List one page's raw visits (views and clicks, kept 90 days, within the plan's retention), newest first: kind, link, anonymized IP, place, device, browser, user agent, referrer and source. Bots are left out unless `includeBots=true`; page through with `cursor`.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"The page"},"required":true,"description":"The page","name":"pageId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Start (inclusive); default 30 days ago, never before the plan's analytics retention"},"required":false,"description":"Start (inclusive); default 30 days ago, never before the plan's analytics retention","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"End (inclusive); default now"},"required":false,"description":"End (inclusive); default now","name":"to","in":"query"},{"schema":{"type":"string","description":"Comma-separated ISO country codes","example":"DE,AT"},"required":false,"description":"Comma-separated ISO country codes","name":"country","in":"query"},{"schema":{"type":"string","description":"Comma-separated devices","example":"mobile,tablet"},"required":false,"description":"Comma-separated devices","name":"device","in":"query"},{"schema":{"type":"string","description":"Comma-separated browser names","example":"Chrome,Safari"},"required":false,"description":"Comma-separated browser names","name":"browser","in":"query"},{"schema":{"$ref":"#/components/schemas/PageVisitSource"},"required":false,"description":"How the visitor arrived: `page` (opened the address) or `qr` (scanned its QR code)","name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/PageVisitKind"},"required":false,"description":"`view` (the page was opened) or `click` (a link or the button was followed)","name":"kind","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"Clicks on this link id (`cta` for the button)"},"required":false,"description":"Clicks on this link id (`cta` for the button)","name":"linkId","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"}],"default":false,"description":"Include crawler hits (default false)"},"required":false,"description":"Include crawler hits (default false)","name":"includeBots","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"`nextCursor` of the previous page"},"required":false,"description":"`nextCursor` of the previous page","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The page's visits, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageAnalyticsVisitsListResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-analytics/visits/export":{"get":{"summary":"Export page visits as CSV","description":"Stream the same visits `/page-analytics/visits/list` filters as CSV (at most 10,000 rows, newest first); bots only with `includeBots=true`.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000021","description":"The page"},"required":true,"description":"The page","name":"pageId","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Start (inclusive); default 30 days ago, never before the plan's analytics retention"},"required":false,"description":"Start (inclusive); default 30 days ago, never before the plan's analytics retention","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"End (inclusive); default now"},"required":false,"description":"End (inclusive); default now","name":"to","in":"query"},{"schema":{"type":"string","description":"Comma-separated ISO country codes","example":"DE,AT"},"required":false,"description":"Comma-separated ISO country codes","name":"country","in":"query"},{"schema":{"type":"string","description":"Comma-separated devices","example":"mobile,tablet"},"required":false,"description":"Comma-separated devices","name":"device","in":"query"},{"schema":{"type":"string","description":"Comma-separated browser names","example":"Chrome,Safari"},"required":false,"description":"Comma-separated browser names","name":"browser","in":"query"},{"schema":{"$ref":"#/components/schemas/PageVisitSource"},"required":false,"description":"How the visitor arrived: `page` (opened the address) or `qr` (scanned its QR code)","name":"source","in":"query"},{"schema":{"$ref":"#/components/schemas/PageVisitKind"},"required":false,"description":"`view` (the page was opened) or `click` (a link or the button was followed)","name":"kind","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"Clicks on this link id (`cta` for the button)"},"required":false,"description":"Clicks on this link id (`cta` for the button)","name":"linkId","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"number"}],"default":false,"description":"Include crawler hits (default false)"},"required":false,"description":"Include crawler hits (default false)","name":"includeBots","in":"query"}],"responses":{"200":{"description":"CSV of the visits, newest first (at most 10,000 rows)","content":{"text/csv":{"schema":{"type":"string","example":"occurredAt,kind,country,...\r\n2026-11-23T10:00:00.000Z,click,DE,..."}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-message/list":{"get":{"summary":"List the workspace's messages","description":"List the messages visitors sent through the workspace's pages, newest first; archived ones only with `status=archived`.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"default":1,"example":1,"description":"Page number for pagination"},"required":false,"description":"Page number for pagination","name":"page","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":20,"example":20,"description":"Number of records per page (max 200)"},"required":false,"description":"Number of records per page (max 200)","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace whose inbox to list"},"required":true,"description":"Workspace whose inbox to list","name":"workspaceId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"Messages of one page"},"required":false,"description":"Messages of one page","name":"pageId","in":"query"},{"schema":{"type":"string","description":"Statuses (comma-separated); default: unread and read","example":"unread"},"required":false,"description":"Statuses (comma-separated); default: unread and read","name":"status","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Search name, email, subject and message","example":"meetup"},"required":false,"description":"Search name, email, subject and message","name":"q","in":"query"}],"responses":{"200":{"description":"Messages, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageMessageListResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-message/details":{"get":{"summary":"Read a message","description":"Read one message of a workspace you belong to; an unread message becomes read.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000041","description":"Message id"},"required":true,"description":"Message id","name":"id","in":"query"}],"responses":{"200":{"description":"The message (now read)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageMessage"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-message/update":{"post":{"summary":"Mark messages","description":"Mark up to 100 messages unread, read or archived; ids outside your workspaces are skipped.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageMessageUpdateRequest"}}}},"responses":{"200":{"description":"Messages updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageMessageUpdateResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/page-message/delete":{"post":{"summary":"Delete messages","description":"Delete up to 100 messages for good; a member role is needed, and ids already gone or outside your workspaces succeed as deleted.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageMessageDeleteRequest"}}}},"responses":{"200":{"description":"Messages deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageMessageDeleteResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/media/upload":{"post":{"summary":"Upload an image","description":"Upload a page image (avatar, cover or preview) to a workspace; its type is read from the file bytes (PNG, JPEG, WebP, GIF or AVIF), and it shows at /media/view/{_id}.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The image: PNG, JPEG, WebP, GIF or AVIF (checked by its bytes), at most `MEDIA_MAX_BYTES`"},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace the image belongs to; any member may upload"},"kind":{"$ref":"#/components/schemas/MediaKind"}},"required":["file","workspaceId","kind"]}}}},"responses":{"200":{"description":"Image stored. Save its `_id` on the page (`avatarMediaId`, `coverMediaId` or `preview.imageMediaId`); it shows at `/media/view/{_id}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaModel"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/media/list":{"get":{"summary":"List images","description":"List the workspace's uploaded images, newest first, by kind or id.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"default":1,"example":1,"description":"Page number for pagination"},"required":false,"description":"Page number for pagination","name":"page","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":20,"example":20,"description":"Number of records per page (max 200)"},"required":false,"description":"Number of records per page (max 200)","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace to list (required)"},"required":true,"description":"Workspace to list (required)","name":"workspaceId","in":"query"},{"schema":{"type":"string","description":"Only these media (comma-separated)","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e8f,018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e8f"},"required":false,"description":"Only these media (comma-separated)","name":"ids","in":"query"},{"schema":{"type":"string","description":"Kinds (comma-separated)","example":"avatar,cover"},"required":false,"description":"Kinds (comma-separated)","name":"kind","in":"query"}],"responses":{"200":{"description":"Images, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaListResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/media/delete":{"post":{"summary":"Delete an image","description":"Delete an image of the workspace with its stored file; one a page still shows answers 409 MEDIA_IN_USE. Deleting one already gone succeeds.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaDeleteRequest"}}}},"responses":{"200":{"description":"The image and its stored file are gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaDeleteResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/custom-domain/list":{"get":{"summary":"List the workspace's custom domains","description":"List the workspace's custom domains with their status and the DNS records each needs.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace to list (required)"},"required":true,"description":"Workspace to list (required)","name":"workspaceId","in":"query"},{"schema":{"type":"string","description":"Statuses (comma-separated)","example":"verified"},"required":false,"description":"Statuses (comma-separated)","name":"status","in":"query"}],"responses":{"200":{"description":"Custom domains retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainListResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/custom-domain/details":{"get":{"summary":"Get a custom domain","description":"Get a custom domain of a workspace you belong to, with the DNS records it needs.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Custom domain id"},"required":true,"description":"Custom domain id","name":"id","in":"query"}],"responses":{"200":{"description":"Custom domain retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/custom-domain/create":{"post":{"summary":"Add a custom domain","description":"Add a custom domain to the workspace: point a CNAME to the returned target, add the TXT record, then verify. Counted against the plan.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainCreateRequest"}}}},"responses":{"201":{"description":"Custom domain added (pending verification)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"409":{"description":"Already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConflictError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/custom-domain/verify":{"post":{"summary":"Verify a custom domain","description":"Look up the `_me-io-verify.<host>` TXT record now: the domain is verified when it holds the verification token, else it is marked failed (verify again after DNS propagates).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainVerifyRequest"}}}},"responses":{"200":{"description":"Verification checked: `status` is `verified` or `failed`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}},"/custom-domain/delete":{"post":{"summary":"Remove a custom domain","description":"Remove a custom domain: its host stops serving the workspace at once (pages on it stop answering). Removing one already gone succeeds.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainDeleteRequest"}}}},"responses":{"200":{"description":"Custom domain removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainDeleteResponse"}}}},"400":{"description":"Bad request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}},"503":{"description":"The request could not be checked or served right now. It says nothing about the request; send it again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableError"}}}}}}}},"webhooks":{}}