{"openapi":"3.1.0","info":{"title":"797.cx API","version":"1.0.0","description":"Short links, analytics, QR codes, domains and webhooks. Authenticate with an API key: `Authorization: Bearer <key>`. Errors are `{ error, code, request_id }`."},"servers":[{"url":"https://app.797.cx/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Identity"},{"name":"Links"},{"name":"Link settings"},{"name":"Aliases"},{"name":"Targeting"},{"name":"Analytics"},{"name":"QR codes"},{"name":"Folders"},{"name":"Tags"},{"name":"Domains"},{"name":"Webhooks"},{"name":"API keys"}],"paths":{"/me":{"get":{"tags":["Identity"],"summary":"Who is calling: user, workspace, auth type and key scopes","operationId":"getMe","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}}}},"/keys":{"get":{"tags":["API keys"],"summary":"List API keys (owners/admins see all, members their own)","operationId":"getKeys","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"keys:read","description":"Scope: `keys:read`"},"post":{"tags":["API keys"],"summary":"Create an API key — the secret is returned once","operationId":"postKeys","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"keys:write","description":"Scope: `keys:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"scopes":{"type":"array","items":{"type":"string","enum":["*","links:read","links:write","analytics:read","domains:read","domains:write","folders:read","folders:write","tags:read","tags:write","keys:read","keys:write","webhooks:read","webhooks:write"]},"maxItems":14},"expiresInDays":{"type":["number","null"],"exclusiveMinimum":0},"allowedIps":{"anyOf":[{"type":"null"},{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50},{"type":"string","maxLength":1000}],"description":"Allowed client machine IP addresses or CIDR blocks for this key"},"boundMachineName":{"type":["string","null"],"maxLength":100,"description":"Optional machine identifier/label (e.g. prod-worker-01)"}}}}}}}},"/keys/{id}/usage":{"get":{"tags":["API keys"],"summary":"Daily request / error / rate-limited counts for a key (up to 35 days)","operationId":"getKeysIdUsage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":35}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"keys:read","description":"Scope: `keys:read`"}},"/keys/{id}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key","operationId":"deleteKeysId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"keys:write","description":"Scope: `keys:write` · Needs a workspace role that can write (not viewer)."}},"/links":{"get":{"tags":["Links"],"summary":"List links — filter, sort, offset or cursor paging","operationId":"getLinks","parameters":[{"name":"host","in":"query","required":false,"schema":{"type":"string","maxLength":253},"description":"Exact short-link host to list, including an optional subdomain."},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Search code, destination, title, subdomain, tags."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["all","active","expired","paused","disabled","flagged"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["","link","bundle"]}},{"name":"folder","in":"query","required":false,"schema":{"type":"string","pattern":"^([0-9]+|none)$"}},{"name":"team","in":"query","required":false,"schema":{"type":"string","pattern":"^([0-9]+|none)$"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["created","clicks","code"]}},{"name":"dir","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400},"description":"next_cursor from the previous page. Ignores offset."}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"},"post":{"tags":["Links"],"summary":"Create a short link","operationId":"postLinks","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":4096,"description":"Destination URL (http/https)."},"alias":{"type":["string","null"],"maxLength":100,"description":"Custom code. Omit for a random one."},"subdomain":{"type":["string","null"],"maxLength":200,"description":"Vanity subdomain label or multi-level subdomain (e.g. ss22 or sub.sub.sub) under the primary or custom domain."},"domain":{"type":["string","null"],"maxLength":253,"description":"Full host (custom domain apex or <label>.domain)."},"title":{"type":["string","null"],"maxLength":500},"fallback_url":{"type":["string","null"],"maxLength":4096},"redirect_status":{"type":["integer","null"],"enum":[301,302,307,308,null]},"preview":{"type":"boolean"}},"required":["url"]}}}}}},"/minipages":{"post":{"tags":["Links"],"summary":"Create a MyMiniPage (link-in-bio bundle) in one step","operationId":"postMinipages","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"Title shown at the top of the MyMiniPage"},"description":{"type":["string","null"],"maxLength":3000,"description":"Bio, tagline or page description (supports rich text formatting)"},"alias":{"type":["string","null"],"maxLength":100,"description":"Custom slug code for the short URL"},"domain":{"type":["string","null"],"maxLength":253,"description":"Customer domain apex or custom host"},"subdomain":{"type":["string","null"],"maxLength":200,"description":"Subdomain label or multi-level subdomain (e.g. ss22 or sub.sub.sub) under the domain"},"theme":{"type":"string","enum":["clean","dark","glass","sunset","forest","neon"],"default":"clean"},"button_style":{"type":"string","enum":["rounded","pill","square","glass"],"default":"rounded"},"items":{"type":"array","minItems":1,"description":"List of links and block items on the page","items":{"type":"object","properties":{"kind":{"type":"string","enum":["link","header","text"],"default":"link"},"label":{"type":["string","null"],"maxLength":200},"url":{"type":["string","null"],"maxLength":4096},"icon":{"type":["string","null"],"maxLength":100},"highlight":{"type":"boolean"}}}}},"required":["title","items"]}}}}}},"/links/{id}":{"get":{"tags":["Links"],"summary":"Get one link","operationId":"getLinksId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"},"patch":{"tags":["Links"],"summary":"Update a link (destination, code, subdomain, status, title, expiry …)","operationId":"patchLinksId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"tags":["Links"],"summary":"Delete a link","operationId":"deleteLinksId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer)."}},"/links/{id}/editor":{"get":{"tags":["Link settings"],"summary":"Everything the editor needs for one link","operationId":"getLinksIdEditor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"}},"/links/{id}/settings/{section}":{"put":{"tags":["Link settings"],"summary":"Save one settings section (lifecycle, password, cloaking, social, tracking, general)","operationId":"putLinksIdSettingsSection","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"section","in":"path","required":true,"schema":{"type":"string","enum":["lifecycle","password","cloaking","social","tracking","general"]}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starts_at":{"type":["string","null"],"description":"Scheduled activation start time (lifecycle section)"},"expires_at":{"type":["string","null"],"description":"Link expiration time (lifecycle section)"},"max_clicks":{"type":["integer","null"],"minimum":1,"description":"Maximum clicks (lifecycle section)"},"expired_url":{"type":["string","null"],"maxLength":4096,"description":"Fallback URL when expired (lifecycle section)"},"delete_at":{"type":["string","null"],"description":"Auto-deletion timestamp (lifecycle section)"},"password":{"type":["string","null"],"maxLength":200,"description":"Password for protected access (password section)"},"enabled":{"type":"boolean"},"title":{"type":["string","null"],"maxLength":500,"description":"Display title or OG title (cloaking/social/general section)"},"description":{"type":["string","null"],"maxLength":2000,"description":"Description or OG description (cloaking/social section)"},"image":{"type":["string","null"],"maxLength":2048,"description":"Open Graph preview image URL or saved /uploads image (social section)"},"ga":{"type":["string","null"],"maxLength":100,"description":"Google Analytics 4 Measurement ID (tracking section)"},"fb":{"type":["string","null"],"maxLength":100,"description":"Meta Pixel ID (tracking section)"},"adroll":{"type":["string","null"],"maxLength":100,"description":"AdRoll Pixel ID (tracking section)"},"tiktok":{"type":["string","null"],"maxLength":100,"description":"TikTok Pixel ID (tracking section)"},"gtm":{"type":["string","null"],"maxLength":100,"description":"Google Tag Manager Container ID (tracking section)"},"target_url":{"type":["string","null"],"maxLength":4096,"description":"Destination URL (general section)"},"fallback_url":{"type":["string","null"],"maxLength":4096,"description":"Failover destination (general section)"},"redirect_status":{"type":["integer","null"],"enum":[301,302,307,308,null],"description":"HTTP redirect code (general section)"},"ci_code":{"type":"boolean"}}}}}}}},"/links/{id}/bundle":{"put":{"tags":["Link settings"],"summary":"Save / update the MyMiniPage content and design","operationId":"putLinksIdBundle","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":["string","null"],"maxLength":200},"description":{"type":["string","null"],"maxLength":3000},"theme":{"type":["string","null"],"enum":["clean","dark","glass","sunset","forest","neon",null]},"button_style":{"type":["string","null"],"enum":["rounded","pill","square","glass",null]},"logo_url":{"type":["string","null"],"maxLength":2048},"banner_url":{"type":["string","null"],"maxLength":2048},"social":{"type":"object","properties":{"x":{"type":["string","null"],"maxLength":200},"instagram":{"type":["string","null"],"maxLength":200},"youtube":{"type":["string","null"],"maxLength":200},"tiktok":{"type":["string","null"],"maxLength":200},"github":{"type":["string","null"],"maxLength":200},"linkedin":{"type":["string","null"],"maxLength":200},"facebook":{"type":["string","null"],"maxLength":200},"email":{"type":["string","null"],"maxLength":200},"whatsapp":{"type":["string","null"],"maxLength":200},"telegram":{"type":["string","null"],"maxLength":200}}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":["integer","string","null"]},"kind":{"type":"string","enum":["link","header","text"]},"label":{"type":["string","null"],"maxLength":200},"url":{"type":["string","null"],"maxLength":4096},"icon":{"type":["string","null"],"maxLength":100},"highlight":{"type":"boolean"}}}}}}}}}}},"/upload":{"post":{"tags":["QR codes"],"summary":"Upload an image (logo, social card) as a data URL","operationId":"postUpload","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/links/{id}/permissions":{"get":{"tags":["Link settings"],"summary":"Per-link editor/viewer grants","operationId":"getLinksIdPermissions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"},"put":{"tags":["Link settings"],"summary":"Replace per-link grants","operationId":"putLinksIdPermissions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array"}}}}}}}},"/links/{id}/duplicate":{"post":{"tags":["Links"],"summary":"Duplicate a link with its rules, campaign and experiment","operationId":"postLinksIdDuplicate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer)."}},"/links/{id}/slug-suggestions":{"get":{"tags":["Links"],"summary":"Suggest alternative codes","operationId":"getLinksIdSlugSuggestions","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"}},"/links/{id}/social/fetch":{"post":{"tags":["Link settings"],"summary":"Fetch Open Graph data from the destination (throttled)","operationId":"postLinksIdSocialFetch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer)."}},"/links/{id}/cloak-check":{"post":{"tags":["Link settings"],"summary":"Check whether the destination allows framing (throttled)","operationId":"postLinksIdCloakCheck","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer)."}},"/links/{id}/aliases":{"get":{"tags":["Aliases"],"summary":"List extra codes pointing at this link","operationId":"getLinksIdAliases","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"},"post":{"tags":["Aliases"],"summary":"Add an alias code","operationId":"postLinksIdAliases","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100},"subdomain":{"type":["string","null"]},"ci_code":{"type":"boolean"}},"required":["code"]}}}}}},"/links/{id}/aliases/{aliasId}":{"delete":{"tags":["Aliases"],"summary":"Remove an alias","operationId":"deleteLinksIdAliasesAliasId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"aliasId","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer)."}},"/links/{id}/stats":{"get":{"tags":["Analytics"],"summary":"Click analytics for one link","operationId":"getLinksIdStats","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["1","7","30","90","365","all"],"default":"30"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"analytics:read","description":"Scope: `analytics:read`"}},"/links/{id}/clicks.csv":{"get":{"tags":["Analytics"],"summary":"Raw click log as CSV","operationId":"getLinksIdClicksCsv","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"analytics:read","description":"Scope: `analytics:read`"}},"/links/{id}/qr":{"get":{"tags":["QR codes"],"summary":"QR for a link: png/svg/pdf file, or JSON data URL when no format","operationId":"getLinksIdQr","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["png","svg","pdf"]}},{"name":"inline","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"},"put":{"tags":["QR codes"],"summary":"Save the link's default QR design","operationId":"putLinksIdQr","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/links/{id}/qr/render":{"post":{"tags":["QR codes"],"summary":"Render a QR design without saving","operationId":"postLinksIdQrRender","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/links/{id}/qr/published":{"get":{"tags":["QR codes"],"summary":"List published QR snapshots","operationId":"getLinksIdQrPublished","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"}},"/links/{id}/qr/publish":{"post":{"tags":["QR codes"],"summary":"Publish a QR snapshot","operationId":"postLinksIdQrPublish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/links/{id}/qr/published/{pid}":{"patch":{"tags":["QR codes"],"summary":"Update a published QR","operationId":"patchLinksIdQrPublishedPid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"pid","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"tags":["QR codes"],"summary":"Revoke a published QR","operationId":"deleteLinksIdQrPublishedPid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"pid","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer)."}},"/links/{id}/qr/published/{pid}/preview":{"get":{"tags":["QR codes"],"summary":"Image preview of a published QR","operationId":"getLinksIdQrPublishedPidPreview","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"pid","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"}},"/qr-codes":{"get":{"tags":["QR codes"],"summary":"List all published QR codes across the workspace","operationId":"getQrCodes","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["all","on","off","revoked"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"}},"/qr/render":{"post":{"tags":["QR codes"],"summary":"Render a styled static QR image without saving","operationId":"postQrRender","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["png","svg","pdf"]}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4096},"format":{"type":"string","enum":["png","svg","pdf"]},"config":{"type":"object"},"logo":{"type":["string","null"]}},"required":["text"]}}}}}},"/qr/dynamic":{"post":{"tags":["QR codes"],"summary":"Create a dynamic short link + styled QR snapshot in one call","operationId":"postQrDynamic","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["url","wifi","vcard","whatsapp","text","email","sms","phone","location","event","social","crypto"]},"url":{"type":["string","null"],"maxLength":4096},"text":{"type":["string","null"],"maxLength":4096},"fields":{"type":"object"},"title":{"type":["string","null"],"maxLength":200},"name":{"type":["string","null"],"maxLength":60},"alias":{"type":["string","null"],"maxLength":100},"subdomain":{"type":["string","null"],"maxLength":200},"domain":{"type":["string","null"],"maxLength":253},"kind":{"type":"string","enum":["unique","link"]},"preview":{"type":"boolean"},"config":{"type":"object"},"logo":{"type":["string","null"]}}}}}}}},"/links/{id}/qr-card":{"patch":{"tags":["QR codes"],"summary":"Update a dynamic QR card payload (Wi-Fi, vCard, Event, etc.)","operationId":"patchLinksIdQrCard","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/links/{id}/targeting":{"get":{"tags":["Targeting"],"summary":"Device / geo rules, campaign and experiment","operationId":"getLinksIdTargeting","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:read","description":"Scope: `links:read`"}},"/links/{id}/rules/device":{"put":{"tags":["Targeting"],"summary":"Replace device rules","operationId":"putLinksIdRulesDevice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array"}}}}}}}},"/links/{id}/rules/geo":{"put":{"tags":["Targeting"],"summary":"Replace geo rules (country: Hobby+, region: Pro+)","operationId":"putLinksIdRulesGeo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array"}}}}}}}},"/links/{id}/campaign":{"put":{"tags":["Targeting"],"summary":"Set UTM campaign parameters","operationId":"putLinksIdCampaign","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/links/{id}/experiment":{"put":{"tags":["Targeting"],"summary":"Configure an A/B experiment","operationId":"putLinksIdExperiment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/analytics":{"get":{"tags":["Analytics"],"summary":"Workspace-wide breakdowns","operationId":"getAnalytics","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["1","7","30","90","365","all"],"default":"30"}},{"name":"host","in":"query","required":false,"schema":{"type":"string","maxLength":253},"description":"Exact short-link host to include, including an optional subdomain."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Inclusive custom window start date (YYYY-MM-DD)."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"Inclusive custom window end date (YYYY-MM-DD)."}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"analytics:read","description":"Scope: `analytics:read`"}},"/folders":{"get":{"tags":["Folders"],"summary":"List folders","operationId":"getFolders","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"folders:read","description":"Scope: `folders:read`"},"post":{"tags":["Folders"],"summary":"Create a folder","operationId":"postFolders","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"folders:write","description":"Scope: `folders:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"color":{"type":["string","null"],"maxLength":20}},"required":["name"]}}}}}},"/folders/{id}":{"patch":{"tags":["Folders"],"summary":"Rename a folder","operationId":"patchFoldersId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"folders:write","description":"Scope: `folders:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}}},"delete":{"tags":["Folders"],"summary":"Delete a folder (links are kept)","operationId":"deleteFoldersId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"folders:write","description":"Scope: `folders:write` · Needs a workspace role that can write (not viewer)."}},"/tags":{"get":{"tags":["Tags"],"summary":"List tags","operationId":"getTags","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"tags:read","description":"Scope: `tags:read`"}},"/links/{id}/tags":{"put":{"tags":["Tags"],"summary":"Replace a link's tags","operationId":"putLinksIdTags","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"tags:write","description":"Scope: `tags:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":50}}}}}}}},"/subdomains/check":{"get":{"tags":["Domains"],"summary":"Check if a subdomain or host exists and whether the client has access","operationId":"getSubdomainsCheck","parameters":[{"name":"host","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":253},"description":"Full hostname to check (e.g. dev.797.cx or mybrand.com)"},{"name":"subdomain","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":200},"description":"Subdomain label or multi-level label (e.g. dev or api.dev)"},{"name":"domain","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":253},"description":"Parent domain name (defaults to 797.cx)"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:read | links:read | links:write","description":"Scope: `domains:read | links:read | links:write`"}},"/domains/check":{"get":{"tags":["Domains"],"summary":"Check if a subdomain or host exists and whether the client has access","operationId":"getDomainsCheck","parameters":[{"name":"host","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":253},"description":"Full hostname to check (e.g. dev.797.cx or mybrand.com)"},{"name":"subdomain","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":200},"description":"Subdomain label or multi-level label (e.g. dev or api.dev)"},{"name":"domain","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":253},"description":"Parent domain name (defaults to 797.cx)"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:read | links:read | links:write","description":"Scope: `domains:read | links:read | links:write`"}},"/domains":{"get":{"tags":["Domains"],"summary":"Domains and subdomains available to the workspace","operationId":"getDomains","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:read","description":"Scope: `domains:read`"},"post":{"tags":["Domains"],"summary":"Add a custom domain (workspace admin or platform admin)","operationId":"postDomains","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Workspace owner/admin or platform admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string","maxLength":253,"description":"Domain name (e.g. 787.cc)"},"kind":{"type":"string","enum":["platform","byo"],"default":"byo","description":"platform: platform-wide (platform admin only). byo: workspace customer domain."},"workspace_id":{"type":["string","null"],"description":"Customer workspace ID (platform admin override; defaults to active workspace)."}},"required":["host"]}}}}}},"/domains/{id}/verify":{"post":{"tags":["Domains"],"summary":"Verify a custom domain DNS configuration (workspace admin or platform admin)","operationId":"postDomainsIdVerify","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Workspace owner/admin or platform admin."}},"/domains/{id}":{"delete":{"tags":["Domains"],"summary":"Remove or disable a custom domain (workspace admin or platform admin)","operationId":"deleteDomainsId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Workspace owner/admin or platform admin."}},"/domains/{id}/index":{"put":{"tags":["Domains"],"summary":"Set or clear what the bare apex custom domain root (https://domain/) serves","operationId":"putDomainsIdIndex","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Workspace owner/admin or platform admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"link_id":{"description":"Link ID/UUID, or null to clear."}}}}}}}},"/domains/{id}/subdomains":{"post":{"tags":["Domains"],"summary":"Create a subdomain on custom domain (self-service) or request on primary domain","operationId":"postDomainsIdSubdomains","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200,"description":"Subdomain label or multi-level subdomain (e.g. ss22 or sub.sub.sub)"},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Subdomain name alias for label"},"note":{"type":["string","null"],"maxLength":500,"description":"Optional request note for platform domain requests"}}}}}}}},"/subdomain-requests":{"get":{"tags":["Domains"],"summary":"My pending subdomain requests","operationId":"getSubdomainRequests","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:read","description":"Scope: `domains:read`"}},"/subdomain-requests/{id}":{"delete":{"tags":["Domains"],"summary":"Cancel a subdomain request","operationId":"deleteSubdomainRequestsId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Needs a workspace role that can write (not viewer)."}},"/domains/{id}/subdomains/{subId}/index":{"put":{"tags":["Domains"],"summary":"Set what the bare subdomain root (https://label.domain/) serves","operationId":"putDomainsIdSubdomainsSubIdIndex","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"subId","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"link_id":{"description":"Link ID/UUID, or null to clear."}}}}}}}},"/domains/{id}/subdomains/{subId}":{"delete":{"tags":["Domains"],"summary":"Remove a subdomain","operationId":"deleteDomainsIdSubdomainsSubId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"subId","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"domains:write","description":"Scope: `domains:write` · Needs a workspace role that can write (not viewer)."}},"/links/import":{"post":{"tags":["Links"],"summary":"CSV-style import of up to 500 rows (dry_run validates without writing)","operationId":"postLinksImport","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","maxItems":5000,"items":{"type":"object","properties":{"url":{"type":"string"},"alias":{"type":["string","null"]},"title":{"type":["string","null"]}}}},"dry_run":{"type":"boolean"}},"required":["rows"]}}}}}},"/overview":{"get":{"tags":["Analytics"],"summary":"Totals, 30-day trend and top links","operationId":"getOverview","parameters":[{"name":"host","in":"query","required":false,"schema":{"type":"string","maxLength":253},"description":"Exact short-link host to include, including an optional subdomain."}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"analytics:read","description":"Scope: `analytics:read`"}},"/links/bulk":{"post":{"tags":["Links"],"summary":"Create up to 100 links; per-item results, partial success allowed","operationId":"postLinksBulk","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":4096,"description":"Destination URL (http/https)."},"alias":{"type":["string","null"],"maxLength":100,"description":"Custom code. Omit for a random one."},"subdomain":{"type":["string","null"],"maxLength":200,"description":"Vanity subdomain label or multi-level subdomain (e.g. ss22 or sub.sub.sub) under the primary or custom domain."},"domain":{"type":["string","null"],"maxLength":253,"description":"Full host (custom domain apex or <label>.domain)."},"title":{"type":["string","null"],"maxLength":500},"fallback_url":{"type":["string","null"],"maxLength":4096},"redirect_status":{"type":["integer","null"],"enum":[301,302,307,308,null]},"preview":{"type":"boolean"}},"required":["url"]}}},"required":["links"]}}}}},"patch":{"tags":["Links"],"summary":"Update up to 100 links (same fields as PATCH /links/{id})","operationId":"patchLinksBulk","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},"required":["id"]}}},"required":["links"]}}}}}},"/links/bulk/delete":{"post":{"tags":["Links"],"summary":"Delete up to 100 links","operationId":"postLinksBulkDelete","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"links:write","description":"Scope: `links:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}},"required":["ids"]}}}}}},"/stream":{"get":{"tags":["Analytics"],"summary":"Live clicks as Server-Sent Events (event: click)","operationId":"getStream","parameters":[{"name":"link_id","in":"query","required":false,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"analytics:read","description":"Scope: `analytics:read`"}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints (workspace owner/admin)","operationId":"getWebhooks","responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:read","description":"Scope: `webhooks:read`"},"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint — the signing secret is returned once","operationId":"postWebhooks","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:write","description":"Scope: `webhooks:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","link.created","link.updated","link.deleted","link.flagged","link.clicked"]}},"description":{"type":["string","null"],"maxLength":200}},"required":["url"]}}}}}},"/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Get one webhook endpoint","operationId":"getWebhooksId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:read","description":"Scope: `webhooks:read`"},"patch":{"tags":["Webhooks"],"summary":"Update URL, events, description or active flag","operationId":"patchWebhooksId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:write","description":"Scope: `webhooks:write` · Needs a workspace role that can write (not viewer).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":8,"maxLength":2000},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","link.created","link.updated","link.deleted","link.flagged","link.clicked"]}},"description":{"type":["string","null"],"maxLength":200},"active":{"type":"boolean"}}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","operationId":"deleteWebhooksId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:write","description":"Scope: `webhooks:write` · Needs a workspace role that can write (not viewer)."}},"/webhooks/{id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Issue a new signing secret (returned once)","operationId":"postWebhooksIdRotateSecret","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:write","description":"Scope: `webhooks:write` · Needs a workspace role that can write (not viewer)."}},"/webhooks/{id}/ping":{"post":{"tags":["Webhooks"],"summary":"Queue a test `ping` delivery","operationId":"postWebhooksIdPing","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:write","description":"Scope: `webhooks:write` · Needs a workspace role that can write (not viewer)."}},"/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Delivery log (30 days), newest first","operationId":"getWebhooksIdDeliveries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","success","failed"]}},{"name":"before","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:read","description":"Scope: `webhooks:read`"}},"/webhooks/{id}/deliveries/{deliveryId}/redeliver":{"post":{"tags":["Webhooks"],"summary":"Send a past event again","operationId":"postWebhooksIdDeliveriesDeliveryIdRedeliver","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","pattern":"^([0-9]+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Success"},"default":{"$ref":"#/components/responses/Error"}},"x-required-scope":"webhooks:write","description":"Scope: `webhooks:write` · Needs a workspace role that can write (not viewer)."}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Workspace API key."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry-safe writes: the same key + body within 24 h returns the first response.","schema":{"type":"string","maxLength":255}}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"request_id":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}},"required_scope":{"type":"string"},"feature":{"type":"string"},"retry_after":{"type":"integer"}}}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"x-rate-limits":{"per_minute_by_plan":[{"plan":"Free","rpm":60},{"plan":"Hobby","rpm":120},{"plan":"Pro","rpm":600},{"plan":"Team","rpm":1200},{"plan":"Enterprise","rpm":3000}],"session_floor":300},"x-monthly-quotas":[{"plan":"Free","rpm":60,"links_per_hour":200,"links_per_month":1000,"clicks_per_month":5000,"api_monthly_requests":50000,"webhooks":2,"seats":1},{"plan":"Hobby","rpm":120,"links_per_hour":500,"links_per_month":5000,"clicks_per_month":25000,"api_monthly_requests":200000,"webhooks":5,"seats":2},{"plan":"Pro","rpm":600,"links_per_hour":2000,"links_per_month":25000,"clicks_per_month":150000,"api_monthly_requests":1000000,"webhooks":20,"seats":5},{"plan":"Team","rpm":1200,"links_per_hour":10000,"links_per_month":100000,"clicks_per_month":500000,"api_monthly_requests":5000000,"webhooks":50,"seats":20},{"plan":"Enterprise","rpm":3000,"links_per_hour":50000,"links_per_month":null,"clicks_per_month":null,"api_monthly_requests":null,"webhooks":100,"seats":null}],"x-webhook-events":["link.created","link.updated","link.deleted","link.flagged","link.clicked"]}