{"openapi":"3.0.3","info":{"title":"tinbo API","description":"Create and manage short links, tags, folders and domains, and read their click analytics.\n\n**Authentication.** Every request carries an API key from the dashboard (workspace → API): `Authorization: Bearer tinbo_…`. A key belongs to one workspace and acts as the admin who created it. The API is on the Pro plan.\n\n**Rate limit.** 300 requests per minute per workspace, shared by all its keys. Analytics requests count in it and also have their own 20 per minute. Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds; on analytics, of its own allowance); a 429 also carries `Retry-After`.\n\n**Errors.** `{ \"error\": { \"code\", \"message\", \"issues\"? } }` — codes: bad_request, unauthorized, forbidden, plan_required, limit_reached, not_found, conflict, unprocessable_entity, rate_limit_exceeded, internal_server_error.","version":"1.0.0"},"servers":[{"url":"https://api.tinbo.co"}],"tags":[{"name":"Links"},{"name":"Tags"},{"name":"Folders"},{"name":"Domains"},{"name":"Analytics"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"tinbo_…"}},"schemas":{}},"security":[{"apiKey":[]}],"paths":{"/v1/links":{"get":{"summary":"List links","description":"Newest first.","tags":["Links"],"parameters":[{"name":"domain","in":"query","required":false,"schema":{"description":"Only links on this host","type":"string"}},{"name":"folderId","in":"query","required":false,"schema":{"type":"string"}},{"name":"tagIds","in":"query","required":false,"schema":{"description":"Tag ids: links with any of them; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"search","in":"query","required":false,"schema":{"description":"Slug, title or destination contains","type":"string","maxLength":100}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"`nextCursor` of the previous page","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"slug":{"type":"string"},"shortLink":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"ogImageUrl":{"type":["string","null"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]}},"required":["id","name","color"],"additionalProperties":false}},"redirectType":{"type":"number"},"passQuery":{"type":"boolean"},"openInApp":{"type":"boolean"},"openInBrowser":{"type":"boolean"},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"url":{"type":"string"}},"required":["country","url"],"additionalProperties":false}},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"url":{"type":"string"}},"required":["device","url"],"additionalProperties":false}},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"expiredUrl":{"type":["string","null"]},"abTest":{"anyOf":[{"type":"object","properties":{"variants":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"weight":{"type":"number"}},"required":["url","weight"],"additionalProperties":false}},"endsAt":{"type":["string","null"]}},"required":["variants","endsAt"],"additionalProperties":false},{"type":"null"}]},"hasPassword":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","domain","slug","shortLink","url","title","description","ogImageUrl","folderId","tags","redirectType","passQuery","openInApp","openInBrowser","utm","geoRules","deviceRules","expiresAt","expiredUrl","abTest","hasPassword","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}}},"operationId":"getV1Links"},"post":{"summary":"Create a link","tags":["Links"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Where the link sends people"},"slug":{"description":"The part after the domain (letters, digits, - and _; case-sensitive). Random 7 characters when left out","type":"string"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"ogImageUrl":{"description":"Image for social previews","anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},"folderId":{"description":"A folder id from GET /v1/folders; null = no folder","type":["string","null"]},"tagIds":{"description":"Tag ids from GET /v1/tags; replaces the link’s tags","type":"array","items":{"type":"string"}},"redirectType":{"default":302,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status; 302 by default"},"passQuery":{"default":false,"type":"boolean","description":"Forward the short link’s query string to the destination"},"openInApp":{"default":false,"type":"boolean","description":"On phones, open the destination in its app (Basic and up)"},"openInBrowser":{"default":false,"type":"boolean","description":"Android in-app browsers hand the destination to the default browser (Basic and up)"},"utm":{"description":"UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well","type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"},"ref":{"type":"string"}}},"geoRules":{"default":[],"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string","format":"uri"}},"required":["country","url"]},"description":"A different destination per country (Basic and up)"},"deviceRules":{"default":[],"type":"array","items":{"type":"object","properties":{"device":{"type":"string","enum":["ios","android","desktop"]},"url":{"type":"string","format":"uri"}},"required":["device","url"]},"description":"A different destination per device (Basic and up)"},"expiresAt":{"description":"ISO date-time after which the link stops redirecting (Basic and up)","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiredUrl":{"description":"Where an expired link sends people","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"abTest":{"description":"A/B test on the destination; variants[0] is the link’s own url (Pro)","anyOf":[{"type":"object","properties":{"variants":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"weight":{"type":"integer","minimum":10,"maximum":100}},"required":["url","weight"]}},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["variants","endsAt"]},{"type":"null"}]},"password":{"description":"Visitors must enter it first (Basic and up). Only a hash is stored; null removes it","anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"domain":{"description":"Host of one of your domains; the workspace subdomain when left out","type":"string"}},"required":["url"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Where the link sends people"},"slug":{"description":"The part after the domain (letters, digits, - and _; case-sensitive). Random 7 characters when left out","type":"string"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"ogImageUrl":{"description":"Image for social previews","anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},"folderId":{"description":"A folder id from GET /v1/folders; null = no folder","type":["string","null"]},"tagIds":{"description":"Tag ids from GET /v1/tags; replaces the link’s tags","type":"array","items":{"type":"string"}},"redirectType":{"default":302,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status; 302 by default"},"passQuery":{"default":false,"type":"boolean","description":"Forward the short link’s query string to the destination"},"openInApp":{"default":false,"type":"boolean","description":"On phones, open the destination in its app (Basic and up)"},"openInBrowser":{"default":false,"type":"boolean","description":"Android in-app browsers hand the destination to the default browser (Basic and up)"},"utm":{"description":"UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well","type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"},"ref":{"type":"string"}}},"geoRules":{"default":[],"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string","format":"uri"}},"required":["country","url"]},"description":"A different destination per country (Basic and up)"},"deviceRules":{"default":[],"type":"array","items":{"type":"object","properties":{"device":{"type":"string","enum":["ios","android","desktop"]},"url":{"type":"string","format":"uri"}},"required":["device","url"]},"description":"A different destination per device (Basic and up)"},"expiresAt":{"description":"ISO date-time after which the link stops redirecting (Basic and up)","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiredUrl":{"description":"Where an expired link sends people","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"abTest":{"description":"A/B test on the destination; variants[0] is the link’s own url (Pro)","anyOf":[{"type":"object","properties":{"variants":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"weight":{"type":"integer","minimum":10,"maximum":100}},"required":["url","weight"]}},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["variants","endsAt"]},{"type":"null"}]},"password":{"description":"Visitors must enter it first (Basic and up). Only a hash is stored; null removes it","anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"domain":{"description":"Host of one of your domains; the workspace subdomain when left out","type":"string"}},"required":["url"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Where the link sends people"},"slug":{"description":"The part after the domain (letters, digits, - and _; case-sensitive). Random 7 characters when left out","type":"string"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"ogImageUrl":{"description":"Image for social previews","anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},"folderId":{"description":"A folder id from GET /v1/folders; null = no folder","type":["string","null"]},"tagIds":{"description":"Tag ids from GET /v1/tags; replaces the link’s tags","type":"array","items":{"type":"string"}},"redirectType":{"default":302,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status; 302 by default"},"passQuery":{"default":false,"type":"boolean","description":"Forward the short link’s query string to the destination"},"openInApp":{"default":false,"type":"boolean","description":"On phones, open the destination in its app (Basic and up)"},"openInBrowser":{"default":false,"type":"boolean","description":"Android in-app browsers hand the destination to the default browser (Basic and up)"},"utm":{"description":"UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well","type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"},"ref":{"type":"string"}}},"geoRules":{"default":[],"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string","format":"uri"}},"required":["country","url"]},"description":"A different destination per country (Basic and up)"},"deviceRules":{"default":[],"type":"array","items":{"type":"object","properties":{"device":{"type":"string","enum":["ios","android","desktop"]},"url":{"type":"string","format":"uri"}},"required":["device","url"]},"description":"A different destination per device (Basic and up)"},"expiresAt":{"description":"ISO date-time after which the link stops redirecting (Basic and up)","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiredUrl":{"description":"Where an expired link sends people","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"abTest":{"description":"A/B test on the destination; variants[0] is the link’s own url (Pro)","anyOf":[{"type":"object","properties":{"variants":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"weight":{"type":"integer","minimum":10,"maximum":100}},"required":["url","weight"]}},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["variants","endsAt"]},{"type":"null"}]},"password":{"description":"Visitors must enter it first (Basic and up). Only a hash is stored; null removes it","anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"domain":{"description":"Host of one of your domains; the workspace subdomain when left out","type":"string"}},"required":["url"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"slug":{"type":"string"},"shortLink":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"ogImageUrl":{"type":["string","null"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]}},"required":["id","name","color"],"additionalProperties":false}},"redirectType":{"type":"number"},"passQuery":{"type":"boolean"},"openInApp":{"type":"boolean"},"openInBrowser":{"type":"boolean"},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"url":{"type":"string"}},"required":["country","url"],"additionalProperties":false}},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"url":{"type":"string"}},"required":["device","url"],"additionalProperties":false}},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"expiredUrl":{"type":["string","null"]},"abTest":{"anyOf":[{"type":"object","properties":{"variants":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"weight":{"type":"number"}},"required":["url","weight"],"additionalProperties":false}},"endsAt":{"type":["string","null"]}},"required":["variants","endsAt"],"additionalProperties":false},{"type":"null"}]},"hasPassword":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","domain","slug","shortLink","url","title","description","ogImageUrl","folderId","tags","redirectType","passQuery","openInApp","openInBrowser","utm","geoRules","deviceRules","expiresAt","expiredUrl","abTest","hasPassword","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"postV1Links"}},"/v1/links/info":{"get":{"summary":"Find a link by its domain and slug","tags":["Links"],"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"The short link’s host, e.g. acme.inbo.to"}},{"name":"slug","in":"query","required":true,"schema":{"type":"string","description":"The part after the domain"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"slug":{"type":"string"},"shortLink":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"ogImageUrl":{"type":["string","null"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]}},"required":["id","name","color"],"additionalProperties":false}},"redirectType":{"type":"number"},"passQuery":{"type":"boolean"},"openInApp":{"type":"boolean"},"openInBrowser":{"type":"boolean"},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"url":{"type":"string"}},"required":["country","url"],"additionalProperties":false}},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"url":{"type":"string"}},"required":["device","url"],"additionalProperties":false}},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"expiredUrl":{"type":["string","null"]},"abTest":{"anyOf":[{"type":"object","properties":{"variants":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"weight":{"type":"number"}},"required":["url","weight"],"additionalProperties":false}},"endsAt":{"type":["string","null"]}},"required":["variants","endsAt"],"additionalProperties":false},{"type":"null"}]},"hasPassword":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","domain","slug","shortLink","url","title","description","ogImageUrl","folderId","tags","redirectType","passQuery","openInApp","openInBrowser","utm","geoRules","deviceRules","expiresAt","expiredUrl","abTest","hasPassword","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"getV1LinksInfo"}},"/v1/links/{id}":{"get":{"summary":"Get a link","tags":["Links"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"slug":{"type":"string"},"shortLink":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"ogImageUrl":{"type":["string","null"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]}},"required":["id","name","color"],"additionalProperties":false}},"redirectType":{"type":"number"},"passQuery":{"type":"boolean"},"openInApp":{"type":"boolean"},"openInBrowser":{"type":"boolean"},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"url":{"type":"string"}},"required":["country","url"],"additionalProperties":false}},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"url":{"type":"string"}},"required":["device","url"],"additionalProperties":false}},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"expiredUrl":{"type":["string","null"]},"abTest":{"anyOf":[{"type":"object","properties":{"variants":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"weight":{"type":"number"}},"required":["url","weight"],"additionalProperties":false}},"endsAt":{"type":["string","null"]}},"required":["variants","endsAt"],"additionalProperties":false},{"type":"null"}]},"hasPassword":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","domain","slug","shortLink","url","title","description","ogImageUrl","folderId","tags","redirectType","passQuery","openInApp","openInBrowser","utm","geoRules","deviceRules","expiresAt","expiredUrl","abTest","hasPassword","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"getV1LinksById"},"patch":{"summary":"Update a link","description":"Only the fields sent change. The domain is fixed at creation.","tags":["Links"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Where the link sends people"},"slug":{"description":"The part after the domain (letters, digits, - and _; case-sensitive). Random 7 characters when left out","type":"string"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"ogImageUrl":{"description":"Image for social previews","anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},"folderId":{"description":"A folder id from GET /v1/folders; null = no folder","type":["string","null"]},"tagIds":{"description":"Tag ids from GET /v1/tags; replaces the link’s tags","type":"array","items":{"type":"string"}},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status; 302 by default"},"passQuery":{"type":"boolean","description":"Forward the short link’s query string to the destination"},"openInApp":{"type":"boolean","description":"On phones, open the destination in its app (Basic and up)"},"openInBrowser":{"type":"boolean","description":"Android in-app browsers hand the destination to the default browser (Basic and up)"},"utm":{"description":"UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well","type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"},"ref":{"type":"string"}}},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string","format":"uri"}},"required":["country","url"]},"description":"A different destination per country (Basic and up)"},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string","enum":["ios","android","desktop"]},"url":{"type":"string","format":"uri"}},"required":["device","url"]},"description":"A different destination per device (Basic and up)"},"expiresAt":{"description":"ISO date-time after which the link stops redirecting (Basic and up)","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiredUrl":{"description":"Where an expired link sends people","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"abTest":{"description":"A/B test on the destination; variants[0] is the link’s own url (Pro)","anyOf":[{"type":"object","properties":{"variants":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"weight":{"type":"integer","minimum":10,"maximum":100}},"required":["url","weight"]}},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["variants","endsAt"]},{"type":"null"}]},"password":{"description":"Visitors must enter it first (Basic and up). Only a hash is stored; null removes it","anyOf":[{"type":"string","maxLength":128},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Where the link sends people"},"slug":{"description":"The part after the domain (letters, digits, - and _; case-sensitive). Random 7 characters when left out","type":"string"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"ogImageUrl":{"description":"Image for social previews","anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},"folderId":{"description":"A folder id from GET /v1/folders; null = no folder","type":["string","null"]},"tagIds":{"description":"Tag ids from GET /v1/tags; replaces the link’s tags","type":"array","items":{"type":"string"}},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status; 302 by default"},"passQuery":{"type":"boolean","description":"Forward the short link’s query string to the destination"},"openInApp":{"type":"boolean","description":"On phones, open the destination in its app (Basic and up)"},"openInBrowser":{"type":"boolean","description":"Android in-app browsers hand the destination to the default browser (Basic and up)"},"utm":{"description":"UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well","type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"},"ref":{"type":"string"}}},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string","format":"uri"}},"required":["country","url"]},"description":"A different destination per country (Basic and up)"},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string","enum":["ios","android","desktop"]},"url":{"type":"string","format":"uri"}},"required":["device","url"]},"description":"A different destination per device (Basic and up)"},"expiresAt":{"description":"ISO date-time after which the link stops redirecting (Basic and up)","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiredUrl":{"description":"Where an expired link sends people","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"abTest":{"description":"A/B test on the destination; variants[0] is the link’s own url (Pro)","anyOf":[{"type":"object","properties":{"variants":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"weight":{"type":"integer","minimum":10,"maximum":100}},"required":["url","weight"]}},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["variants","endsAt"]},{"type":"null"}]},"password":{"description":"Visitors must enter it first (Basic and up). Only a hash is stored; null removes it","anyOf":[{"type":"string","maxLength":128},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Where the link sends people"},"slug":{"description":"The part after the domain (letters, digits, - and _; case-sensitive). Random 7 characters when left out","type":"string"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500},"ogImageUrl":{"description":"Image for social previews","anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},"folderId":{"description":"A folder id from GET /v1/folders; null = no folder","type":["string","null"]},"tagIds":{"description":"Tag ids from GET /v1/tags; replaces the link’s tags","type":"array","items":{"type":"string"}},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status; 302 by default"},"passQuery":{"type":"boolean","description":"Forward the short link’s query string to the destination"},"openInApp":{"type":"boolean","description":"On phones, open the destination in its app (Basic and up)"},"openInBrowser":{"type":"boolean","description":"Android in-app browsers hand the destination to the default browser (Basic and up)"},"utm":{"description":"UTM parameters to set in the destination url; an empty value removes one. They live in the url itself, so a url with utm_* in it works just as well","type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"},"ref":{"type":"string"}}},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"url":{"type":"string","format":"uri"}},"required":["country","url"]},"description":"A different destination per country (Basic and up)"},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string","enum":["ios","android","desktop"]},"url":{"type":"string","format":"uri"}},"required":["device","url"]},"description":"A different destination per device (Basic and up)"},"expiresAt":{"description":"ISO date-time after which the link stops redirecting (Basic and up)","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"expiredUrl":{"description":"Where an expired link sends people","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"abTest":{"description":"A/B test on the destination; variants[0] is the link’s own url (Pro)","anyOf":[{"type":"object","properties":{"variants":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"weight":{"type":"integer","minimum":10,"maximum":100}},"required":["url","weight"]}},"endsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["variants","endsAt"]},{"type":"null"}]},"password":{"description":"Visitors must enter it first (Basic and up). Only a hash is stored; null removes it","anyOf":[{"type":"string","maxLength":128},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"slug":{"type":"string"},"shortLink":{"type":"string"},"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"ogImageUrl":{"type":["string","null"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]}},"required":["id","name","color"],"additionalProperties":false}},"redirectType":{"type":"number"},"passQuery":{"type":"boolean"},"openInApp":{"type":"boolean"},"openInBrowser":{"type":"boolean"},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"geoRules":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"url":{"type":"string"}},"required":["country","url"],"additionalProperties":false}},"deviceRules":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"url":{"type":"string"}},"required":["device","url"],"additionalProperties":false}},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"expiredUrl":{"type":["string","null"]},"abTest":{"anyOf":[{"type":"object","properties":{"variants":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"weight":{"type":"number"}},"required":["url","weight"],"additionalProperties":false}},"endsAt":{"type":["string","null"]}},"required":["variants","endsAt"],"additionalProperties":false},{"type":"null"}]},"hasPassword":{"type":"boolean"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","domain","slug","shortLink","url","title","description","ogImageUrl","folderId","tags","redirectType","passQuery","openInApp","openInBrowser","utm","geoRules","deviceRules","expiresAt","expiredUrl","abTest","hasPassword","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"patchV1LinksById"},"delete":{"summary":"Delete a link","tags":["Links"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}}},"operationId":"deleteV1LinksById"}},"/v1/tags":{"get":{"summary":"List tags","tags":["Tags"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","name","color","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"operationId":"getV1Tags"},"post":{"summary":"Create a tag","tags":["Tags"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"type":"string","enum":["blue","teal","purple","pink"]}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"type":"string","enum":["blue","teal","purple","pink"]}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"type":"string","enum":["blue","teal","purple","pink"]}},"required":["name"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","name","color","createdAt"],"additionalProperties":false}}}}},"operationId":"postV1Tags"}},"/v1/tags/{id}":{"patch":{"summary":"Rename or recolor a tag","tags":["Tags"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"anyOf":[{"type":"string","enum":["blue","teal","purple","pink"]},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"anyOf":[{"type":"string","enum":["blue","teal","purple","pink"]},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"anyOf":[{"type":"string","enum":["blue","teal","purple","pink"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","name","color","createdAt"],"additionalProperties":false}}}}},"operationId":"patchV1TagsById"},"delete":{"summary":"Delete a tag","description":"Its links stay, untagged.","tags":["Tags"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}}},"operationId":"deleteV1TagsById"}},"/v1/folders":{"get":{"summary":"List folders","tags":["Folders"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","name","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"operationId":"getV1Folders"},"post":{"summary":"Create a folder","tags":["Folders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"required":["name"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","name","createdAt"],"additionalProperties":false}}}}},"operationId":"postV1Folders"}},"/v1/folders/{id}":{"patch":{"summary":"Rename a folder","tags":["Folders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"required":["name"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","name","createdAt"],"additionalProperties":false}}}}},"operationId":"patchV1FoldersById"},"delete":{"summary":"Delete a folder","description":"Its links stay, outside any folder.","tags":["Folders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}}},"operationId":"deleteV1FoldersById"}},"/v1/domains":{"get":{"summary":"List domains","tags":["Domains"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"host":{"type":"string"},"kind":{"type":"string","enum":["subdomain","custom"],"description":"subdomain = the workspace’s own on the short-link domain"},"status":{"type":"string","enum":["pending","verified","failed"]},"primary":{"type":"boolean","description":"New links go here when they name no domain"},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"rootRedirectUrl":{"type":["string","null"]},"notFoundUrl":{"type":["string","null"]},"expiredUrl":{"type":["string","null"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false},"description":"What to publish at your DNS provider"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","host","kind","status","primary","verifiedAt","rootRedirectUrl","notFoundUrl","expiredUrl","dnsRecords","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}}},"operationId":"getV1Domains"},"post":{"summary":"Add a custom domain","description":"Publish its `dnsRecords` at your DNS provider; it starts working once verified. Admins only.","tags":["Domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"host":{"description":"A hostname you control, e.g. go.yourbrand.com","type":"string"}},"required":["host"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"host":{"description":"A hostname you control, e.g. go.yourbrand.com","type":"string"}},"required":["host"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"host":{"description":"A hostname you control, e.g. go.yourbrand.com","type":"string"}},"required":["host"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"host":{"type":"string"},"kind":{"type":"string","enum":["subdomain","custom"],"description":"subdomain = the workspace’s own on the short-link domain"},"status":{"type":"string","enum":["pending","verified","failed"]},"primary":{"type":"boolean","description":"New links go here when they name no domain"},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"rootRedirectUrl":{"type":["string","null"]},"notFoundUrl":{"type":["string","null"]},"expiredUrl":{"type":["string","null"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false},"description":"What to publish at your DNS provider"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","host","kind","status","primary","verifiedAt","rootRedirectUrl","notFoundUrl","expiredUrl","dnsRecords","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"postV1Domains"}},"/v1/domains/{id}":{"get":{"summary":"Get a domain","tags":["Domains"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"host":{"type":"string"},"kind":{"type":"string","enum":["subdomain","custom"],"description":"subdomain = the workspace’s own on the short-link domain"},"status":{"type":"string","enum":["pending","verified","failed"]},"primary":{"type":"boolean","description":"New links go here when they name no domain"},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"rootRedirectUrl":{"type":["string","null"]},"notFoundUrl":{"type":["string","null"]},"expiredUrl":{"type":["string","null"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false},"description":"What to publish at your DNS provider"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","host","kind","status","primary","verifiedAt","rootRedirectUrl","notFoundUrl","expiredUrl","dnsRecords","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"getV1DomainsById"},"patch":{"summary":"Update where a domain’s root, unknown slugs and expired links go","description":"Only the fields sent change; null clears one. Admins only.","tags":["Domains"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rootRedirectUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"notFoundUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"expiredUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rootRedirectUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"notFoundUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"expiredUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rootRedirectUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"notFoundUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"expiredUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"host":{"type":"string"},"kind":{"type":"string","enum":["subdomain","custom"],"description":"subdomain = the workspace’s own on the short-link domain"},"status":{"type":"string","enum":["pending","verified","failed"]},"primary":{"type":"boolean","description":"New links go here when they name no domain"},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"rootRedirectUrl":{"type":["string","null"]},"notFoundUrl":{"type":["string","null"]},"expiredUrl":{"type":["string","null"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false},"description":"What to publish at your DNS provider"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","host","kind","status","primary","verifiedAt","rootRedirectUrl","notFoundUrl","expiredUrl","dnsRecords","createdAt","updatedAt"],"additionalProperties":false}}}}},"operationId":"patchV1DomainsById"},"delete":{"summary":"Remove a custom domain","description":"Deletes the domain AND every link on it. The workspace subdomain cannot be removed. Admins only.","tags":["Domains"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}}},"operationId":"deleteV1DomainsById"}},"/v1/domains/{id}/verify":{"post":{"summary":"Check a custom domain’s DNS now","description":"Domains are also re-checked on their own within a minute.","tags":["Domains"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string"},"host":{"type":"string"},"kind":{"type":"string","enum":["subdomain","custom"],"description":"subdomain = the workspace’s own on the short-link domain"},"status":{"type":"string","enum":["pending","verified","failed"]},"primary":{"type":"boolean","description":"New links go here when they name no domain"},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO 8601 date-time"},{"type":"null"}]},"rootRedirectUrl":{"type":["string","null"]},"notFoundUrl":{"type":["string","null"]},"expiredUrl":{"type":["string","null"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false},"description":"What to publish at your DNS provider"},"createdAt":{"type":"string","description":"ISO 8601 date-time"},"updatedAt":{"type":"string","description":"ISO 8601 date-time"}},"required":["id","host","kind","status","primary","verifiedAt","rootRedirectUrl","notFoundUrl","expiredUrl","dnsRecords","createdAt","updatedAt"],"additionalProperties":false},"verified":{"type":"boolean"},"reason":{"type":"string"}},"required":["domain","verified","reason"],"additionalProperties":false}}}}},"operationId":"postV1DomainsByIdVerify"}},"/v1/analytics":{"get":{"summary":"Retrieve click analytics","description":"Clicks on one link (`linkId`, or `domain` + `slug`), one domain (`domain`) or the whole workspace over the last `interval`, counted as `groupBy` says. A click is a person's or an AI agent's; other bots never count. The window is cut to the plan's history. 20 requests per minute per workspace, counted in the general allowance too.","tags":["Analytics"],"parameters":[{"name":"groupBy","in":"query","required":false,"schema":{"default":"count","description":"count: one total · timeseries: per hour (24h) or day, UTC · everything else: a breakdown, most clicks first","type":"string","enum":["count","timeseries","countries","regions","cities","devices","browsers","os","referers","top_links","utm_sources","utm_mediums","utm_campaigns","utm_terms","utm_contents"]}},{"name":"interval","in":"query","required":false,"schema":{"default":"24h","description":"The window, ending now; all = as far back as the plan’s history goes","type":"string","enum":["24h","7d","30d","90d","1y","all"]}},{"name":"linkId","in":"query","required":false,"schema":{"description":"Only this link","type":"string"}},{"name":"domain","in":"query","required":false,"schema":{"description":"Only links on this host","type":"string"}},{"name":"slug","in":"query","required":false,"schema":{"description":"Only the link with this slug, on `domain` (the workspace subdomain when left out)","type":"string"}},{"name":"folderId","in":"query","required":false,"schema":{"description":"Only links in this folder","type":"string"}},{"name":"tagIds","in":"query","required":false,"schema":{"description":"Only links with these tag ids; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"country","in":"query","required":false,"schema":{"description":"ISO 3166-1 alpha-2 country codes, e.g. DE; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"device","in":"query","required":false,"schema":{"description":"desktop, mobile, tablet, tv, console, other; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"browser","in":"query","required":false,"schema":{"description":"Browser names, e.g. Chrome; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"os","in":"query","required":false,"schema":{"description":"Operating systems, e.g. iOS; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"referer","in":"query","required":false,"schema":{"description":"Referring hosts, e.g. google.com; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"utmSource","in":"query","required":false,"schema":{"description":"utm_source values; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"utmMedium","in":"query","required":false,"schema":{"description":"utm_medium values; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"utmCampaign","in":"query","required":false,"schema":{"description":"utm_campaign values; comma-separated: any of them","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"audience","in":"query","required":false,"schema":{"description":"Only people’s clicks, or only AI agents’; both when left out","type":"string","enum":["people","agents"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"description":"Breakdown rows to return","type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"start":{"type":"string","description":"Where the window starts: never before the plan’s history"},"end":{"type":"string","description":"Now"},"data":{"anyOf":[{"type":"object","properties":{"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People and AI agents; other bots never count"},"people":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"agents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"AI agents fetching the link for someone (ChatGPT, Claude, …)"}},"required":["clicks","people","agents"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"start":{"description":"timeseries: where the bucket starts","type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People and AI agents; other bots never count"},"people":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"agents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"AI agents fetching the link for someone (ChatGPT, Claude, …)"},"country":{"type":["string","null"]},"region":{"description":"ISO 3166-2, e.g. DE-HH","type":["string","null"]},"city":{"type":["string","null"]},"device":{"type":["string","null"]},"browser":{"type":["string","null"]},"os":{"type":["string","null"]},"referer":{"description":"(direct) for none","type":["string","null"]},"id":{"description":"top_links: the link id","type":["string","null"]},"domain":{"type":["string","null"]},"slug":{"type":["string","null"]},"shortLink":{"type":["string","null"]},"utmSource":{"type":["string","null"]},"utmMedium":{"type":["string","null"]},"utmCampaign":{"type":["string","null"]},"utmTerm":{"type":["string","null"]},"utmContent":{"type":["string","null"]}},"required":["clicks"],"additionalProperties":false}}],"description":"count: the counts; otherwise rows"}},"required":["start","end","data"],"additionalProperties":false}}}}},"operationId":"getV1Analytics"}}}}