{"openapi":"3.1.0","info":{"title":"Shortifies API","version":"1.0.0","description":"Create and manage short links, and read their analytics, from your own code.\n\nAuthenticate with a secret API key from **Developers** in the dashboard: `Authorization: Bearer sfy_sk_…`. Keys belong to one workspace and carry scopes.\n\nErrors have the shape `{ \"error\": { \"code\", \"message\", \"details\"? } }`; branch on `code`.\n\nEach key may make a limited number of requests per minute; responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` headers.\n\nWrites marked idempotent accept an `Idempotency-Key` header: retrying with the same key returns the first response instead of doing the work twice (kept 24 hours)."},"servers":[{"url":"https://dashboard.shortifies.com/api"}],"security":[{"apiKey":[]}],"tags":[{"name":"Links"},{"name":"Bulk","description":"Bulk changes, CSV import and export. All run in the background as jobs."},{"name":"Organize","description":"Tags and campaigns."},{"name":"Domains"},{"name":"Analytics"},{"name":"Conversions"},{"name":"Meta"}],"paths":{"/v1/api-key":{"get":{"operationId":"getApiKey","tags":["Meta"],"summary":"Inspect the API key","description":"The workspace and scopes of the key making the request.\n\nAny valid API key.","x-required-scope":null,"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInfo"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/links":{"get":{"operationId":"listLinks","tags":["Links"],"summary":"List links","description":"Newest first. Filter by search text, tag or campaign; page with `cursor`.\n\nScope: `links:read` (Read links).","x-required-scope":"links:read","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"tagId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPage"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createLink","tags":["Links"],"summary":"Create a link","description":"Omit `domainId` to use the workspace’s platform domain, and `alias` for a random back-half.\n\nScope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destinationUrl":{"type":"string"},"domainId":{"type":"string","format":"uuid"},"alias":{"type":"string"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"enabled":{"type":"boolean"},"tagIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"utm":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"medium":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"campaign":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"term":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"content":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiredRedirectUrl":{"type":["string","null"]},"password":{"anyOf":[{"type":"string","minLength":6,"maxLength":128},{"type":"null"}]},"iosUrl":{"type":["string","null"]},"androidUrl":{"type":["string","null"]},"routing":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"rules":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"name":{"type":"string","maxLength":80},"conditions":{"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","const":"country"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"device"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["desktop","mobile","tablet","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"os"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["ios","android","windows","macos","linux","chromeos","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"browser"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"language"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2,3}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"time"},"op":{"type":"string","const":"between"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"timezone":{"type":"string","maxLength":64}},"required":["field","op","start","end","timezone"]},{"type":"object","properties":{"field":{"type":"string","const":"date"},"op":{"type":"string","const":"between"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["field","op"]}]}},"variants":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"url":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","url","weight"]}}},"required":["id","conditions","variants"]}}},"required":["version","rules"]},{"type":"null"}]},"trackConversions":{"type":"boolean"},"pixelIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["destinationUrl"]}}}},"responses":{"201":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, e.g. `alias_taken`, or `idempotency_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/links/{linkId}":{"get":{"operationId":"getLink","tags":["Links"],"summary":"Get a link","description":"Scope: `links:read` (Read links).","x-required-scope":"links:read","parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateLink","tags":["Links"],"summary":"Update a link","description":"Send only the fields to change. `null` clears optional fields.\n\nScope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destinationUrl":{"type":"string"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"enabled":{"type":"boolean"},"tagIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"utm":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"medium":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"campaign":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"term":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"content":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiredRedirectUrl":{"type":["string","null"]},"password":{"anyOf":[{"type":"string","minLength":6,"maxLength":128},{"type":"null"}]},"iosUrl":{"type":["string","null"]},"androidUrl":{"type":["string","null"]},"routing":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"rules":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"name":{"type":"string","maxLength":80},"conditions":{"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","const":"country"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"device"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["desktop","mobile","tablet","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"os"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["ios","android","windows","macos","linux","chromeos","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"browser"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"language"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2,3}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"time"},"op":{"type":"string","const":"between"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"timezone":{"type":"string","maxLength":64}},"required":["field","op","start","end","timezone"]},{"type":"object","properties":{"field":{"type":"string","const":"date"},"op":{"type":"string","const":"between"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["field","op"]}]}},"variants":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"url":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","url","weight"]}}},"required":["id","conditions","variants"]}}},"required":["version","rules"]},{"type":"null"}]},"trackConversions":{"type":"boolean"},"pixelIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteLink","tags":["Links"],"summary":"Delete a link","description":"The short link stops redirecting at once. Its back-half stays reserved and is never reused.\n\nScope: `links:delete` (Delete links).","x-required-scope":"links:delete","parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Done."},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/qr-codes/{linkId}":{"get":{"operationId":"getQrCode","tags":["Links"],"summary":"Get a link’s QR code","description":"Scope: `links:read` (Read links).","x-required-scope":"links:read","parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":false,"schema":{"default":"svg","type":"string","enum":["png","svg"]}},{"name":"size","in":"query","required":false,"schema":{"default":512,"type":"integer","minimum":128,"maximum":2048}},{"name":"download","in":"query","required":false,"schema":{"default":"0","type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"The QR code.","content":{"image/svg+xml":{"schema":{"type":"string"}},"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/links/bulk":{"post":{"operationId":"bulkLinks","tags":["Bulk"],"summary":"Create, update or delete links in bulk","description":"Up to 1,000 items, processed in the background. Poll the returned job; per-item results are under `/v1/jobs/{jobId}/items`. Deleting needs `links:delete` as well.\n\nScope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"create"},"items":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"destinationUrl":{"type":"string"},"domainId":{"type":"string","format":"uuid"},"alias":{"type":"string"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"enabled":{"type":"boolean"},"tagIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"utm":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"medium":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"campaign":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"term":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"content":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiredRedirectUrl":{"type":["string","null"]},"password":{"anyOf":[{"type":"string","minLength":6,"maxLength":128},{"type":"null"}]},"iosUrl":{"type":["string","null"]},"androidUrl":{"type":["string","null"]},"routing":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"rules":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"name":{"type":"string","maxLength":80},"conditions":{"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","const":"country"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"device"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["desktop","mobile","tablet","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"os"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["ios","android","windows","macos","linux","chromeos","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"browser"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"language"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2,3}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"time"},"op":{"type":"string","const":"between"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"timezone":{"type":"string","maxLength":64}},"required":["field","op","start","end","timezone"]},{"type":"object","properties":{"field":{"type":"string","const":"date"},"op":{"type":"string","const":"between"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["field","op"]}]}},"variants":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"url":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","url","weight"]}}},"required":["id","conditions","variants"]}}},"required":["version","rules"]},{"type":"null"}]},"trackConversions":{"type":"boolean"},"pixelIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["destinationUrl"]}}},"required":["action","items"]},{"type":"object","properties":{"action":{"type":"string","const":"update"},"items":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"changes":{"type":"object","properties":{"destinationUrl":{"type":"string"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"enabled":{"type":"boolean"},"tagIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"utm":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"medium":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"campaign":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"term":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"content":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiredRedirectUrl":{"type":["string","null"]},"password":{"anyOf":[{"type":"string","minLength":6,"maxLength":128},{"type":"null"}]},"iosUrl":{"type":["string","null"]},"androidUrl":{"type":["string","null"]},"routing":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"rules":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"name":{"type":"string","maxLength":80},"conditions":{"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","const":"country"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"device"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["desktop","mobile","tablet","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"os"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["ios","android","windows","macos","linux","chromeos","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"browser"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"language"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2,3}$"}}},"required":["field","op","values"]},{"type":"object","properties":{"field":{"type":"string","const":"time"},"op":{"type":"string","const":"between"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"timezone":{"type":"string","maxLength":64}},"required":["field","op","start","end","timezone"]},{"type":"object","properties":{"field":{"type":"string","const":"date"},"op":{"type":"string","const":"between"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["field","op"]}]}},"variants":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"url":{"type":"string"},"weight":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","url","weight"]}}},"required":["id","conditions","variants"]}}},"required":["version","rules"]},{"type":"null"}]},"trackConversions":{"type":"boolean"},"pixelIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"addTagIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}},"removeTagIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["id","changes"]}}},"required":["action","items"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["action","ids"]}]}}}},"responses":{"202":{"description":"Accepted: processing in the background.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, e.g. `alias_taken`, or `idempotency_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/links/import":{"post":{"operationId":"importLinks","tags":["Bulk"],"summary":"Import links from CSV","description":"Send the file as the body with `Content-Type: text/csv`. The first row names the columns: `destination_url` (also `url`, `long_url`), `back_half` (`alias`, `slug`), `domain`, `title`, `notes`, `tags` (separated by `;`), `campaign`, `utm_source` … `utm_content`, `expires_at`, `enabled`. Missing tags and campaigns are created.\n\nScope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"name":"domainId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"filename","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"text/csv":{"schema":{"type":"string"}}}},"responses":{"202":{"description":"Accepted: processing in the background.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, e.g. `alias_taken`, or `idempotency_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/links/export":{"post":{"operationId":"exportLinks","tags":["Bulk"],"summary":"Export links to CSV","description":"Builds a CSV in the background; the finished job has a `downloadUrl`. The file re-imports as is.\n\nScope: `links:read` (Read links).","x-required-scope":"links:read","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"tagId":{"type":"string","format":"uuid"},"campaignId":{"type":"string","format":"uuid"},"ids":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"202":{"description":"Accepted: processing in the background.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{jobId}":{"get":{"operationId":"getJob","tags":["Bulk"],"summary":"Get a job","description":"Scope: `links:read` (Read links).","x-required-scope":"links:read","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jobs/{jobId}/items":{"get":{"operationId":"listJobItems","tags":["Bulk"],"summary":"List a job’s item results","description":"In item order. Page with `after` (the last index you saw).\n\nScope: `links:read` (Read links).","x-required-scope":"links:read","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["ok","error"]}},{"name":"after","in":"query","required":false,"schema":{"default":-1,"type":"integer","minimum":-1}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobItemPage"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tags":{"get":{"operationId":"listTags","tags":["Organize"],"summary":"List tags","description":"Scope: `links:read` (Read links).","x-required-scope":"links:read","responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagPage"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTag","tags":["Organize"],"summary":"Create a tag","description":"Scope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32},"color":{"default":"gray","type":"string","enum":["gray","blue","green","amber","red","purple","pink","teal"]}},"required":["name"]}}}},"responses":{"201":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, e.g. `alias_taken`, or `idempotency_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns":{"get":{"operationId":"listCampaigns","tags":["Organize"],"summary":"List campaigns","description":"Scope: `links:read` (Read links).","x-required-scope":"links:read","responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPage"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCampaign","tags":["Organize"],"summary":"Create a campaign","description":"Scope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"startsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"201":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, e.g. `alias_taken`, or `idempotency_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns/{campaignId}":{"get":{"operationId":"getCampaign","tags":["Organize"],"summary":"Get a campaign","description":"Scope: `links:read` (Read links).","x-required-scope":"links:read","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateCampaign","tags":["Organize"],"summary":"Update or archive a campaign","description":"Scope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"startsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains":{"get":{"operationId":"listDomains","tags":["Domains"],"summary":"List domains","description":"The platform subdomain and any custom domains, with their setup status.\n\nScope: `domains:read` (Read domains).","x-required-scope":"domains:read","responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainPage"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics":{"get":{"operationId":"getAnalytics","tags":["Analytics"],"summary":"Click and conversion report","description":"Totals, a time series and breakdowns for a time range, optionally for one link, domain or campaign, and narrowed to any breakdown value (country, region, city, device, OS, browser, referrer, source or UTM value). Add `compare=true` for the previous period of the same length.\n\nScope: `analytics:read` (Read analytics).","x-required-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"interval","in":"query","required":false,"schema":{"default":"day","type":"string","enum":["hour","day"]}},{"name":"timezone","in":"query","required":false,"schema":{"default":"UTC","type":"string","maxLength":64}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"domainId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"compare","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z]{0,2}$"}},{"name":"region","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"city","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"device","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"os","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"browser","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string","maxLength":253}},{"name":"source","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"utmSource","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"utmMedium","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"utmCampaign","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"filters","in":"query","required":false,"schema":{"type":"string","maxLength":20000,"example":"[{\"dim\":\"country\",\"op\":\"is\",\"values\":[\"US\",\"GB\"]},{\"dim\":\"device\",\"op\":\"is_not\",\"values\":[\"desktop\"]}]"},"description":"JSON array of conditions, ANDed. Each is `{\"dim\", \"op\": \"is\" | \"is_not\", \"values\": [...]}` and matches any (or, with is_not, none) of its values. Dimensions: link, domain, campaign, tag (ids), continent (AF, AS, EU, NA, OC, SA), country (ISO codes), region, city, device, os, browser, referrer, source (link or qr), utm_source, utm_medium, utm_campaign, weekday (1 = Monday … 7), hour (0–23, in `timezone`). Region, city, os, browser, UTM, weekday and hour need advanced analytics."}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analytics"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/live":{"get":{"operationId":"getLiveClicks","tags":["Analytics"],"summary":"Live clicks","description":"Counted clicks from the last `minutes` (5 to 60, default 30) as they arrive, with clicks per minute. Derived fields only.\n\nScope: `analytics:read` (Read analytics).","x-required-scope":"analytics:read","parameters":[{"name":"minutes","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":5,"maximum":60}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"domainId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"timezone","in":"query","required":false,"schema":{"default":"UTC","type":"string","maxLength":64}},{"name":"filters","in":"query","required":false,"schema":{"type":"string","maxLength":20000,"example":"[{\"dim\":\"country\",\"op\":\"is\",\"values\":[\"US\",\"GB\"]},{\"dim\":\"device\",\"op\":\"is_not\",\"values\":[\"desktop\"]}]"},"description":"JSON array of conditions, ANDed. Each is `{\"dim\", \"op\": \"is\" | \"is_not\", \"values\": [...]}` and matches any (or, with is_not, none) of its values. Dimensions: link, domain, campaign, tag (ids), continent (AF, AS, EU, NA, OC, SA), country (ISO codes), region, city, device, os, browser, referrer, source (link or qr), utm_source, utm_medium, utm_campaign, weekday (1 = Monday … 7), hour (0–23, in `timezone`). Region, city, os, browser, UTM, weekday and hour need advanced analytics."}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsLive"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/annotations":{"get":{"operationId":"listAnnotations","tags":["Analytics"],"summary":"List chart notes","description":"Notes pinned to moments in a time range, oldest first.\n\nScope: `analytics:read` (Read analytics).","x-required-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Annotation"}}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createAnnotation","tags":["Analytics"],"summary":"Add a chart note","description":"Pin a note such as \"Newsletter sent\" to a moment, so spikes on the chart explain themselves. Up to 500 per workspace.\n\nScope: `links:write` (Create and edit links).","x-required-scope":"links:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["at","label"]}}}},"responses":{"201":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/annotations/{annotationId}":{"delete":{"operationId":"deleteAnnotation","tags":["Analytics"],"summary":"Delete a chart note","description":"Scope: `links:write` (Create and edit links).","x-required-scope":"links:write","parameters":[{"name":"annotationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Done."},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/links":{"get":{"operationId":"getLinkPerformance","tags":["Analytics"],"summary":"Link performance","description":"Every link clicked in the period, with the previous period beside it, conversions and the last click; plus active links nobody has clicked in 30 days.\n\nScope: `analytics:read` (Read analytics).","x-required-scope":"analytics:read","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"timezone","in":"query","required":false,"schema":{"default":"UTC","type":"string","maxLength":64}},{"name":"domainId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"country","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z]{0,2}$"}},{"name":"region","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"city","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"device","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"os","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"browser","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"referrer","in":"query","required":false,"schema":{"type":"string","maxLength":253}},{"name":"source","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"utmSource","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"utmMedium","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"utmCampaign","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"filters","in":"query","required":false,"schema":{"type":"string","maxLength":20000,"example":"[{\"dim\":\"country\",\"op\":\"is\",\"values\":[\"US\",\"GB\"]},{\"dim\":\"device\",\"op\":\"is_not\",\"values\":[\"desktop\"]}]"},"description":"JSON array of conditions, ANDed. Each is `{\"dim\", \"op\": \"is\" | \"is_not\", \"values\": [...]}` and matches any (or, with is_not, none) of its values. Dimensions: link, domain, campaign, tag (ids), continent (AF, AS, EU, NA, OC, SA), country (ISO codes), region, city, device, os, browser, referrer, source (link or qr), utm_source, utm_medium, utm_campaign, weekday (1 = Monday … 7), hour (0–23, in `timezone`). Region, city, os, browser, UTM, weekday and hour need advanced analytics."}],"responses":{"200":{"description":"Success.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsLinks"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversions":{"post":{"operationId":"reportConversion","tags":["Conversions"],"summary":"Report a conversion from your server","description":"Attributes a conversion to the click that brought the visitor: pass the `sfy_cid` your landing page received. Accepted conversions are matched to their click within seconds and show up in analytics and the `conversion.created` webhook. Send your own `id` (an order id) to make retries safe.\n\nScope: `conversions:write` (Report conversions).","x-required-scope":"conversions:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clickId":{"type":"string","format":"uuid"},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,100}$"},"value":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"occurredAt":{"type":"string","format":"date-time"}},"required":["clickId","event"]}}}},"responses":{"202":{"description":"Accepted: processing in the background.","headers":{"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionAccepted"}}}},"400":{"description":"The request is invalid (`validation_failed`; see `details`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, revoked or expired API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope this endpoint needs (`insufficient_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict, e.g. `alias_taken`, or `idempotency_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Understood but not possible, e.g. `domain_unavailable`, `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit reached (`rate_limited`). Wait `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"link.created":{"post":{"summary":"link.created","description":"A link was created (dashboard, API or import). Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"link.created"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/Link"}},"required":["link"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}},"link.updated":{"post":{"summary":"link.updated","description":"A link’s settings changed. Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"link.updated"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/Link"},"changedFields":{"type":"array","items":{"type":"string"}}},"required":["link","changedFields"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}},"link.deleted":{"post":{"summary":"link.deleted","description":"A link was deleted. Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"link.deleted"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/Link"}},"required":["link"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}},"domain.verified":{"post":{"summary":"domain.verified","description":"A custom domain finished setup and is serving links. Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"domain.verified"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/WebhookDomain"}},"required":["domain"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}},"domain.disabled":{"post":{"summary":"domain.disabled","description":"A domain stopped serving links (setup failed, disabled or removed). Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"domain.disabled"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/WebhookDomain"},"reason":{"type":"string","enum":["failed","disabled","removed"]}},"required":["domain","reason"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}},"conversion.created":{"post":{"summary":"conversion.created","description":"A conversion was attributed to a click. Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"conversion.created"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"conversion":{"$ref":"#/components/schemas/WebhookConversion"}},"required":["conversion"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}},"subscription.updated":{"post":{"summary":"subscription.updated","description":"The workspace’s plan or billing status changed. Verify the `webhook-signature` header before trusting the body.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string"},"description":"The event id. Use it to ignore duplicates."},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when this attempt was sent. Reject old timestamps (e.g. more than 5 minutes)."},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string"},"description":"`v1,<base64 HMAC-SHA256>` of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the base64-decoded part of your `whsec_…` secret. Several space-separated signatures during a secret rotation."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id; also the `webhook-id` header. Stable across retries and resends: use it to skip duplicates."},"type":{"type":"string","const":"subscription.updated"},"timestamp":{"type":"string","format":"date-time"},"workspaceId":{"type":"string","format":"uuid"},"data":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscription"}},"required":["subscription"],"additionalProperties":false}},"required":["id","type","timestamp","workspaceId","data"],"additionalProperties":false}}}},"responses":{"2XX":{"description":"Received. Respond within 10 seconds; do slow work afterwards."},"default":{"description":"Anything else (or a timeout) is retried with backoff: 8 attempts over about 45 hours."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A secret API key (`sfy_sk_…`)."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Any unique string (a UUID works). Retries with the same key and body return the original response."}},"headers":{"RateLimitRemaining":{"description":"Requests left in the current minute for this key.","schema":{"type":"integer"}}},"schemas":{"Error":{"$ref":"#/components/schemas/Error"},"ApiKeyInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"scopes":{"type":"array","items":{"type":"string","enum":["links:read","links:write","links:delete","domains:read","analytics:read","conversions:write"]}}},"required":["id","workspaceId","scopes"],"additionalProperties":false},"LinkPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"nextCursor":{"description":"Pass as `cursor` for the next page; null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"Link":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hostname":{"type":"string"}},"required":["id","hostname"],"additionalProperties":false},"code":{"type":"string","description":"The back-half: `https://<domain>/<code>`."},"shortUrl":{"type":"string"},"destinationUrl":{"type":"string"},"title":{"type":["string","null"]},"notes":{"type":["string","null"]},"redirectType":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"enabled":{"type":"boolean"},"blocked":{"type":"boolean","description":"Blocked by the platform for abuse; cannot be re-enabled by the workspace."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"campaign":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"utm":{"type":"object","properties":{"source":{"type":["string","null"]},"medium":{"type":["string","null"]},"campaign":{"type":["string","null"]},"term":{"type":["string","null"]},"content":{"type":["string","null"]}},"additionalProperties":false},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiredRedirectUrl":{"type":["string","null"]},"hasPassword":{"type":"boolean"},"iosUrl":{"type":["string","null"]},"androidUrl":{"type":["string","null"]},"routing":{"anyOf":[{"$ref":"#/components/schemas/Routing"},{"type":"null"}]},"trackConversions":{"type":"boolean"},"pixels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","google_ads","tiktok"]},"name":{"type":"string"}},"required":["id","provider","name"],"additionalProperties":false}},"destinationHealth":{"type":"object","properties":{"status":{"type":"string","enum":["ok","broken","unchecked"]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"statusCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991},{"type":"null"}]},"error":{"type":["string","null"]},"brokenSince":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["status","checkedAt","statusCode","error","brokenSince"],"additionalProperties":false,"description":"Whether the destination answers. Checked about daily; `broken` after two failed checks in a row (an error page, or no answer). Answers like 401, 403 and 429 count as working, since sites often refuse automated checks."}},"required":["id","workspaceId","domain","code","shortUrl","destinationUrl","title","notes","redirectType","enabled","blocked","createdAt","updatedAt","tags","campaign","utm","expiresAt","expiredRedirectUrl","hasPassword","iosUrl","androidUrl","routing","trackConversions","pixels","destinationHealth"],"additionalProperties":false},"Tag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","enum":["gray","blue","green","amber","red","purple","pink","teal"]},"linkCount":{"type":"integer","minimum":-9007199254740991}},"required":["id","name","color"],"additionalProperties":false},"Routing":{"type":"object","properties":{"version":{"type":"number","const":1},"rules":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"name":{"type":"string","maxLength":80},"conditions":{"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","const":"country"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{}}},"required":["field","op","values"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","const":"device"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["desktop","mobile","tablet","other"]}}},"required":["field","op","values"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","const":"os"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["ios","android","windows","macos","linux","chromeos","other"]}}},"required":["field","op","values"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","const":"browser"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]}}},"required":["field","op","values"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","const":"language"},"op":{"type":"string","enum":["in","not_in"]},"values":{"minItems":1,"maxItems":250,"type":"array","items":{}}},"required":["field","op","values"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","const":"time"},"op":{"type":"string","const":"between"},"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"timezone":{"type":"string","maxLength":64}},"required":["field","op","start","end","timezone"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","const":"date"},"op":{"type":"string","const":"between"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["field","op"],"additionalProperties":false}]}},"variants":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"url":{},"weight":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","url","weight"],"additionalProperties":false}}},"required":["id","conditions","variants"],"additionalProperties":false}}},"required":["version","rules"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","description":"`links_bulk_create`, `links_bulk_update`, `links_bulk_delete`, `link_import`, `link_export` or `qr_export`."},"status":{"type":"string","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED"]},"progress":{"type":"integer","minimum":-9007199254740991,"description":"Items processed so far."},"total":{"type":"integer","minimum":-9007199254740991},"succeeded":{"type":"integer","minimum":-9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991},"filename":{"type":["string","null"]},"error":{"description":"Why the whole job failed. Per-item errors are under /items.","type":["string","null"]},"downloadUrl":{"description":"Signed link (15 minutes) to the result file, for exports.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","type","status","progress","total","succeeded","failed","filename","error","downloadUrl","createdAt","startedAt","finishedAt"],"additionalProperties":false},"JobItemPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/JobItem"}},"nextCursor":{"description":"Pass as `cursor` for the next page; null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"JobItem":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"description":"0-based item index. For CSV imports, the file line is index + 2."},"ok":{"type":"boolean"},"linkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":["string","null"]}},"required":["code","message","field"],"additionalProperties":false},{"type":"null"}]}},"required":["index","ok","linkId","error"],"additionalProperties":false},"TagPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"nextCursor":{"description":"Pass as `cursor` for the next page; null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"CampaignPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"nextCursor":{"description":"Pass as `cursor` for the next page; null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"Campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"startsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived":{"type":"boolean"},"linkCount":{"type":"integer","minimum":-9007199254740991},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","description","startsAt","endsAt","archived","linkCount","createdAt"],"additionalProperties":false},"DomainPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"nextCursor":{"description":"Pass as `cursor` for the next page; null on the last page.","type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"Domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"type":{"type":"string","enum":["PLATFORM","CUSTOM"]},"status":{"type":"string","enum":["PENDING","VERIFYING","VERIFIED","SSL_PENDING","ACTIVE","FAILED","DISABLED"]},"active":{"type":"boolean"},"apex":{"type":"boolean"},"rootRedirectUrl":{"type":["string","null"]},"notFoundRedirectUrl":{"type":["string","null"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TXT","CNAME","A"]},"name":{"type":"string"},"value":{"type":"string"},"purpose":{"type":"string","enum":["ownership","routing"]}},"required":["type","name","value","purpose"],"additionalProperties":false}},"dnsHealthy":{"type":"boolean"},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastCheckMessage":{"type":["string","null"]},"nextCheckAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"verificationDeadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"linkCount":{"type":"integer","minimum":-9007199254740991},"createdAt":{"type":"string","format":"date-time"}},"required":["id","hostname","type","status","active","apex","rootRedirectUrl","notFoundRedirectUrl","dnsRecords","dnsHealthy","lastCheckedAt","lastCheckMessage","nextCheckAt","verificationDeadline","activatedAt","linkCount","createdAt"],"additionalProperties":false},"Analytics":{"type":"object","properties":{"range":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["hour","day"]},"timezone":{"type":"string"},"retentionDays":{"type":"integer","minimum":-9007199254740991},"clamped":{"type":"boolean"}},"required":["from","to","interval","timezone","retentionDays","clamped"],"additionalProperties":false},"totals":{"type":"object","properties":{"clicks":{"type":"integer","minimum":-9007199254740991},"visitors":{"type":"integer","minimum":-9007199254740991},"qrClicks":{"type":"integer","minimum":-9007199254740991}},"required":["clicks","visitors","qrClicks"],"additionalProperties":false},"excluded":{"type":"object","properties":{"bots":{"type":"integer","minimum":-9007199254740991},"suspicious":{"type":"integer","minimum":-9007199254740991},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["reason","clicks"],"additionalProperties":false}}},"required":["bots","suspicious","reasons"],"additionalProperties":false,"description":"Clicks left out of every number: declared bots, and suspicious clicks (automation, missing browser language, click bursts or floods) by reason."},"series":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["t","clicks"],"additionalProperties":false}},"countries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"cities":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"devices":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"os":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"browsers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"referrers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"topLinks":{"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"code":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["linkId","hostname","code","clicks","conversions"],"additionalProperties":false}},"topDomains":{"type":"array","items":{"type":"object","properties":{"domainId":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["domainId","hostname","clicks"],"additionalProperties":false}},"campaigns":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid"},"name":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["campaignId","name","clicks","conversions"],"additionalProperties":false}},"utmSources":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"utmMediums":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"utmCampaigns":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false}},"conversions":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991},"convertedClicks":{"type":"integer","minimum":-9007199254740991},"values":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"value":{"type":"number"}},"required":["currency","value"],"additionalProperties":false}},"byEvent":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["key","name","conversions"],"additionalProperties":false}}},"required":["total","convertedClicks","values","byEvent"],"additionalProperties":false},"variants":{"type":"array","items":{"type":"object","properties":{"linkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ruleId":{"type":"string"},"variantId":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["linkId","ruleId","variantId","clicks","conversions"],"additionalProperties":false}},"regions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"extra":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["key","clicks"],"additionalProperties":false},"description":"Clicks by state or province; `extra` is the country code."},"heatmap":{"type":"array","items":{"type":"object","properties":{"weekday":{"type":"integer","minimum":1,"maximum":7},"hour":{"type":"integer","minimum":0,"maximum":23},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["weekday","hour","clicks"],"additionalProperties":false},"description":"Clicks by weekday (1 = Monday) and hour of day, in the requested time zone. Hours without clicks are left out."},"revenue":{"type":"object","properties":{"byLink":{"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"code":{"type":"string"},"currency":{"type":"string"},"value":{"type":"number"},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["linkId","hostname","code","currency","value","conversions"],"additionalProperties":false}},"byCampaign":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string","format":"uuid"},"name":{"type":"string"},"currency":{"type":"string"},"value":{"type":"number"},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["campaignId","name","currency","value","conversions"],"additionalProperties":false}},"bySource":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"currency":{"type":"string"},"value":{"type":"number"},"conversions":{"type":"integer","minimum":-9007199254740991}},"required":["key","currency","value","conversions"],"additionalProperties":false}}},"required":["byLink","byCampaign","bySource"],"additionalProperties":false,"description":"Conversion value by link, campaign and UTM source, per currency. Only conversions reported with a value count."},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"totals":{"type":"object","properties":{"clicks":{"type":"integer","minimum":-9007199254740991},"visitors":{"type":"integer","minimum":-9007199254740991},"qrClicks":{"type":"integer","minimum":-9007199254740991}},"required":["clicks","visitors","qrClicks"],"additionalProperties":false},"conversions":{"type":"integer","minimum":-9007199254740991},"series":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["t","clicks"],"additionalProperties":false}},"partial":{"type":"boolean"}},"required":["from","to","totals","conversions","series","partial"],"additionalProperties":false},{"type":"null"}],"description":"With `compare=true`: the period of the same length just before this one, with `series` aligned to the current buckets. `partial` is true when part of it is older than your analytics history."},"locked":{"type":"array","items":{"type":"string","enum":["cities","regions","heatmap","os","browsers","utmSources","utmMediums","utmCampaigns","campaigns","variants"]},"description":"Sections your plan doesn’t include (advanced analytics); they are returned empty."}},"required":["range","totals","excluded","series","countries","cities","devices","os","browsers","referrers","sources","topLinks","topDomains","campaigns","utmSources","utmMediums","utmCampaigns","conversions","variants","regions","heatmap","revenue","previous","locked"],"additionalProperties":false},"AnalyticsLive":{"type":"object","properties":{"clicks":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"linkId":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"code":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"device":{"type":"string"},"os":{"type":"string"},"browser":{"type":"string"},"referrer":{"type":"string"},"source":{"type":"string"}},"required":["at","linkId","hostname","code","country","city","device","os","browser","referrer","source"],"additionalProperties":false},"description":"Counted clicks (bots and suspicious clicks left out), newest first, up to 40. Derived fields only: never an IP address or user agent."},"perMinute":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string","format":"date-time"},"clicks":{"type":"integer","minimum":-9007199254740991}},"required":["t","clicks"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991}},"required":["clicks","perMinute","total"],"additionalProperties":false},"Annotation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"at":{"type":"string","format":"date-time"},"label":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","at","label","createdAt"],"additionalProperties":false,"description":"A note pinned to a moment on the analytics chart."},"AnalyticsLinks":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"code":{"type":"string"},"title":{"type":["string","null"]},"clicks":{"type":"integer","minimum":-9007199254740991},"previousClicks":{"type":"integer","minimum":-9007199254740991,"description":"Clicks in the period of the same length just before."},"conversions":{"type":"integer","minimum":-9007199254740991},"lastClickAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["linkId","hostname","code","title","clicks","previousClicks","conversions","lastClickAt"],"additionalProperties":false},"description":"Every link clicked in the period or the one before it, busiest first (up to 1,000)."},"idle":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991},"links":{"type":"array","items":{"type":"object","properties":{"linkId":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"code":{"type":"string"},"title":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["linkId","hostname","code","title","createdAt"],"additionalProperties":false}}},"required":["total","links"],"additionalProperties":false,"description":"Active links with no clicks in the last 30 days; up to 100 listed, newest first."}},"required":["links","idle"],"additionalProperties":false},"ConversionAccepted":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The conversion id. With your own `id`, the same input always maps to the same value."},"queued":{"type":"boolean","const":true}},"required":["id","queued"],"additionalProperties":false},"WebhookDomain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hostname":{"type":"string"},"type":{"type":"string","enum":["PLATFORM","CUSTOM"]},"status":{"type":"string"}},"required":["id","hostname","type","status"],"additionalProperties":false},"WebhookConversion":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event":{"type":"string"},"value":{"type":["number","null"]},"currency":{"type":["string","null"]},"clickId":{"type":"string","format":"uuid"},"linkId":{"type":"string","format":"uuid"},"campaignId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","event","value","currency","clickId","linkId","campaignId","occurredAt"],"additionalProperties":false},"WebhookSubscription":{"type":"object","properties":{"plan":{"type":"string","description":"Plan in effect now."},"subscribedPlan":{"description":"Plan paid for; differs from `plan` once a failed payment outlasts the grace period.","type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["TRIALING","ACTIVE","PAST_DUE","UNPAID","CANCELED","INCOMPLETE","INCOMPLETE_EXPIRED","PAUSED"]},{"type":"null"}]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"trialEndsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["plan","subscribedPlan","status","interval","currentPeriodEnd","cancelAtPeriodEnd","trialEndsAt"],"additionalProperties":false}}}}