{"openapi":"3.1.0","info":{"version":"1.0.0","title":"in.mt API","description":"Create and manage short links, one-time secrets, custom domains and link analytics on in.mt 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 and deletes links and secrets; an `admin` key can do everything its owner can. Every call acts on the workspace of the key. Guide: https://in.mt/api/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.in.mt/mcp` — Streamable HTTP (JSON-RPC 2.0), authenticated with the same `x-api-key` header and scoped to the key's workspace. Tools: create_short_url, bulk_create_short_urls, list_links, get_link, update_link, delete_link, get_link_analytics, list_link_visits, list_domains, create_secret, get_secret_status, list_activity. API catalog: `https://in.mt/api/.well-known/api-catalog`."},"servers":[{"url":"https://in.mt/api","description":"in.mt"}],"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","guest","api-key","system"],"description":"Who acted: a signed-in member, a guest, 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"},"ipAddress":{"type":"string","description":"The client's IP address, resolved once at the edge"},"country":{"type":"string","description":"ISO country code of the client IP"},"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"]},"UrlType":{"type":"string","enum":["short","secret"]},"UrlUtm":{"type":"object","properties":{"source":{"type":"string","maxLength":200},"medium":{"type":"string","maxLength":200},"campaign":{"type":"string","maxLength":200},"term":{"type":"string","maxLength":200},"content":{"type":"string","maxLength":200}},"description":"UTM parameters appended to the destination on redirect (short links only)"},"UrlRule":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable rule id (analytics `rule` dimension); assigned when omitted on create/update","example":"018f6b1c-7e2a-7000-9d3e-000000000031"},"when":{"type":"object","properties":{"devices":{"type":"array","items":{"$ref":"#/components/schemas/UrlRuleDevice"},"minItems":1},"os":{"type":"array","items":{"$ref":"#/components/schemas/UrlRuleOs"},"minItems":1},"countries":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"},"minItems":1,"description":"ISO 3166-1 alpha-2 country codes","example":["DE","AT"]}},"description":"Every given condition must match (devices OR-ed within the list, and so on)"},"destinationUrl":{"type":"string","maxLength":4096,"format":"uri","example":"https://apps.apple.com/app/id123"}},"required":["id","when","destinationUrl"]},"UrlRuleDevice":{"type":"string","enum":["mobile","tablet","desktop"]},"UrlRuleOs":{"type":"string","enum":["ios","android","macos","windows","linux"]},"UrlPreview":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":500},"imageUrl":{"type":"string","maxLength":2048,"format":"uri"}}},"UrlQrStyle":{"type":"object","properties":{"foreground":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#111827"},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#ffffff"},"dotStyle":{"type":"string","enum":["square","dots","rounded","classy","extra-rounded"]},"cornerStyle":{"type":"string","enum":["square","dot","extra-rounded"]},"logo":{"type":"string","enum":["brand","none"]},"frameText":{"type":"string","minLength":1,"maxLength":30,"example":"Scan me"}},"required":["foreground","background","dotStyle","cornerStyle","logo"]},"UrlStatus":{"type":"string","enum":["active","disabled","expired","consumed"]},"UrlAbuse":{"type":"object","properties":{"source":{"type":"string","description":"Which list matched: `blocklist`, `safe-browsing` or a feed of `URL_ABUSE_FEEDS` (`urlhaus` with an abuse.ch key)","example":"blocklistproject-scam"},"category":{"$ref":"#/components/schemas/UrlAbuseCategory"},"action":{"type":"string","enum":["disable","lock","flag"],"description":"`disable`/`lock`: the link was turned off or locked; `flag`: it stays active, for staff review"},"matchedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"reason":{"type":"string","example":"SCAM"}},"required":["source","category","action","matchedAt","reason"]},"UrlAbuseCategory":{"type":"string","enum":["phishing","malware","scam","fraud","adult"]},"UrlModel":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"workspaceId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"Owning workspace; null for a guest link"},"createdByUserId":{"type":["string","null"],"format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"Member who created it; null for a guest link"},"type":{"$ref":"#/components/schemas/UrlType"},"domain":{"type":"string","description":"Full host the link lives on: a brand domain, a workspace subdomain or a verified custom domain","example":"ur.link"},"slug":{"type":"string","example":"aB3xY7k"},"destinationUrl":{"type":"string","description":"Redirect target (short links only)","example":"https://example.com/landing"},"title":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":1000},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"utm":{"$ref":"#/components/schemas/UrlUtm"},"batchId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"The bulk create that made the link"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/UrlRule"},"maxItems":20,"description":"Smart redirects, evaluated in order; no match → `destinationUrl`"},"preview":{"$ref":"#/components/schemas/UrlPreview"},"qrStyle":{"$ref":"#/components/schemas/UrlQrStyle"},"hasPassword":{"type":"boolean","description":"True when opening the short link needs a password (`/public-url/unlock`)"},"maxClicks":{"type":"integer","minimum":1,"maximum":1000000,"description":"The link expires once it has this many clicks"},"hasPassphrase":{"type":"boolean","description":"Whether revealing the secret needs a passphrase"},"maxViews":{"type":"integer","minimum":1},"viewCount":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/UrlStatus"},"isLocked":{"type":"boolean","description":"Locked by staff for abuse: it redirects to a safe URL and its owner can no longer change it (delete still works)"},"abuse":{"$ref":"#/components/schemas/UrlAbuse"},"expiresAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"After this instant the link stops resolving; secrets are deleted by a TTL index"},"clickCount":{"type":"integer","minimum":0},"firstAccessedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"lastAccessedAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z"},"origin":{"$ref":"#/components/schemas/RequestOrigin"},"backOfficeOrigin":{"allOf":[{"$ref":"#/components/schemas/RequestOrigin"},{"description":"The staff member who last changed the link in BackOffice, and from where"}]},"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","type","domain","slug","hasPassphrase","viewCount","status","isLocked","clickCount","createdAt","updatedAt"]},"UrlAnalyticsSummaryResponse":{"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"},"total":{"type":"integer","description":"Human clicks and views"},"unique":{"type":"integer","description":"Sum of distinct visitors per day"},"bots":{"type":"integer"},"top":{"type":"object","properties":{"country":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}},"device":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}},"browser":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}},"os":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}},"referrer":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}},"rule":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}},"source":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}}},"description":"Top 5 values per dimension"}},"required":["from","to","total","unique","bots","top"]},"UrlAnalyticsCount":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer"}},"required":["key","count"]},"UrlAnalyticsTimelineResponse":{"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)"},"total":{"type":"integer"},"unique":{"type":"integer"}},"required":["date","total","unique"]}}},"required":["interval","points"]},"UrlAnalyticsBreakdownResponse":{"type":"object","properties":{"dimension":{"$ref":"#/components/schemas/UrlAnalyticsDimension"},"items":{"type":"array","items":{"$ref":"#/components/schemas/UrlAnalyticsCount"}}},"required":["dimension","items"]},"UrlAnalyticsDimension":{"type":"string","enum":["country","device","browser","os","referrer","rule","source"]},"UrlAnalyticsVisitsListResponse":{"type":"object","properties":{"visits":{"type":"array","items":{"$ref":"#/components/schemas/UrlVisit"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` for the next page; null on the last page"}},"required":["visits","nextCursor"]},"UrlVisit":{"type":"object","properties":{"_id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"urlId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-4a5b6c7d8e9f","description":"UUID v7 identifier (36-character string)"},"type":{"$ref":"#/components/schemas/UrlEventType"},"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"},"country":{"type":"string","example":"CA"},"region":{"type":"string","description":"Region as the edge tells it (`x-ip-region`)","example":"Ontario"},"city":{"type":"string","description":"City as the edge tells it (`x-ip-city`)","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/UrlEventSource"},"ruleId":{"type":"string","description":"The smart-redirect rule that matched, when one did"},"isBot":{"type":"boolean"}},"required":["_id","urlId","type","occurredAt","country","device","browser","os","referrerHost","source","isBot"]},"UrlEventType":{"type":"string","enum":["click","view"]},"UrlEventSource":{"type":"string","enum":["link","qr"],"description":"How the visitor arrived: the link itself or 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 link can be created on (the upsell entry carries a placeholder)","example":"ur.link"},"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":"ur.link"},"tagline":{"type":"string","example":"Professional"},"isDefault":{"type":"boolean","description":"The current host's own domain: the picker's preselected option"},"available":{"type":"boolean","description":"Whether links can be created 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"]},"PublicUrlCreateResponse":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/UrlModel"},"link":{"type":"string","description":"Public URL; a secret link gets `#<key>` appended in the browser","example":"https://ur.link/aB3xY7k"},"guestToken":{"type":"string","description":"Keep it in the browser: it deletes the link and claims it after sign-in. Shown once."}},"required":["url","link","guestToken"]},"ConflictError":{"type":"object","properties":{"error":{"type":"string","example":"SLUG_TAKEN"},"message":{"type":"string"}},"required":["error","message"]},"PublicUrlShortCreateRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Destination (http or https)","example":"https://example.com/landing"},"domain":{"type":"string","maxLength":253,"description":"A brand domain; default the current host's brand","example":"in.mt"},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Custom slug (`^[a-zA-Z0-9_-]{1,64}$`, not a reserved path)","example":"launch-2026"}},"required":["url"]},"UrlBulkCreateResponse":{"type":"object","properties":{"batchId":{"type":"string","format":"uuid","description":"Shared by every link this call created; filter `/url/list` by it"},"results":{"type":"array","items":{"$ref":"#/components/schemas/UrlBulkCreateResult"}},"created":{"type":"integer"},"failed":{"type":"integer"}},"required":["batchId","results","created","failed"]},"UrlBulkCreateResult":{"type":"object","properties":{"index":{"type":"integer","description":"Position of the item in the request"},"url":{"$ref":"#/components/schemas/UrlModel"},"link":{"type":"string"},"guestToken":{"type":"string","description":"Guest bulk create only: this link's own guest token (delete, claim). Shown once."},"error":{"type":"string","example":"SLUG_TAKEN"},"message":{"type":"string"}},"required":["index"]},"PublicUrlShortBulkCreateRequest":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"description":"A brand domain for every link; default the current host's brand","example":"in.mt"},"items":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri","description":"Destination (http or https)","example":"https://example.com/landing"},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Custom slug (`^[a-zA-Z0-9_-]{1,64}$`, not a reserved path)","example":"launch-2026"}},"required":["url"]},"minItems":1,"maxItems":100,"description":"Links to shorten (1-100)"}},"required":["items"]},"PublicUrlSecretCreateRequest":{"type":"object","properties":{"ciphertext":{"type":"string","minLength":1,"maxLength":200000,"description":"AES-GCM ciphertext made in the browser; the key stays in the URL fragment"},"passphrase":{"type":"string","minLength":1,"maxLength":200,"description":"Optional passphrase asked before the ciphertext is returned (stored hashed)"},"maxViews":{"type":"integer","minimum":1,"maximum":100,"description":"Views before the secret is gone (1-100, default 1)","example":1},"expiresInSeconds":{"type":"integer","minimum":60,"maximum":2592000,"description":"Lifetime in seconds (60-2592000, default 604800)","example":86400},"domain":{"type":"string","maxLength":253,"description":"A brand domain; default the current host's brand","example":"cia.sh"},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Custom slug, served at `/s/<slug>` (`^[a-zA-Z0-9_-]{1,64}$`, not a reserved path); default a random 12-character slug. A guessable slug lets anyone see that the secret exists.","example":"wifi-guest"}},"required":["ciphertext"]},"PublicUrlSecretDetailsResponse":{"type":"object","properties":{"exists":{"type":"boolean","description":"False when it never existed, expired or was used up"},"requiresPassphrase":{"type":"boolean"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Null when the secret is not available"},"viewsLeft":{"type":"integer"},"viewCount":{"type":"integer","description":"Views used so far"},"maxViews":{"type":"integer","description":"Views allowed in total"}},"required":["exists","requiresPassphrase","expiresAt","viewsLeft","viewCount","maxViews"]},"PublicUrlSecretRevealResponse":{"type":"object","properties":{"ciphertext":{"type":"string"},"viewsLeft":{"type":"integer"},"viewCount":{"type":"integer","description":"Views used, this one included"},"maxViews":{"type":"integer"}},"required":["ciphertext","viewsLeft","viewCount","maxViews"]},"PublicUrlSecretRevealRequest":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"Host the link lives on","example":"ur.link"},"slug":{"type":"string","minLength":1,"maxLength":64,"example":"aB3xY7kP9qRs"},"passphrase":{"type":"string","maxLength":200,"description":"Needed when details says `requiresPassphrase`"}},"required":["domain","slug"]},"UrlListResponse":{"type":"object","properties":{"urls":{"type":"array","items":{"$ref":"#/components/schemas/UrlModel"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["urls","pagination"]},"UrlCreateResponse":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/UrlModel"},"link":{"type":"string","example":"https://ur.link/aB3xY7k"}},"required":["url","link"]},"UrlCreateRequest":{"type":"object","properties":{"destinationUrl":{"type":"string","maxLength":4096,"format":"uri","description":"Redirect target (http or https)","example":"https://example.com/landing"},"domain":{"type":"string","maxLength":253,"description":"Host to create the link on: a brand domain, the workspace's subdomain or a verified custom domain. Default: the current host's brand.","example":"ur.link"},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Custom slug (`^[a-zA-Z0-9_-]{1,64}$`, not a reserved path)","example":"launch-2026"},"title":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":1000},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"utm":{"$ref":"#/components/schemas/UrlUtm"},"expiresAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Optional: the link stops resolving after this instant"},"password":{"type":"string","minLength":4,"maxLength":128,"description":"Visitors enter it before the redirect (`/public-url/unlock`); stored hashed","example":"open-sesame"},"maxClicks":{"type":"integer","minimum":1,"maximum":1000000,"description":"The link expires once it has this many clicks"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/UrlRuleInput"},"maxItems":20,"description":"Smart redirects (≤20), first match wins; ids are assigned when omitted"},"preview":{"$ref":"#/components/schemas/UrlPreview"},"qrStyle":{"$ref":"#/components/schemas/UrlQrStyle"},"ciphertext":{"type":"string","minLength":1,"maxLength":200000,"description":"AES-GCM ciphertext made in the browser; the key stays in the URL fragment"},"passphrase":{"type":"string","minLength":1,"maxLength":200,"description":"Optional passphrase asked before the ciphertext is returned (stored hashed)"},"maxViews":{"type":"integer","minimum":1,"maximum":100,"description":"Views before the secret is gone (1-100, default 1)","example":1},"expiresInSeconds":{"type":"integer","minimum":60,"maximum":2592000,"description":"Lifetime in seconds (60-2592000, default 604800)","example":86400},"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace the link belongs to"},"type":{"allOf":[{"$ref":"#/components/schemas/UrlType"},{"description":"`short` needs `destinationUrl`; `secret` needs `ciphertext`"}]}},"required":["workspaceId","type"]},"UrlRuleInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable rule id (analytics `rule` dimension); assigned when omitted on create/update","example":"018f6b1c-7e2a-7000-9d3e-000000000031"},"when":{"type":"object","properties":{"devices":{"type":"array","items":{"$ref":"#/components/schemas/UrlRuleDevice"},"minItems":1},"os":{"type":"array","items":{"$ref":"#/components/schemas/UrlRuleOs"},"minItems":1},"countries":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"},"minItems":1,"description":"ISO 3166-1 alpha-2 country codes","example":["DE","AT"]}},"description":"Every given condition must match (devices OR-ed within the list, and so on)"},"destinationUrl":{"type":"string","maxLength":4096,"format":"uri","example":"https://apps.apple.com/app/id123"}},"required":["when","destinationUrl"]},"UrlUpdateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Link id"},"set":{"$ref":"#/components/schemas/UrlUpdateSet"}},"required":["id","set"]},"UrlUpdateSet":{"type":"object","properties":{"destinationUrl":{"type":"string","maxLength":4096,"format":"uri","description":"New redirect target (short links only)"},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"New slug on the same domain (short links only)","example":"launch-2026"},"title":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":1000},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"utm":{"$ref":"#/components/schemas/UrlUtm"},"status":{"type":"string","enum":["active","disabled"],"description":"Turn the link off or back on"},"expiresAt":{"type":["string","null"],"format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"New expiry (short links only); null removes it"},"password":{"type":["string","null"],"description":"New visitor password (short links only); null removes it"},"maxClicks":{"type":["integer","null"],"description":"New click limit (short links only); null removes it"},"rules":{"type":["array","null"],"items":{"$ref":"#/components/schemas/UrlRuleInput"},"maxItems":20,"description":"Replace the smart redirects (short links only); null removes them"},"preview":{"allOf":[{"$ref":"#/components/schemas/UrlPreview"},{"type":["object","null"]}]},"qrStyle":{"allOf":[{"$ref":"#/components/schemas/UrlQrStyle"},{"type":["object","null"]}]}}},"UrlDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"UrlDeleteRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Link id"}},"required":["id"]},"UrlBulkCreateRequest":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace the links belong to"},"items":{"type":"array","items":{"type":"object","properties":{"destinationUrl":{"type":"string","maxLength":4096,"format":"uri","description":"Redirect target (http or https)","example":"https://example.com/landing"},"domain":{"type":"string","maxLength":253,"description":"Host to create the link on: a brand domain, the workspace's subdomain or a verified custom domain. Default: the current host's brand.","example":"ur.link"},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"Custom slug (`^[a-zA-Z0-9_-]{1,64}$`, not a reserved path)","example":"launch-2026"},"title":{"type":"string","maxLength":200},"note":{"type":"string","maxLength":1000},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"utm":{"$ref":"#/components/schemas/UrlUtm"},"expiresAt":{"type":"string","format":"date-time","example":"2025-01-01T12:00:00.000Z","description":"Optional: the link stops resolving after this instant"},"password":{"type":"string","minLength":4,"maxLength":128,"description":"Visitors enter it before the redirect (`/public-url/unlock`); stored hashed","example":"open-sesame"},"maxClicks":{"type":"integer","minimum":1,"maximum":1000000,"description":"The link expires once it has this many clicks"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/UrlRuleInput"},"maxItems":20,"description":"Smart redirects (≤20), first match wins; ids are assigned when omitted"},"preview":{"$ref":"#/components/schemas/UrlPreview"},"qrStyle":{"$ref":"#/components/schemas/UrlQrStyle"}},"required":["destinationUrl"]},"minItems":1,"maxItems":100,"description":"Short links to create (1-100)"}},"required":["workspaceId","items"]},"UrlClaimResponse":{"type":"object","properties":{"claimed":{"type":"integer","description":"Links attached by this call"}},"required":["claimed"]},"UrlClaimRequest":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Workspace to attach the guest links to"},"guestTokens":{"type":"array","items":{"type":"string","minLength":16,"maxLength":200},"minItems":1,"maxItems":500,"description":"Guest tokens returned when the links were created (kept in the browser)"}},"required":["workspaceId","guestTokens"]},"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":"go.customer.com","value":"custom.ur.link"}},"txt":{"type":"object","properties":{"type":{"type":"string","enum":["TXT"]},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"example":{"type":"TXT","name":"_ur-link-verify.go.customer.com","value":"ur-link-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 links live on","example":"go.customer.com"},"status":{"$ref":"#/components/schemas/CustomDomainStatus"},"verificationToken":{"type":"string","description":"Value of the ownership TXT record","example":"ur-link-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 links will live on (a subdomain such as `go.customer.com`)","example":"go.customer.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 link domains","description":"List the domains a link can be created 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"}}}}}}},"/public-url/short/create":{"post":{"summary":"Shorten a link as a guest","description":"Create a short link without an account (Turnstile token in `x-cf-turnstile-token`); keep the returned guest token to delete or claim it.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlShortCreateRequest"}}}},"responses":{"201":{"description":"Short link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlCreateResponse"}}}},"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"}}}}}}},"/public-url/short/bulk-create":{"post":{"summary":"Shorten many links as a guest","description":"Shorten up to 100 links without an account (one Turnstile token in `x-cf-turnstile-token` for the batch); each item succeeds or fails on its own and gets its own guest token.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlShortBulkCreateRequest"}}}},"responses":{"200":{"description":"Each item created or refused on its own (partial success)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlBulkCreateResponse"}}}},"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"}}}}}}},"/public-url/secret/create":{"post":{"summary":"Share a one-time secret as a guest","description":"Store a secret encrypted in the browser (the key stays in the link fragment) that can be revealed `maxViews` times before `expiresInSeconds`; Turnstile token in `x-cf-turnstile-token`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlSecretCreateRequest"}}}},"responses":{"201":{"description":"Secret created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlCreateResponse"}}}},"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"}}}}}}},"/public-url/secret/details":{"get":{"summary":"Check a secret","description":"Check whether a secret can still be revealed, whether it needs a passphrase, and how many views are left, without using a view.","security":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":253,"description":"Host the link lives on","example":"ur.link"},"required":true,"description":"Host the link lives on","name":"domain","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"aB3xY7kP9qRs"},"required":true,"name":"slug","in":"query"}],"responses":{"200":{"description":"Whether the secret can still be revealed (no view is used)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlSecretDetailsResponse"}}}},"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"}}}}}}},"/public-url/secret/reveal":{"post":{"summary":"Reveal a secret","description":"Return the ciphertext and use one view, atomically; the last view deletes the content. A missing, expired or used-up secret and a wrong passphrase all answer 404 SECRET_NOT_AVAILABLE.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlSecretRevealRequest"}}}},"responses":{"200":{"description":"The ciphertext; this used one view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUrlSecretRevealResponse"}}}},"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"}}}}}}},"/url/list":{"get":{"summary":"List the workspace's links","description":"List the workspace's short links and secrets, filtered by type, status, domain, tags 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","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000013","description":"Links of one bulk create"},"required":false,"description":"Links of one bulk create","name":"batchId","in":"query"},{"schema":{"type":"string","description":"Link types (comma-separated)","example":"short"},"required":false,"description":"Link types (comma-separated)","name":"type","in":"query"},{"schema":{"type":"string","description":"Statuses (comma-separated)","example":"active,disabled"},"required":false,"description":"Statuses (comma-separated)","name":"status","in":"query"},{"schema":{"type":"string","description":"Domains (comma-separated)","example":"ur.link,go.customer.com"},"required":false,"description":"Domains (comma-separated)","name":"domain","in":"query"},{"schema":{"type":"string","description":"Links carrying any of these tags (comma-separated)","example":"launch"},"required":false,"description":"Links carrying any of these tags (comma-separated)","name":"tags","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Search slug, title, destination and note","example":"pricing"},"required":false,"description":"Search slug, title, destination and note","name":"q","in":"query"},{"schema":{"type":"string","enum":["createdAt","updatedAt","clickCount","lastAccessedAt","title","expiresAt"],"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":"Links retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlListResponse"}}}},"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"}}}}}}},"/url/details":{"get":{"summary":"Get a link","description":"Get one link or secret of a workspace you belong to (never the secret content).","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"Link id"},"required":true,"description":"Link id","name":"id","in":"query"}],"responses":{"200":{"description":"Link retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlModel"}}}},"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"}}}}}}},"/url/create":{"post":{"summary":"Create a link or secret","description":"Create a short link (`type: short`, `destinationUrl`, optional password, click limit, smart-redirect rules, preview and QR style) or a one-time secret (`type: secret`, browser-encrypted `ciphertext`, served at `/s/<slug>`) in the workspace, counted against its plan; `slug` is optional for both.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlCreateRequest"}}}},"responses":{"201":{"description":"Link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlCreateResponse"}}}},"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"}}}}}}},"/url/update":{"post":{"summary":"Change a link","description":"Change a link's destination, slug, title, note, tags, UTM, status, expiry, password, click limit, smart redirects, preview or QR style (null clears the nullable ones); a secret only takes title, note, tags and status.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlUpdateRequest"}}}},"responses":{"200":{"description":"Link updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlModel"}}}},"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"}}}}}}},"/url/delete":{"post":{"summary":"Delete a link","description":"Delete a link or secret; it stops resolving at once. Deleting one that is already gone succeeds.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlDeleteRequest"}}}},"responses":{"200":{"description":"Link deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlDeleteResponse"}}}},"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"}}}}}}},"/url/bulk-create":{"post":{"summary":"Create many short links","description":"Create up to 100 short links at once; each item succeeds or fails on its own (taken slug, blocked destination, plan limit).","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlBulkCreateRequest"}}}},"responses":{"200":{"description":"Each item created or refused on its own (partial success)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlBulkCreateResponse"}}}},"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"}}}}}}},"/url/claim":{"post":{"summary":"Claim guest links","description":"Attach links and secrets created as a guest to a workspace, by their guest tokens. A token already claimed or unknown is skipped.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlClaimRequest"}}}},"responses":{"200":{"description":"Guest links attached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlClaimResponse"}}}},"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"}}}}}}},"/url-analytics/summary":{"get":{"summary":"Get link analytics totals","description":"Get totals (clicks/views, unique visitors, bots) and the top countries, devices, browsers, systems, referrers, smart-redirect rules and sources (link or QR) of one link or the whole workspace, within the plan's retention.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"One link (else `workspaceId`)"},"required":false,"description":"One link (else `workspaceId`)","name":"urlId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000012","description":"Every link of the workspace (when `urlId` is not given)"},"required":false,"description":"Every link of the workspace (when `urlId` 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/UrlAnalyticsSummaryResponse"}}}},"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"}}}}}}},"/url-analytics/timeline":{"get":{"summary":"Get link analytics over time","description":"Get clicks/views and unique visitors per day, week or month for one link 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-000000000011","description":"One link (else `workspaceId`)"},"required":false,"description":"One link (else `workspaceId`)","name":"urlId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000012","description":"Every link of the workspace (when `urlId` is not given)"},"required":false,"description":"Every link of the workspace (when `urlId` 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/UrlAnalyticsTimelineResponse"}}}},"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"}}}}}}},"/url-analytics/breakdown":{"get":{"summary":"Break down link analytics","description":"Count clicks/views of one link or the whole workspace by country, device, browser, operating system, referrer, smart-redirect rule (`rule`, `default` when none matched) or source (`link`, `qr`), highest first.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"One link (else `workspaceId`)"},"required":false,"description":"One link (else `workspaceId`)","name":"urlId","in":"query"},{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000012","description":"Every link of the workspace (when `urlId` is not given)"},"required":false,"description":"Every link of the workspace (when `urlId` 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/UrlAnalyticsDimension"},"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/UrlAnalyticsBreakdownResponse"}}}},"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"}}}}}}},"/url-analytics/visits/list":{"get":{"summary":"List link visits","description":"List one link's raw visits (kept 90 days, within the plan's retention), newest first: anonymized IP, place, device, browser, user agent, referrer, source and smart-redirect rule. Bots are left out unless `includeBots=true`; page with `cursor`.","security":[{"ApiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"018f6b1c-7e2a-7000-9d3e-000000000011","description":"The link"},"required":true,"description":"The link","name":"urlId","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/UrlEventSource"},"required":false,"description":"How the visitor arrived: the link itself or its QR code","name":"source","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"Visits sent on by this smart-redirect rule; `default` for those no rule matched"},"required":false,"description":"Visits sent on by this smart-redirect rule; `default` for those no rule matched","name":"ruleId","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 link's visits, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlAnalyticsVisitsListResponse"}}}},"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"}}}}}}},"/url-analytics/visits/export":{"get":{"summary":"Export link visits as CSV","description":"Stream the same visits `/url-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-000000000011","description":"The link"},"required":true,"description":"The link","name":"urlId","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/UrlEventSource"},"required":false,"description":"How the visitor arrived: the link itself or its QR code","name":"source","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"Visits sent on by this smart-redirect rule; `default` for those no rule matched"},"required":false,"description":"Visits sent on by this smart-redirect rule; `default` for those no rule matched","name":"ruleId","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,type,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"}}}}}}},"/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 `_ur-link-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 (links on it stop resolving). 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":{}}