{
  "openapi": "3.1.0",
  "info": {
    "title": "Hyllo public API",
    "version": "1.0.0",
    "description": "Hyllo's public API, built for integrations (scripts, Zapier, Make, back ends). It is versioned separately from the application's internal `/api/v1` API: its contract is stable and its responses are locked down by tests. The usage guide (getting started, code examples, webhooks) is at https://hyllo.fr/en/developers.\n\n## Authentication\n\nEvery request carries a **personal token**: `Authorization: Bearer hyl_…`. A token is created in the application (Settings, API); its value is shown only once. It is bound to **one workspace**: all routes read and write in that workspace, there is no `X-Workspace` header and no access to another workspace (a resource from another workspace returns 404). It acts with the permissions its creator has in the workspace; a token that is expired, revoked, or whose creator has left the workspace returns 401 `invalid_token`. The API is reserved for plans that include it (`api.access`); otherwise you get 402.\n\nResponses are always JSON (`Content-Type: application/json`).\n\n## Scopes\n\nA token carries only the scopes chosen when it was created: `short_links:read`, `short_links:write`, `qr_codes:read`, `qr_codes:write`, `link_pages:read`, `link_pages:write`, `analytics:read`, `webhooks:manage`. A `write` scope also grants the `read` scope of its family (`short_links`, `qr_codes`, `link_pages`): the token stores both, and `GET /me` lists them. `analytics:read` and `webhooks:manage` have no `write` variant. The scope required by each route is given in `x-required-scope`; a missing scope returns 403 `insufficient_scope` with `required_scope`. `webhooks:manage` gives access to the `/webhooks…` routes (managing the workspace's webhooks); it is granted only to a token creator who is a workspace admin.\n\n## Rate limits\n\nThe limit depends on the plan (`GET /me`: `rate_limit.per_minute`): it applies per token, and to all of the workspace's tokens combined (twice the per-token limit). Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` (for the tightest limit) and `X-RateLimit-Reset` (Unix timestamp). Beyond the limit: 429 `rate_limited` with `Retry-After`. Rejected authentications are also counted per IP: only rejections count; beyond 30 rejections (401) per minute, every further rejection returns 429 `rate_limited` (with `Retry-After`) until the end of the minute. A valid token from the same IP is still accepted. An IPv6 address is counted per /64 block.\n\nSome routes have their own limit, in addition to the plan limit: QR code export (20 per minute per token, 40 for all of the workspace's tokens), `POST /webhooks` (20 per minute), `PATCH /webhooks/{webhook}` with `url` (20 per minute), `POST /webhooks/{webhook}/test` (10 per minute) and `POST /webhooks/{webhook}/deliveries/{delivery}/resend` (30 per minute); these last four are counted per route: creation, test and resend per token creator (two tokens of the same user share the counter), `url` changes per account (counter shared with the application). Every request that carries `url` counts, even with the current value; requests without `url` do not. These limits answer like the rest of the API: 429 `rate_limited` with `Retry-After` and `X-RateLimit-*` (`X-RateLimit-Reset` follows the limiter whose `X-RateLimit-Remaining` is the lowest).\n\n## Idempotency\n\nCreations (`POST`) accept the `Idempotency-Key` header: when replayed, the same request returns the original response (`Idempotent-Replayed: true`) for 24 h instead of creating a duplicate.\n\n## Errors\n\n| Status | When |\n|--------|------|\n| 401 | `invalid_token`: token missing, unknown, expired or revoked |\n| 402 | plan without API access, feature not included, or quota reached (`plan_required`, `quota_reached`, `plan_restricted`) |\n| 403 | `insufficient_scope`, or insufficient creator role (viewer) |\n| 404 | unknown resource, or resource from another workspace; `DELETE` on a QR code or a link page does not exist (405) |\n| 409 | `idempotency_in_progress` |\n| 422 | validation (`errors`); `field_not_available` for a field absent from the public API (folders); `idempotency_key_mismatch` |\n| 429 | `rate_limited` |\n\n**Order of checks**: 401 → 402 → 403 `insufficient_scope` → 404 → 422. A token without the required scope therefore gets 403 even on a nonexistent ULID (never 404), and the existence of a resource is revealed only to a token that has the scope. Body validation (422) comes last. A route's own limits count after the 402 and the 403: a refused token does not spend them. The general budget per token and per workspace counts before, and every response, refusals included, carries `X-RateLimit-*`.\n\nTest the `code`, never the `message` (it is translated according to the profile of the token's creator).\n\n## Webhooks\n\nA webhook receives the workspace events you choose as a JSON `POST` on a public HTTPS address. It is managed through the `/webhooks…` routes (scope `webhooks:manage`, plan with `api.access`, at most 10 webhooks per workspace). `GET /webhooks/events` lists the event types you can subscribe to; the payload of each type is described in the `webhooks` section of this document (`WebhookEvent*` schemas).\n\n**Catalog**: `short_link|qr_code|link_page` + `.created`, `.updated`, `.deleted`, `.expired`; `visit_limit.reached`; `alert.triggered`; visits: `qr_code.scanned`, `short_link.clicked`, `link_page.viewed`, `link.clicked`. Sent without subscribing: `visits.batch` (grouped visits) and `webhook.test`.\n\n**Envelope** (body of every request): `{ id, type, api_version, created_at, workspace: { id }, data }`. `id` (`evt_…`) identifies the event; `data` depends on the type. Resources are those of the public API, without `access`. A deletion keeps only the resource reference: `data.resource = { type, id, name }`. A visit carries only `occurred_at`, `country`, `device_type` and `referrer_domain`: never an IP, user agent, browser or UTM parameters.\n\n**Headers**: `Content-Type: application/json`, `User-Agent: Hyllo-Webhooks/1.0`, `Hyllo-Signature`, `Hyllo-Event-Id` (= `id`, identical on every retry), `Hyllo-Event-Type` (= `type`), `Hyllo-Delivery-Id`.\n\n**Verifying the signature.** The secret (`whsec_…`) is shown once, at creation and at rotation. `Hyllo-Signature` is `t=<Unix timestamp>,v1=<hex>[,v1=<hex>]`; `v1` is the HMAC-SHA256, keyed with the entire secret (including the `whsec_` prefix), of `t + \".\" + raw body`. The body is compact JSON (no spaces, `/` and Unicode characters unescaped): compute it on the body as received, byte for byte, before any JSON re-parsing. `t` is the time of each attempt: a retry has the same body and the same `Hyllo-Event-Id` but a new `t`, hence a new signature.\n\n```\nheader = request.header(\"Hyllo-Signature\")        // \"t=1790000000,v1=ab12…,v1=cd34…\"\nt      = value of t\nbody   = request.rawBody\nif abs(now() - t) > 300 : reject                  // recommended tolerance: 5 minutes\nexpected = hex(hmac_sha256(secret, t + \".\" + body))\nif no v1 value equals expected (constant-time comparison) : reject\n```\n\nFor 24 h after a secret rotation (`POST /webhooks/{webhook}/secret`), the header carries two `v1` values (the new one first): accept if either matches.\n\n**Delivery and retries.** Respond with a 2xx within 5 s (3 s to connect); redirects are not followed and count as a failure. Any other status code, a timeout or a network error: retry after 1 min, 5 min, 15 min, 1 h, 2 h, 4 h, 8 h, then 8 h again (8 retries over about 23 h), then the delivery becomes `failed`. The log (`GET /webhooks/{webhook}/deliveries`, 30 days) gives status, attempts, received status code, the beginning of the response, and `error` (`timeout`, `dns`, `tls`, `connection`, `redirect`, `not_public_at_send`, `interrupted`). `attempts` is incremented at the start of each attempt; `interrupted` denotes an attempt that started without a report (process stopped): it counts as a failure, and the delivery becomes `failed` beyond 9 attempts. `response_excerpt`: the transfer is cut off beyond 1,024 bytes, `response_status` is kept. The address is resolved on every send, without a proxy: if it is no longer public, the delivery fails immediately without connecting. In addition to private, local and reserved addresses, the ranges `2002::/16`, `2001::/32` and `fec0::/10` are rejected; the returned `url` is normalized (lowercase host, no trailing dot). `POST …/deliveries/{delivery}/resend` resends an event manually.\n\n**Deactivation.** A webhook that has been failing continuously for 72 h is deactivated (`is_active: false`, `disabled_reason: failing`), its pending deliveries are abandoned (`skipped`) and admins are notified. To reactivate it: `PATCH` with `is_active: true` (403 `staff_disabled` if it was cut off by Hyllo staff, `disabled_reason: staff`; the same goes for a change of `url`, `POST …/test` and `…/resend`). A webhook cut off by staff sends nothing anymore: deliveries are `skipped`, tests included. A plan without `api.access` sends nothing anymore (`skipped`).\n\n**Batching.** With `batch_visits: true`, visit events are no longer sent one by one: they are grouped into `visits.batch` (at most 500 events per delivery, `data.events` = complete envelopes), sent every minute. Guarantee: at most once — if the sending process stops between picking up the visits and recording them, that batch is lost.\n\n**Monthly cap.** Visit events are counted per calendar month (UTC) and per workspace (`meta.usage` of `GET /webhooks`). Admins are notified at 80% and then at 100%; at the cap, visits stop being emitted (not made up later), while lifecycle events continue. A manual resend does not count.\n\n**Best practices.** Arrival order is not guaranteed: rely on `created_at`. A delivery may arrive more than once: deduplicate by `Hyllo-Event-Id`. For `*.expired`, the identifier is deterministic per (resource, `expires_at`): a replay of the detection keeps the same `Hyllo-Event-Id`. Respond quickly and process asynchronously.\n\n## Out of scope\n\nNo folders, no sharing, no conversion of a short link to a QR code, no geocoding, no CSV/PDF exports, no reports or alerts; no deletion of QR codes or link pages. Statistics are aggregates: no IP, IP fingerprint or user agent is exposed."
  },
  "servers": [
    {
      "url": "https://api.hyllo.fr/api/public/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerToken": []
    }
  ],
  "x-hyllo-facts": {
    "tokens": {
      "prefix": "hyl_",
      "expiryDays": [
        30,
        90,
        365
      ],
      "maxActivePerMember": 50
    },
    "rateLimit": {
      "perMinute": {
        "pro": 60,
        "business": 300,
        "enterprise": 1200
      },
      "workspaceMultiplier": 2,
      "qrExportPerMinute": 20,
      "authFailuresPerMinute": 30,
      "authFailuresIpv6PrefixLength": 64,
      "webhookTestPerMinute": 10,
      "webhookResendPerMinute": 30,
      "webhookCreatePerMinute": 20,
      "webhookUrlChangesPerMinute": 20
    },
    "pagination": {
      "defaultPerPage": 15,
      "maxPerPage": 100
    },
    "idempotency": {
      "ttlHours": 24
    },
    "versioning": {
      "previousVersionMaintainedMonths": 12,
      "productionBaseUrl": "https://api.hyllo.fr/api/public/v1"
    },
    "webhooks": {
      "timeoutSeconds": 5,
      "connectTimeoutSeconds": 3,
      "retryDelaysSeconds": [
        60,
        300,
        900,
        3600,
        7200,
        14400,
        28800,
        28800
      ],
      "disableAfterHours": 72,
      "retentionDays": 30,
      "maxEndpointsPerWorkspace": 10,
      "batchMaxEvents": 500,
      "secretOverlapHours": 24,
      "responseExcerptBytes": 1024,
      "apiVersion": "2026-12-01",
      "userAgent": "Hyllo-Webhooks/1.0",
      "visitEventsMonthly": {
        "pro": 10000,
        "business": 100000,
        "enterprise": 1000000
      },
      "signatureToleranceSeconds": 300,
      "signatureTestVector": {
        "secret": "whsec_TESTtestTESTtestTESTtestTESTtest",
        "timestamp": 1790000000,
        "body": "{\"id\":\"evt_01ARZ3NDEKTSV4RRFFQ69G5FAV\",\"type\":\"webhook.test\",\"api_version\":\"2026-12-01\",\"created_at\":\"2026-09-21T14:13:20.000000Z\",\"workspace\":{\"id\":\"01ARZ3NDEKTSV4RRFFQ69G5FAV\"},\"data\":{\"message\":\"This is a test event from Hyllo.\"}}",
        "header": "t=1790000000,v1=087311d448e2a7eacab4aad98f9b611a439c32b1f635e0e7691712503dda8d3f"
      }
    }
  },
  "tags": [
    {
      "name": "Token",
      "description": "Identity of the current token.",
      "x-slug": "token"
    },
    {
      "name": "Short links",
      "x-slug": "short-links"
    },
    {
      "name": "QR codes",
      "x-slug": "qr-codes"
    },
    {
      "name": "Link pages",
      "x-slug": "link-pages"
    },
    {
      "name": "Statistics",
      "x-slug": "analytics"
    },
    {
      "name": "Webhooks",
      "description": "Management of the workspace's webhooks (scope `webhooks:manage`). The events sent are described in the `webhooks` section and under \"Webhooks\" in the general description.",
      "x-slug": "webhooks"
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "Token"
        ],
        "operationId": "getMe",
        "summary": "Current token and workspace",
        "description": "Returns the token used (name, prefix, scopes, expiration), the workspace it is bound to, its plan and the request limit per minute. No scope is required: any valid token can call this route, which makes it the reference connection test.",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/short-links": {
      "get": {
        "tags": [
          "Short links"
        ],
        "operationId": "listShortLinks",
        "summary": "List short links",
        "description": "Short links of the token's workspace, paginated.",
        "x-required-scope": "short_links:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Search"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Domain"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "scheduled",
                "expired",
                "limit_reached"
              ]
            },
            "description": "Keeps only links with this status (a short link cannot be deactivated: there is no `inactive`)."
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "deprecated": true,
            "schema": {
              "type": "string"
            },
            "description": "Rejected: folders do not exist in the public API. Any occurrence of this parameter returns 422 `field_not_available`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "links",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ShortLink"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/PaginationLinks"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Short links"
        ],
        "operationId": "createShortLink",
        "summary": "Create a short link",
        "description": "Creates a short link in the token's workspace. To create several at once: `POST /short-links/bulk`. A URL blocked by moderation is rejected (422), as in the application.\n\n402: `quota_reached` (`short_links.count`); `plan_required` for a chosen code (`short_links.custom_alias`), a custom domain (`custom_domains.count`), `open_in_app` or a protection.",
        "x-required-scope": "short_links:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "`http`/`https` destination, with a dotted host (domain or IPv4).",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "open_in_app": {
                    "type": "boolean",
                    "description": "Opens the destination in its native app when its host is known. Requires `short_links.deep_links` when enabled."
                  },
                  "folder_id": {
                    "description": "Rejected: folders do not exist in the public API. Any occurrence of this field (even `null`) returns 422 `field_not_available`.",
                    "not": {}
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Publication start: future date, before `expires_at`; `null` publishes immediately. Requires `resources.protection` (402 otherwise)."
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Expiration: future date; `null` removes it. Requires `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Redirect password (stored hashed, never returned). Requires `resources.protection`.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "max_visits": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Visit limit; beyond it the redirect returns 404. Requires `resources.protection`.",
                    "minimum": 1,
                    "maximum": 1000000000
                  },
                  "domain_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Active custom domain of the workspace; requires `custom_domains.count` to be included (402 otherwise).",
                    "format": "ulid"
                  },
                  "short": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Custom code, unique per domain; requires `short_links.custom_alias`. Omitted: a code is generated.",
                    "minLength": 3,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  }
                }
              },
              "example": {
                "url": "https://example.com/promo",
                "title": "Promo",
                "short": "promo"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Short link created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShortLink"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/short-links/bulk": {
      "post": {
        "tags": [
          "Short links"
        ],
        "operationId": "bulkCreateShortLinks",
        "summary": "Create short links in bulk",
        "description": "Creates up to 500 short links at once, with generated codes. Empty, invalid, too long or blocked lines are reported in `failed` without making the batch fail. Response **200** (not 201).\n\n402: `quota_reached` (`short_links.bulk_batch`, `short_links.count`), `plan_required` for a domain, `open_in_app` or an expiration.",
        "x-required-scope": "short_links:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "urls"
                ],
                "properties": {
                  "urls": {
                    "type": "array",
                    "items": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 10000
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "One destination per line."
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Shared expiration; requires `resources.protection`."
                  },
                  "open_in_app": {
                    "type": "boolean",
                    "description": "Applies to the whole batch; requires `short_links.deep_links`."
                  },
                  "domain_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Shared custom domain; requires `custom_domains.count`.",
                    "format": "ulid"
                  },
                  "folder_id": {
                    "description": "Rejected: 422 `field_not_available`.",
                    "not": {}
                  }
                }
              },
              "example": {
                "urls": [
                  "https://example.com/a",
                  "https://example.com/b"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch processed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": [
                        "created",
                        "failed"
                      ],
                      "properties": {
                        "created": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ShortLink"
                          }
                        },
                        "failed": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ShortLinkBulkFailure"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/short-links/{shortLink}": {
      "get": {
        "tags": [
          "Short links"
        ],
        "operationId": "getShortLink",
        "summary": "Get a short link",
        "description": "A short link of the token's workspace.",
        "x-required-scope": "short_links:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/ShortLinkId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShortLink"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "Short links"
        ],
        "operationId": "updateShortLink",
        "summary": "Update a short link",
        "description": "Updates a short link. The destination (`url`) and the code cannot be changed: sending `url` returns 422. A resource that became read-only after a downgrade returns 402 `plan_restricted`.",
        "x-required-scope": "short_links:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/ShortLinkId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "open_in_app": {
                    "type": "boolean",
                    "description": "Opens the destination in its native app when its host is known. Requires `short_links.deep_links` when enabled."
                  },
                  "folder_id": {
                    "description": "Rejected: folders do not exist in the public API. Any occurrence of this field (even `null`) returns 422 `field_not_available`.",
                    "not": {}
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Publication start: future date, before `expires_at`; `null` publishes immediately. Requires `resources.protection` (402 otherwise)."
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Expiration: future date; `null` removes it. Requires `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Redirect password (stored hashed, never returned). Requires `resources.protection`.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "max_visits": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Visit limit; beyond it the redirect returns 404. Requires `resources.protection`.",
                    "minimum": 1,
                    "maximum": 1000000000
                  },
                  "reset_counted_visits": {
                    "type": "boolean",
                    "description": "Resets `counted_visits` to zero."
                  }
                }
              },
              "example": {
                "title": "Nouveau titre"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Short link updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShortLink"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "delete": {
        "tags": [
          "Short links"
        ],
        "operationId": "deleteShortLink",
        "summary": "Delete a short link",
        "description": "Deletes the short link (and its short URL).",
        "x-required-scope": "short_links:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/ShortLinkId"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/qr-codes": {
      "get": {
        "tags": [
          "QR codes"
        ],
        "operationId": "listQrCodes",
        "summary": "List QR codes",
        "description": "QR codes of the token's workspace, paginated. QR codes shared from another workspace are not listed. Each item carries `visits_count` and `visits_series`.",
        "x-required-scope": "qr_codes:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Search"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Domain"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "static",
                "dynamic"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "scheduled",
                "expired",
                "limit_reached"
              ]
            },
            "description": "Keeps only QR codes with this status (a `static` QR code is always `active`)."
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "deprecated": true,
            "schema": {
              "type": "string"
            },
            "description": "Rejected: folders do not exist in the public API. Any occurrence of this parameter returns 422 `field_not_available`."
          },
          {
            "name": "content_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "url",
                "text",
                "email",
                "phone",
                "sms",
                "wifi",
                "vcard",
                "event",
                "link-pages",
                "stores",
                "google-review",
                "gps",
                "file",
                "menu"
              ]
            },
            "description": "Keeps only this `content.contentType`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "links",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QRCodeListItem"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/PaginationLinks"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "QR codes"
        ],
        "operationId": "createQrCode",
        "summary": "Create a QR code",
        "description": "Creates a QR code in the token's workspace. `design` and `frame` are optional: when omitted, the default design of the token's creator is applied (template marked as default, otherwise the base design with no frame). If the logo of that template is not a media item of the token's workspace, `design.image` is returned with `src: null` and `enabled: false`. Filing into a folder does not exist in the public API: `organization` is ignored.\n\n402: `quota_reached` (`qr_codes.dynamic`) for a dynamic QR code, `plan_required` for a chosen code, a custom domain, a design or an advanced frame.",
        "x-required-scope": "qr_codes:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "information"
                ],
                "properties": {
                  "information": {
                    "type": "object",
                    "required": [
                      "name",
                      "type"
                    ],
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "type": {
                        "type": "string",
                        "description": "Immutable after creation.",
                        "enum": [
                          "static",
                          "dynamic"
                        ]
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 1000
                      },
                      "domainId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "`dynamic` QR codes only: active custom domain of the workspace; omitted: Hyllo's domain. Immutable. Not allowed on a `static` QR code.",
                        "format": "ulid"
                      },
                      "short": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "`dynamic` QR codes only: custom code, unique on the domain; requires `short_links.custom_alias`. Immutable. Not allowed on a `static` QR code.",
                        "minLength": 3,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "required": [
                      "contentType",
                      "data"
                    ],
                    "properties": {
                      "contentType": {
                        "type": "string",
                        "enum": [
                          "url",
                          "text",
                          "email",
                          "phone",
                          "sms",
                          "wifi",
                          "vcard",
                          "event",
                          "link-pages",
                          "stores",
                          "google-review",
                          "gps",
                          "file",
                          "menu"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Payload depending on `contentType`:\n- `url`: `{ \"url\" }`\n- `link-pages`: `{ \"linkPageId\" }` (a link page of the workspace)\n- `text`: `{ \"text\" }`\n- `email`: `{ \"to\", \"subject\"?, \"body\"? }`\n- `phone`: `{ \"phone\" }`\n- `sms`: `{ \"phone\", \"message\"? }`\n- `wifi`: `{ \"ssid\", \"encryption\": \"WEP|WPA|WPA2-EAP\", \"password\"?, \"hidden\"?, \"eapMethod\"?, \"eapIdentity\"?, \"eapAnonymousIdentity\"?, \"eapPhase2Method\"? }`\n- `vcard`: `{ \"fullName\", \"name\"?, \"title\"?, \"birthday\"?, \"phone\"?, \"email\"?, \"address\"?, \"note\"?, \"company\"?, \"social\"?, \"website\"? }`\n- `event`: `{ \"summary\", \"dtstart\", \"dtend\", \"location\"?, \"description\"?, \"url\"? }` (`dtstart`/`dtend`: integers)\n- `stores`: `{ \"appStoreUrl\"?, \"playStoreUrl\"? }` (at least one)\n- `google-review`: `{ \"placeId\", \"placeName\"? }`\n- `gps`: `{ \"lat\", \"lng\", \"address\"? }`\n- `file`: `{ \"mediaId\", \"fileName\"? }` (a file from the workspace's media library)\n- `menu`: `{ \"mode\": \"pdf\", \"mediaId\" }` or `{ \"mode\": \"structured\", \"currency\"?, \"sections\": [{ \"title\", \"description\"?, \"items\": [{ \"name\", \"description\"?, \"price\"? }] }] }`\n\nThe available types depend on `information.type` (`stores`, `file` and `menu`: dynamic QR codes)."
                      }
                    }
                  },
                  "design": {
                    "$ref": "#/components/schemas/QRCodeDesign"
                  },
                  "frame": {
                    "$ref": "#/components/schemas/QRCodeFrame"
                  }
                }
              },
              "example": {
                "information": {
                  "name": "Restaurant menu",
                  "type": "dynamic"
                },
                "content": {
                  "contentType": "url",
                  "data": {
                    "url": "https://example.com/carte"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "QR code created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/QRCode"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/qr-codes/{qrCode}": {
      "get": {
        "tags": [
          "QR codes"
        ],
        "operationId": "getQrCode",
        "summary": "Get a QR code",
        "description": "A QR code of the token's workspace. This response has no `visits_count` or `visits_series` (they exist only in lists): for scans, use `GET /analytics/qr-codes/{id}`. A QR code shared from another workspace returns 404.",
        "x-required-scope": "qr_codes:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/QrCodeId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/QRCode"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "QR codes"
        ],
        "operationId": "updateQrCode",
        "summary": "Update a QR code",
        "description": "Updates a QR code; all blocks are optional. The type (`static`/`dynamic`), the domain and the code are immutable. `organization` or `folderId` return 422 `field_not_available`. `options` is accepted only for a dynamic QR code.",
        "x-required-scope": "qr_codes:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/QrCodeId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "information": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "maxLength": 255
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 1000
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "properties": {
                      "contentType": {
                        "type": "string",
                        "enum": [
                          "url",
                          "text",
                          "email",
                          "phone",
                          "sms",
                          "wifi",
                          "vcard",
                          "event",
                          "link-pages",
                          "stores",
                          "google-review",
                          "gps",
                          "file",
                          "menu"
                        ]
                      },
                      "data": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Payload depending on `contentType`:\n- `url`: `{ \"url\" }`\n- `link-pages`: `{ \"linkPageId\" }` (a link page of the workspace)\n- `text`: `{ \"text\" }`\n- `email`: `{ \"to\", \"subject\"?, \"body\"? }`\n- `phone`: `{ \"phone\" }`\n- `sms`: `{ \"phone\", \"message\"? }`\n- `wifi`: `{ \"ssid\", \"encryption\": \"WEP|WPA|WPA2-EAP\", \"password\"?, \"hidden\"?, \"eapMethod\"?, \"eapIdentity\"?, \"eapAnonymousIdentity\"?, \"eapPhase2Method\"? }`\n- `vcard`: `{ \"fullName\", \"name\"?, \"title\"?, \"birthday\"?, \"phone\"?, \"email\"?, \"address\"?, \"note\"?, \"company\"?, \"social\"?, \"website\"? }`\n- `event`: `{ \"summary\", \"dtstart\", \"dtend\", \"location\"?, \"description\"?, \"url\"? }` (`dtstart`/`dtend`: integers)\n- `stores`: `{ \"appStoreUrl\"?, \"playStoreUrl\"? }` (at least one)\n- `google-review`: `{ \"placeId\", \"placeName\"? }`\n- `gps`: `{ \"lat\", \"lng\", \"address\"? }`\n- `file`: `{ \"mediaId\", \"fileName\"? }` (a file from the workspace's media library)\n- `menu`: `{ \"mode\": \"pdf\", \"mediaId\" }` or `{ \"mode\": \"structured\", \"currency\"?, \"sections\": [{ \"title\", \"description\"?, \"items\": [{ \"name\", \"description\"?, \"price\"? }] }] }`\n\nThe available types depend on `information.type` (`stores`, `file` and `menu`: dynamic QR codes)."
                      }
                    }
                  },
                  "design": {
                    "$ref": "#/components/schemas/QRCodeDesign"
                  },
                  "frame": {
                    "$ref": "#/components/schemas/QRCodeFrame"
                  },
                  "options": {
                    "type": "object",
                    "description": "Dynamic QR codes only.",
                    "properties": {
                      "isActive": {
                        "type": "boolean"
                      },
                      "publishAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "description": "Future date, before `expiresAt`. Requires `resources.protection`."
                      },
                      "expiresAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "description": "Future date. Requires `resources.protection`."
                      },
                      "password": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Requires `resources.protection`.",
                        "minLength": 4,
                        "maxLength": 255
                      },
                      "maxVisits": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Requires `resources.protection`.",
                        "minimum": 1,
                        "maximum": 1000000000
                      },
                      "resetCountedVisits": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              },
              "example": {
                "information": {
                  "name": "Nouveau nom"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "QR code updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/QRCode"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/qr-codes/{qrCode}/export": {
      "get": {
        "tags": [
          "QR codes"
        ],
        "operationId": "exportQrCode",
        "summary": "Export a QR code as PNG or SVG",
        "description": "The QR code image, drawn by the same engine as the editor preview (including design, frame and logo). A dynamic QR code encodes its short URL, a static QR code its content. The SVG of a QR code whose design uses a lost entitlement is rendered as saved. The response is an attachment (`Content-Disposition: attachment`). This route has its own rate budget: 20 requests per minute per token (40 for all of the workspace's tokens), in addition to the plan limit. Each export is rendered on demand (no cache). A raster logo is scaled down to at most 512 px per side before rendering; an SVG logo larger than 512 KB returns 422 `logo_too_large`. Renderer unavailable or unusable response: 503 `renderer_unavailable` (retry). A QR code the engine refuses to draw: 422 `render_refused`. A static QR code of a content type that the API cannot encode identically to the editor: 422 `export_not_available` (safeguard: today all static types are supported), as well as a dynamic QR code without a short URL.",
        "x-required-scope": "qr_codes:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/QrCodeId"
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "description": "Image format.",
            "schema": {
              "type": "string",
              "enum": [
                "png",
                "svg"
              ]
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Image width in pixels, PNG only (the height follows the frame; ignored for SVG).",
            "schema": {
              "type": "integer",
              "minimum": 128,
              "maximum": 4096,
              "default": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The QR code image.",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment; filename=\"<name>.png\"` (or `.svg`).",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/svg+xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The rendering service is unavailable: `code` is `renderer_unavailable`. The `Retry-After` header says when to retry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "message",
                    "code"
                  ],
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "renderer_unavailable"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/link-pages": {
      "get": {
        "tags": [
          "Link pages"
        ],
        "operationId": "listLinkPages",
        "summary": "List link pages",
        "description": "Link pages of the token's workspace, paginated, with their links. `visits_count` and `visits_series` exist only in lists.",
        "x-required-scope": "link_pages:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Search"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Domain"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "scheduled",
                "expired"
              ]
            }
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "deprecated": true,
            "schema": {
              "type": "string"
            },
            "description": "Rejected: folders do not exist in the public API. Any occurrence of this parameter returns 422 `field_not_available`."
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageLanguage"
            },
            "description": "Default language of the page, or one of its added languages."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "links",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LinkPage"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/PaginationLinks"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Link pages"
        ],
        "operationId": "createLinkPage",
        "summary": "Create a link page",
        "description": "Creates a link page (without links: they are added with `POST /link-pages/{linkPage}/links`). `folderId` returns 422 `field_not_available`. Added languages and translations are set when updating.\n\n402: `quota_reached` (`link_pages.count`), `plan_required` for a chosen code, a domain, SEO, an advanced theme, hiding the badge or a protection.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "locale",
                  "isLogoVisible",
                  "shouldNoIndex",
                  "hasPagePassword",
                  "meta",
                  "avatar",
                  "socialLinks",
                  "theme"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  },
                  "locale": {
                    "$ref": "#/components/schemas/PageLanguage"
                  },
                  "isLogoVisible": {
                    "type": "boolean",
                    "description": "`false` requires `link_pages.hide_badge` (402 otherwise)."
                  },
                  "shouldNoIndex": {
                    "type": "boolean",
                    "description": "`true` requires `link_pages.seo`."
                  },
                  "isSensitive": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "publishAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Future date. Requires `resources.protection`."
                  },
                  "expiresAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Future date, after `publishAt`. Requires `resources.protection`."
                  },
                  "hasPagePassword": {
                    "type": "boolean"
                  },
                  "pagePassword": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when `hasPagePassword` is true and no password exists. Never returned.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "meta": {
                    "type": "object",
                    "description": "SEO metadata. Changing it requires `link_pages.seo` (402 otherwise).",
                    "properties": {
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500
                      }
                    }
                  },
                  "avatar": {
                    "type": "object",
                    "description": "Page avatar. Returned default: `type: icon`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "icon"
                        ]
                      },
                      "image": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2048
                      },
                      "icon": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 64
                      }
                    }
                  },
                  "socialLinks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SocialLink"
                    }
                  },
                  "theme": {
                    "$ref": "#/components/schemas/LinkPageTheme"
                  },
                  "domainId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Active custom domain of the workspace; requires `custom_domains.count`. Immutable.",
                    "format": "ulid"
                  },
                  "short": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Custom code, unique on the domain; requires `short_links.custom_alias`. Immutable.",
                    "minLength": 3,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  }
                }
              },
              "example": {
                "title": "Chez Marie",
                "locale": "fr",
                "isLogoVisible": true,
                "shouldNoIndex": false,
                "hasPagePassword": false,
                "meta": {
                  "title": null,
                  "description": null
                },
                "avatar": {
                  "type": "icon",
                  "icon": null
                },
                "socialLinks": [],
                "theme": {
                  "colorsTheme": "light"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Link page created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LinkPage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/link-pages/{linkPage}": {
      "get": {
        "tags": [
          "Link pages"
        ],
        "operationId": "getLinkPage",
        "summary": "Get a link page",
        "description": "A link page of the token's workspace, with its links.",
        "x-required-scope": "link_pages:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LinkPage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "Link pages"
        ],
        "operationId": "updateLinkPage",
        "summary": "Update a link page",
        "description": "Updates a link page; all fields are optional. `folderId` returns 422 `field_not_available`. There is no page deletion in the public API (`DELETE`: 405). Adding a language requires `link_pages.multilingual`.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 1000
                  },
                  "locale": {
                    "$ref": "#/components/schemas/PageLanguage"
                  },
                  "isLogoVisible": {
                    "type": "boolean",
                    "description": "`false` requires `link_pages.hide_badge` (402 otherwise)."
                  },
                  "shouldNoIndex": {
                    "type": "boolean",
                    "description": "`true` requires `link_pages.seo`."
                  },
                  "isSensitive": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "publishAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Future date. Requires `resources.protection`."
                  },
                  "expiresAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Future date, after `publishAt`. Requires `resources.protection`."
                  },
                  "hasPagePassword": {
                    "type": "boolean"
                  },
                  "pagePassword": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required when `hasPagePassword` is true and no password exists. Never returned.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "meta": {
                    "type": "object",
                    "description": "SEO metadata. Changing it requires `link_pages.seo` (402 otherwise).",
                    "properties": {
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500
                      }
                    }
                  },
                  "avatar": {
                    "type": "object",
                    "description": "Page avatar. Returned default: `type: icon`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "icon"
                        ]
                      },
                      "image": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2048
                      },
                      "icon": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 64
                      }
                    }
                  },
                  "socialLinks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SocialLink"
                    }
                  },
                  "theme": {
                    "$ref": "#/components/schemas/LinkPageTheme"
                  },
                  "languages": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "$ref": "#/components/schemas/PageLanguage"
                    },
                    "description": "Added languages, without duplicates and excluding the default language."
                  },
                  "translations": {
                    "$ref": "#/components/schemas/LinkPageTranslations"
                  }
                }
              },
              "example": {
                "title": "Nouveau titre"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Link page updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LinkPage"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/link-pages/{linkPage}/links": {
      "get": {
        "tags": [
          "Link pages"
        ],
        "operationId": "listLinkPageLinks",
        "summary": "List a page's links",
        "description": "Links of the page, sorted by position (not paginated).",
        "x-required-scope": "link_pages:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LinkPageLink"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Link pages"
        ],
        "operationId": "createLinkPageLink",
        "summary": "Add a link to a page",
        "description": "Adds a link at the end of the page. The `form` type does not exist: 422. Embedded types (`youtube`, `spotify`…) require `link_pages.embeds` (402 otherwise).",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "url",
                      "text",
                      "image",
                      "map",
                      "youtube",
                      "spotify",
                      "soundcloud",
                      "twitch",
                      "event",
                      "mail",
                      "phone",
                      "discord",
                      "hours",
                      "file",
                      "menu"
                    ]
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Payload depending on `type` (same rules as in the application; URLs are checked against unsafe addresses)."
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requires `resources.protection`."
                  },
                  "expire_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requires `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Requires `resources.protection`. Never returned (`has_password`).",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "thumbnail": {
                    "type": "object",
                    "description": "Link thumbnail. Returned defaults: `type: icon`, `style: style-1`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "icon"
                        ]
                      },
                      "image": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "URL of a file in the workspace's media library.",
                        "maxLength": 2048
                      },
                      "icon": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 64
                      },
                      "style": {
                        "type": "string",
                        "enum": [
                          "style-1",
                          "style-2"
                        ]
                      }
                    }
                  },
                  "highlight": {
                    "type": "object",
                    "description": "Link highlight.",
                    "properties": {
                      "animation": {
                        "type": "string",
                        "enum": [
                          "none",
                          "pulse",
                          "shake",
                          "glow"
                        ]
                      },
                      "pinned": {
                        "type": "boolean",
                        "description": "Only one pinned link per page."
                      }
                    }
                  },
                  "translations": {
                    "$ref": "#/components/schemas/LinkPageLinkTranslations"
                  }
                }
              },
              "example": {
                "type": "url",
                "title": "Mon site",
                "data": {
                  "url": "https://example.com"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Link created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LinkPageLink"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/link-pages/{linkPage}/links/reorder": {
      "patch": {
        "tags": [
          "Link pages"
        ],
        "operationId": "reorderLinkPageLinks",
        "summary": "Reorder a page's links",
        "description": "Sets the order of the links: `order` lists the link ULIDs in the new order. Returns the page's links in that order.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "order"
                ],
                "properties": {
                  "order": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "ulid",
                      "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
                    },
                    "minItems": 1
                  }
                }
              },
              "example": {
                "order": [
                  "01J9ZQ0K7TQ3P8W2M5N6R4S1VX",
                  "01ARZ3NDEKTSV4RRFFQ69G5FAV"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Links in the new order",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LinkPageLink"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/link-pages/{linkPage}/links/{link}": {
      "patch": {
        "tags": [
          "Link pages"
        ],
        "operationId": "updateLinkPageLink",
        "summary": "Update a link",
        "description": "Updates a link of the page; all fields are optional (including `type`). The `form` type does not exist: 422.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          },
          {
            "$ref": "#/components/parameters/LinkId"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "url",
                      "text",
                      "image",
                      "map",
                      "youtube",
                      "spotify",
                      "soundcloud",
                      "twitch",
                      "event",
                      "mail",
                      "phone",
                      "discord",
                      "hours",
                      "file",
                      "menu"
                    ]
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Payload depending on `type` (same rules as in the application; URLs are checked against unsafe addresses)."
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requires `resources.protection`."
                  },
                  "expire_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requires `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Requires `resources.protection`. Never returned (`has_password`).",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "thumbnail": {
                    "type": "object",
                    "description": "Link thumbnail. Returned defaults: `type: icon`, `style: style-1`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "icon"
                        ]
                      },
                      "image": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "URL of a file in the workspace's media library.",
                        "maxLength": 2048
                      },
                      "icon": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 64
                      },
                      "style": {
                        "type": "string",
                        "enum": [
                          "style-1",
                          "style-2"
                        ]
                      }
                    }
                  },
                  "highlight": {
                    "type": "object",
                    "description": "Link highlight.",
                    "properties": {
                      "animation": {
                        "type": "string",
                        "enum": [
                          "none",
                          "pulse",
                          "shake",
                          "glow"
                        ]
                      },
                      "pinned": {
                        "type": "boolean",
                        "description": "Only one pinned link per page."
                      }
                    }
                  },
                  "translations": {
                    "$ref": "#/components/schemas/LinkPageLinkTranslations"
                  }
                }
              },
              "example": {
                "title": "Nouveau titre"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Link updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LinkPageLink"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "delete": {
        "tags": [
          "Link pages"
        ],
        "operationId": "deleteLinkPageLink",
        "summary": "Delete a link",
        "description": "Deletes the link from the page.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          },
          {
            "$ref": "#/components/parameters/LinkId"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/link-pages/{linkPage}/links/{link}/active": {
      "patch": {
        "tags": [
          "Link pages"
        ],
        "operationId": "setLinkPageLinkActive",
        "summary": "Activate or deactivate a link",
        "description": "Activates or deactivates a link without touching anything else.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          },
          {
            "$ref": "#/components/parameters/LinkId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "is_active"
                ],
                "properties": {
                  "is_active": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "is_active": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Link updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LinkPageLink"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/analytics": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "operationId": "getAnalytics",
        "summary": "Workspace statistics",
        "description": "Aggregates for all resources in the token's workspace over the period. Aggregates only: no IP, IP fingerprint or user agent. Without `analytics.breakdowns` in the plan, the `by_*` rankings are empty and `locked.breakdowns` is `true` (200, not 402).",
        "x-required-scope": "analytics:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/AnalyticsPeriod"
          },
          {
            "$ref": "#/components/parameters/AnalyticsFrom"
          },
          {
            "$ref": "#/components/parameters/AnalyticsTo"
          },
          {
            "$ref": "#/components/parameters/AnalyticsGranularity"
          },
          {
            "$ref": "#/components/parameters/AnalyticsStream"
          },
          {
            "$ref": "#/components/parameters/AnalyticsCompare"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Analytics"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/analytics/{type}/{id}": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "operationId": "getResourceAnalytics",
        "summary": "Statistics of a resource",
        "description": "Aggregates for a QR code, a link page or a short link in the token's workspace. A resource from another workspace, or an unknown `type`, returns 404. Same `locked` rule as `GET /analytics`.",
        "x-required-scope": "analytics:read",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "qr-codes",
                "link-pages",
                "short-links"
              ]
            },
            "description": "Resource type."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "ulid",
              "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
            },
            "description": "ULID of the resource."
          },
          {
            "$ref": "#/components/parameters/AnalyticsPeriod"
          },
          {
            "$ref": "#/components/parameters/AnalyticsFrom"
          },
          {
            "$ref": "#/components/parameters/AnalyticsTo"
          },
          {
            "$ref": "#/components/parameters/AnalyticsGranularity"
          },
          {
            "$ref": "#/components/parameters/AnalyticsStream"
          },
          {
            "$ref": "#/components/parameters/AnalyticsCompare"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ResourceAnalytics"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/link-pages/{linkPage}/links/analytics": {
      "get": {
        "tags": [
          "Statistics"
        ],
        "operationId": "getLinkPageLinksAnalytics",
        "summary": "Clicks per link of a page",
        "description": "All-time click count per link, keyed by link ULID (links with no clicks are omitted: an absent ULID means 0). Without `analytics.breakdowns` in the plan, `data` is empty and `locked` is `true` (200, not 402). Declared before `/links/{link}`: `analytics` is not a link ULID.",
        "x-required-scope": "analytics:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "locked"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      },
                      "example": {
                        "01J9ZQ0K7TQ3P8W2M5N6R4S1VX": 42
                      }
                    },
                    "locked": {
                      "type": "boolean",
                      "description": "`true` if the plan does not include `analytics.breakdowns`."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhooks",
        "summary": "List webhooks",
        "description": "The workspace's webhooks, newest first, not paginated. `meta` gives the monthly cap on visit events, the maximum number of webhooks per workspace (10) and the availability of the feature.",
        "x-required-scope": "webhooks:manage",
        "responses": {
          "200": {
            "description": "List of webhooks",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEndpoint"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "$ref": "#/components/schemas/WebhookUsage"
                        },
                        "max_endpoints": {
                          "type": "integer",
                          "example": 10
                        },
                        "feature_available": {
                          "type": "boolean",
                          "description": "The workspace's plan includes the API (`api.access`)."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "createWebhook",
        "summary": "Create a webhook",
        "description": "Adds a webhook to the workspace (10 at most). The signing secret (`whsec_…`) is returned only here, once: store it. Limited to 20 requests per minute.\n\n402 without `api.access`. 422: `code: too_many_webhooks` beyond 10 webhooks, `code: webhook_url_not_public` for a non-public address (or one that does not resolve); otherwise per-field validation.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "events"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Public HTTPS address (port 443 or 1024–65535, no credentials, outside Hyllo domains). The returned address is normalized (lowercase host, no trailing dot). Ranges rejected, in addition to private, local and reserved addresses: `2002::/16`, `2001::/32`, `fec0::/10`; no proxy is used. ASCII hosts only: an internationalized name is written in punycode (`xn--…`), otherwise 422 `webhook_url_not_public`. Rejected if it resolves to a private address: 422 `webhook_url_not_public`.",
                    "example": "https://example.com/hooks/hyllo"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "uniqueItems": true,
                    "items": {
                      "$ref": "#/components/schemas/WebhookSubscribableEvent"
                    }
                  },
                  "batch_visits": {
                    "type": "boolean",
                    "default": false,
                    "description": "Groups visit events into `visits.batch`."
                  }
                }
              },
              "example": {
                "url": "https://example.com/hooks/hyllo",
                "description": "Zapier",
                "events": [
                  "short_link.created",
                  "qr_code.scanned"
                ],
                "batch_visits": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook created",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEndpoint"
                    },
                    "secret": {
                      "type": "string",
                      "example": "whsec_4f8kQ2mZ7xT1pVbN9cLr3sHdYw6AeJu0",
                      "description": "Signing secret, shown only once."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhookEvents",
        "summary": "Event catalog",
        "description": "Event types a webhook can subscribe to. `visits.batch` and `webhook.test` are sent but cannot be subscribed to. Payload of each type: see the \"Webhooks\" section of the general description and the `WebhookEvent*` schemas (guide: `/developers/reference/events`).",
        "x-required-scope": "webhooks:manage",
        "responses": {
          "200": {
            "description": "Catalog",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEventCatalogItem"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/{webhook}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "getWebhook",
        "summary": "Get a webhook",
        "description": "The secret is never returned.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEndpoint"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "updateWebhook",
        "summary": "Update a webhook",
        "description": "Updates the address, description, events, batching or state. Reactivating a deactivated webhook (`is_active: true`) resets `failing_since` and `disabled_reason` to `null`. Changes of `url` (each resolved on the spot) are limited to 20 per minute per account, a counter shared with the application: every request that carries `url` counts, even with the current value; beyond that, 429 `rate_limited` with `Retry-After`. Requests without `url` are not counted. 402 without `api.access`. 403 `code: staff_disabled` for `is_active: true` or a change of `url` on a webhook cut off by Hyllo staff (`disabled_reason: staff`), which sends nothing anymore.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Every field is optional; a field that is present follows the creation rules.",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Public HTTPS address (port 443 or 1024–65535, no credentials, outside Hyllo domains). The returned address is normalized (lowercase host, no trailing dot). Ranges rejected, in addition to private, local and reserved addresses: `2002::/16`, `2001::/32`, `fec0::/10`; no proxy is used. ASCII hosts only: an internationalized name is written in punycode (`xn--…`), otherwise 422 `webhook_url_not_public`. Rejected if it resolves to a private address: 422 `webhook_url_not_public`.",
                    "example": "https://example.com/hooks/hyllo"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "events": {
                    "type": "array",
                    "minItems": 1,
                    "uniqueItems": true,
                    "items": {
                      "$ref": "#/components/schemas/WebhookSubscribableEvent"
                    }
                  },
                  "batch_visits": {
                    "type": "boolean",
                    "default": false,
                    "description": "Groups visit events into `visits.batch`."
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Reactivating (`true`) resets `failing_since` and `disabled_reason` to `null`."
                  }
                }
              },
              "example": {
                "events": [
                  "short_link.created"
                ],
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook updated",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEndpoint"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "deleteWebhook",
        "summary": "Delete a webhook",
        "description": "Deletes the webhook and its log. Allowed without `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/{webhook}/secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "rotateWebhookSecret",
        "summary": "Rotate the secret",
        "description": "Generates a new secret, returned only once. The old one stays valid for 24 h: during that time every delivery carries two `v1=` signatures (the new one first). 402 without `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "New secret",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret": {
                      "type": "string",
                      "example": "whsec_4f8kQ2mZ7xT1pVbN9cLr3sHdYw6AeJu0"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/{webhook}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "testWebhook",
        "summary": "Send a test event",
        "description": "Sends `webhook.test` **synchronously** (5 s at most) and returns the delivery as it ended (`succeeded` or `failed`, with `response_status` or `error`). Never retried; changes neither `failing_since` nor `last_*`. Allowed on a webhook deactivated by an admin; 403 `code: staff_disabled` if it was deactivated by Hyllo staff (it sends nothing anymore, tests included). 10 requests per minute. 402 without `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Test delivery",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/{webhook}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhookDeliveries",
        "summary": "Delivery log",
        "description": "The webhook's deliveries, most recent first, 25 per page, kept for 30 days. Without `request_body` (see the detail of a delivery).",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "succeeded",
                "failed",
                "skipped"
              ]
            },
            "description": "Keeps only deliveries with this status."
          }
        ],
        "responses": {
          "200": {
            "description": "Page of deliveries",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "links": {
                      "$ref": "#/components/schemas/PaginationLinks"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationMeta"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/{webhook}/deliveries/{delivery}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "getWebhookDelivery",
        "summary": "Delivery detail",
        "description": "The delivery, with `request_body`: the exact payload of the event.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/webhooks/{webhook}/deliveries/{delivery}/resend": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "resendWebhookDelivery",
        "summary": "Resend a delivery",
        "description": "Queues a new delivery (manual, `is_manual: true`) of the same event, with the same `Hyllo-Event-Id`; it does not count against the monthly cap. 403 `code: staff_disabled` if the webhook was cut off by Hyllo staff. 30 requests per minute. 402 without `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          }
        ],
        "responses": {
          "202": {
            "description": "New delivery queued",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PlanRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "webhooks": {
    "short_link.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkCreated",
        "summary": "short_link.created",
        "description": "A short link has just been created.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventShortLinkCreated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "short_link.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkUpdated",
        "summary": "short_link.updated",
        "description": "A short link was updated. Changes made in quick succession (sections saved one by one) are grouped into a single event sent about 30 s after the last one, with the state at that moment; nothing is sent if the link was deleted in the meantime.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventShortLinkUpdated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "short_link.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkDeleted",
        "summary": "short_link.deleted",
        "description": "A short link was deleted: `data.resource` keeps only its reference `{ type, id, name }`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventShortLinkDeleted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "short_link.expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkExpired",
        "summary": "short_link.expired",
        "description": "A short link reached its expiration date (detected every 5 minutes, only once). The `evt_…` identifier is deterministic for (resource, `expires_at`): a replay keeps the same `Hyllo-Event-Id`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventShortLinkExpired"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "qr_code.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeCreated",
        "summary": "qr_code.created",
        "description": "A QR code has just been created.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventQrCodeCreated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "qr_code.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeUpdated",
        "summary": "qr_code.updated",
        "description": "A QR code was updated (grouping and 30 s delay as for `short_link.updated`).\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventQrCodeUpdated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "qr_code.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeDeleted",
        "summary": "qr_code.deleted",
        "description": "A QR code was deleted: `data.resource` keeps only its reference `{ type, id, name }`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventQrCodeDeleted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "qr_code.expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeExpired",
        "summary": "qr_code.expired",
        "description": "A QR code reached its expiration date. The `evt_…` identifier is deterministic for (resource, `expires_at`): a replay keeps the same `Hyllo-Event-Id`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventQrCodeExpired"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "link_page.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageCreated",
        "summary": "link_page.created",
        "description": "A link page has just been created.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventLinkPageCreated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "link_page.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageUpdated",
        "summary": "link_page.updated",
        "description": "A link page was updated, including one of its links (created, updated or deleted). Grouping and 30 s delay as for `short_link.updated`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventLinkPageUpdated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "link_page.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageDeleted",
        "summary": "link_page.deleted",
        "description": "A link page was deleted: `data.resource` keeps only its reference `{ type, id, name }`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventLinkPageDeleted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "link_page.expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageExpired",
        "summary": "link_page.expired",
        "description": "A link page reached its expiration date. The `evt_…` identifier is deterministic for (resource, `expires_at`): a replay keeps the same `Hyllo-Event-Id`.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventLinkPageExpired"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "visit_limit.reached": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookVisitLimitReached",
        "summary": "visit_limit.reached",
        "description": "A resource reached its visit limit (`max_visits`). Sent once per count: resetting the count or setting a new `max_visits` allows a new event.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventVisitLimitReached"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "alert.triggered": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookAlertTriggered",
        "summary": "alert.triggered",
        "description": "A statistics alert was triggered (threshold, increase or decrease), after the notification was sent.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventAlertTriggered"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "qr_code.scanned": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeScanned",
        "summary": "qr_code.scanned",
        "description": "A dynamic QR code was scanned. Counts toward the monthly cap; bots excluded.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventQrCodeScanned"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "short_link.clicked": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkClicked",
        "summary": "short_link.clicked",
        "description": "A short link was opened. Counts toward the monthly cap; bots excluded.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventShortLinkClicked"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "link_page.viewed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageViewed",
        "summary": "link_page.viewed",
        "description": "A link page was viewed. Counts toward the monthly cap; bots excluded.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventLinkPageViewed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "link.clicked": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkClicked",
        "summary": "link.clicked",
        "description": "A link on a link page was clicked. Counts toward the monthly cap; bots excluded.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventLinkClicked"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "visits.batch": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookVisitsBatch",
        "summary": "visits.batch",
        "description": "Grouped visits (webhook with `batch_visits`): up to 500 visit events in `data.events`. Never subscribed to explicitly: sent instead of individual visit events. Guarantee: at most once — if the sending process stops between picking up the visits and recording them, that batch is lost.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventVisitsBatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookWebhookTest",
        "summary": "webhook.test",
        "description": "Test event sent by `POST /webhooks/{webhook}/test`. Never subscribed to, never retried.\n\nExpected response: any 2xx status within 5 s. Any other status, a timeout or a network error triggers a retry.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/HylloSignature"
          },
          {
            "$ref": "#/components/parameters/HylloEventId"
          },
          {
            "$ref": "#/components/parameters/HylloEventType"
          },
          {
            "$ref": "#/components/parameters/HylloDeliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventWebhookTest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received (any 2xx status is fine)."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "hyl_…",
        "description": "Personal workspace token (`hyl_…`) created in the application: `Authorization: Bearer hyl_…`."
      }
    },
    "headers": {
      "XRateLimitLimit": {
        "description": "Requests allowed per minute for the tightest limit (token, or the whole workspace).",
        "schema": {
          "type": "integer",
          "example": 120
        }
      },
      "XRateLimitRemaining": {
        "description": "Requests remaining in the current minute for the tightest limit.",
        "schema": {
          "type": "integer",
          "example": 117
        }
      },
      "XRateLimitReset": {
        "description": "Time (Unix timestamp, in seconds) at which the tightest limit resets.",
        "schema": {
          "type": "integer",
          "example": 1790000000
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying (429 responses).",
        "schema": {
          "type": "integer",
          "example": 23
        }
      },
      "IdempotentReplayed": {
        "description": "`true` when the response is a copy of the one returned for a first request carrying the same `Idempotency-Key`.",
        "schema": {
          "type": "string",
          "enum": [
            "true"
          ]
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^[\\x20-\\x7E]{1,255}$"
        },
        "example": "a3f5c1d2-0b7e-4c9a-9a51-6d2f1b8e7c40",
        "description": "Makes a creation replayable without duplicates. 1 to 255 printable ASCII characters (otherwise 422 with `errors.idempotency_key`). Replayed with the same key and the same body, the request returns the original response (`Idempotent-Replayed: true` header) for 24 h, without creating anything again. Same key with a different request: 422 `idempotency_key_mismatch`. Same key while the first request is still running: 409 `idempotency_in_progress`. Only successful responses are kept. The key is scoped to the token."
      },
      "Page": {
        "name": "page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "PerPage": {
        "name": "per_page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 15
        }
      },
      "Search": {
        "name": "search",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 3,
          "maxLength": 255
        },
        "description": "Text search (at least 3 characters)."
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "recent",
            "updated",
            "name",
            "visits"
          ],
          "default": "recent"
        },
        "description": "`recent`: most recent first; `updated`: last modified first; `name`: name or title, alphabetical; `visits`: most visited (all time) first."
      },
      "Domain": {
        "name": "domain",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "hyllo",
        "description": "`hyllo`: resources served on Hyllo's domain; ULID of one of the workspace's custom domains: those served on that domain. Omitted: all. Domain unknown to the workspace: 422."
      },
      "AnalyticsPeriod": {
        "name": "period",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "today",
            "yesterday",
            "last_7_days",
            "last_30_days",
            "last_3_months",
            "last_year",
            "last_2_years",
            "custom"
          ],
          "default": "last_30_days"
        },
        "description": "Analysis period. `custom` requires `from` and `to` and the plan's `analytics.custom_range` feature (402 otherwise). Periods are clamped to the plan's retention period."
      },
      "AnalyticsFrom": {
        "name": "from",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-01-01",
        "description": "Start `YYYY-MM-DD`. Required if `period=custom`; not before the plan's retention limit."
      },
      "AnalyticsTo": {
        "name": "to",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-01-31",
        "description": "End `YYYY-MM-DD`, not earlier than `from`. Required if `period=custom`."
      },
      "AnalyticsGranularity": {
        "name": "granularity",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "hour",
            "day",
            "week",
            "month"
          ]
        },
        "description": "Granularity of `timeline`. Omitted: derived from the period (up to 1 day: `hour`; up to 60 days: `day`; up to 180 days: `week`; beyond: `month`)."
      },
      "AnalyticsStream": {
        "name": "stream",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "visit",
            "interaction"
          ],
          "default": "visit"
        },
        "description": "`visit`: visits to the resource; `interaction`: clicks on a link page's links."
      },
      "AnalyticsCompare": {
        "name": "compare",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "previous_period",
            "previous_year",
            "1",
            "0"
          ],
          "default": "0"
        },
        "description": "`previous_period` (same duration, ending the day before) or `previous_year` (same dates one year earlier): returns `comparison` and `previous_timeline`. `1` means `previous_period`. Requires `analytics.custom_range` (402 otherwise)."
      },
      "ShortLinkId": {
        "name": "shortLink",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of the short link."
      },
      "QrCodeId": {
        "name": "qrCode",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of the QR code."
      },
      "LinkPageId": {
        "name": "linkPage",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of the link page."
      },
      "LinkId": {
        "name": "link",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of the link, which must belong to the page (otherwise 404)."
      },
      "WebhookId": {
        "name": "webhook",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of the webhook."
      },
      "WebhookDeliveryId": {
        "name": "delivery",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of the delivery, which must belong to the webhook (otherwise 404)."
      },
      "HylloSignature": {
        "name": "Hyllo-Signature",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "t=1790000000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
        },
        "description": "`t=<Unix timestamp>,v1=<hex HMAC-SHA256>`. `t` changes on every delivery attempt. Two `v1=` values during the 24 h following a secret rotation (the new one first): accept if either matches. Verification: see \"Verifying the signature\" in the \"Webhooks\" section of the general description (guide: `/developers/webhooks#verify-signature`)."
      },
      "HylloEventId": {
        "name": "Hyllo-Event-Id",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "evt_01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "Event identifier, equal to `id` in the body. Stable across retries: use it to deduplicate."
      },
      "HylloEventType": {
        "name": "Hyllo-Event-Type",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "short_link.created"
        },
        "description": "Event type, equal to `type` in the body."
      },
      "HylloDeliveryId": {
        "name": "Hyllo-Delivery-Id",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID of this delivery (changes on every manual resend)."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Token missing, unknown, expired or revoked (`code: invalid_token`). Also returned when the token's creator has left the workspace. Rejections are counted per IP (30 per minute): beyond that, 429.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorInvalidToken"
            }
          }
        }
      },
      "PlanRequired": {
        "description": "The workspace's plan does not include API access (`feature: api.access`), or the requested plan entitlement is missing or its quota is reached: `plan_required`, `quota_reached` or `plan_restricted` (resource read-only after a downgrade).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PlanRestriction"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Missing scope (`code: insufficient_scope`, with `required_scope`), or action refused by the role of the token's creator in the workspace (viewer, invited member under Business: read-only).",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorInsufficientScope"
                },
                {
                  "$ref": "#/components/schemas/ErrorForbidden"
                }
              ]
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown resource, or one belonging to a workspace other than the token's (never 403: existence is not revealed).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "`idempotency_in_progress`: a request carrying the same `Idempotency-Key` is still running.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "Validation failed (`errors` per field). Special cases: `code: field_not_available` for a field that does not exist in the public API (`folderId`, `folder_id`, `organization`, `folder`); `code: idempotency_key_mismatch` for an `Idempotency-Key` reused with a different request (no `errors`).",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorValidation"
                },
                {
                  "$ref": "#/components/schemas/ErrorFieldNotAvailable"
                },
                {
                  "$ref": "#/components/schemas/Error"
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Limit reached (`code: rate_limited`): per token, for all of the workspace's tokens combined, or a route's own limit (QR code export, `POST /webhooks`, `PATCH /webhooks/{webhook}` with `url`, `POST /webhooks/{webhook}/test`, `…/resend`). Wait `Retry-After` seconds. The `X-RateLimit-*` headers are present; `X-RateLimit-Reset` follows the limiter whose `X-RateLimit-Remaining` is the lowest.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "Too many requests. Try again in a moment."
          },
          "code": {
            "type": "string",
            "description": "Stable code: test it rather than `message`.",
            "example": "rate_limited"
          }
        }
      },
      "ErrorInvalidToken": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "Invalid, expired or revoked API token."
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_token"
            ]
          }
        }
      },
      "ErrorInsufficientScope": {
        "type": "object",
        "required": [
          "message",
          "code",
          "required_scope"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "This token does not have the short_links:write permission."
          },
          "code": {
            "type": "string",
            "enum": [
              "insufficient_scope"
            ]
          },
          "required_scope": {
            "$ref": "#/components/schemas/ApiScope"
          }
        }
      },
      "ErrorForbidden": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "This action is unauthorized."
          }
        }
      },
      "ErrorValidation": {
        "type": "object",
        "required": [
          "message",
          "errors"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "The url field is required."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "example": {
              "url": [
                "The url field is required."
              ]
            }
          }
        }
      },
      "ErrorFieldNotAvailable": {
        "type": "object",
        "required": [
          "message",
          "code",
          "errors"
        ],
        "properties": {
          "message": {
            "type": "string",
            "example": "Validation failed."
          },
          "code": {
            "type": "string",
            "enum": [
              "field_not_available"
            ]
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "One entry per rejected field: `folderId` (link pages, QR code update), `folder_id` (short links), `organization` (QR code update), `folder` (list filter).",
            "example": {
              "folderId": [
                "This field is not available through the public API."
              ]
            }
          }
        }
      },
      "ApiScope": {
        "type": "string",
        "description": "Permission of a token. A `write` scope also grants the `read` scope of its family: the token stores both (`short_links:write` grants `short_links:read`, and likewise for `qr_codes` and `link_pages`).",
        "enum": [
          "short_links:read",
          "short_links:write",
          "qr_codes:read",
          "qr_codes:write",
          "link_pages:read",
          "link_pages:write",
          "analytics:read",
          "webhooks:manage"
        ]
      },
      "PlanRestriction": {
        "type": "object",
        "description": "Refusal of a workspace plan entitlement, returned as **402**. `plan_required`: the feature is not included; `quota_reached`: the limit is reached; `plan_restricted`: the resource was made read-only by a downgrade.",
        "properties": {
          "message": {
            "type": "string",
            "example": "This feature requires the Business plan."
          },
          "code": {
            "type": "string",
            "enum": [
              "plan_required",
              "quota_reached",
              "plan_restricted"
            ]
          },
          "feature": {
            "type": "string",
            "example": "members.included",
            "description": "Feature or quota refused"
          },
          "required_plan": {
            "type": [
              "string",
              "null"
            ],
            "example": "business",
            "description": "The cheapest of the plans on sale that grants it"
          },
          "addon": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "dynamic_qr_codes",
              "storage",
              "link_pages",
              "short_links",
              "custom_domain",
              "member",
              null
            ],
            "example": "storage",
            "description": "Add-on whose packs would lift the quota; `null` if none applies"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "example": 5
          },
          "usage": {
            "type": [
              "integer",
              "null"
            ],
            "example": 5
          }
        }
      },
      "PaginationLinks": {
        "type": "object",
        "description": "URLs of neighboring pages (`null` when there is none).",
        "required": [
          "first",
          "last",
          "prev",
          "next"
        ],
        "properties": {
          "first": {
            "type": [
              "string",
              "null"
            ]
          },
          "last": {
            "type": [
              "string",
              "null"
            ]
          },
          "prev": {
            "type": [
              "string",
              "null"
            ]
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PaginationMeta": {
        "type": "object",
        "required": [
          "current_page",
          "last_page",
          "per_page",
          "total"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "example": 1
          },
          "from": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_page": {
            "type": "integer",
            "example": 3
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "active": {
                  "type": "boolean"
                }
              }
            },
            "description": "Navigation links."
          },
          "path": {
            "type": "string"
          },
          "per_page": {
            "type": "integer",
            "example": 15
          },
          "to": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "example": 42
          }
        }
      },
      "ShortUrlDomain": {
        "oneOf": [
          {
            "type": "object",
            "description": "Custom domain on which the short URL is served, chosen at creation and never changed. `null`: Hyllo's domain.",
            "required": [
              "id",
              "hostname"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01J9ZQ0K7TQ3P8W2M5N6R4S1VX"
              },
              "hostname": {
                "type": "string",
                "example": "go.client.com"
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "FolderRef": {
        "oneOf": [
          {
            "type": "object",
            "description": "Folder the resource was created in; `null`: at the root. Folders are not managed by the public API: the field is read-only.",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
              },
              "name": {
                "type": "string"
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "ResourceAccess": {
        "type": "object",
        "description": "Rights of the token's creator on the resource, depending on their role in the workspace. The public API exposes neither sharing nor filing into folders.",
        "required": [
          "is_owner",
          "can_edit",
          "can_delete",
          "can_share",
          "can_organize"
        ],
        "properties": {
          "is_owner": {
            "type": "boolean",
            "description": "`true` if the token's creator created the resource."
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_delete": {
            "type": "boolean"
          },
          "can_share": {
            "type": "boolean"
          },
          "can_organize": {
            "type": "boolean"
          }
        }
      },
      "PlanRestrictionState": {
        "oneOf": [
          {
            "type": "object",
            "description": "Resource read-only or blocked after a plan downgrade; `null` otherwise. Any modification then returns 402 `plan_restricted`.",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "restricted",
                  "blocked"
                ]
              },
              "since": {
                "type": "string",
                "format": "date-time"
              },
              "deletes_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Planned deletion; set once the resource is blocked."
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "ShortLink": {
        "type": "object",
        "description": "Short link. The code and the destination are immutable after creation.",
        "required": [
          "id",
          "title",
          "url",
          "open_in_app",
          "short",
          "domain",
          "short_url",
          "publish_at",
          "is_scheduled",
          "expires_at",
          "is_expired",
          "has_password",
          "max_visits",
          "counted_visits",
          "is_visit_limit_reached",
          "visits_count",
          "unique_visitors_count",
          "plan_restriction",
          "access",
          "folder",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/promo"
          },
          "open_in_app": {
            "type": "boolean",
            "description": "Opens the destination in its native app when its host is known."
          },
          "short": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short code.",
            "example": "Ab3xK9zQ"
          },
          "domain": {
            "$ref": "#/components/schemas/ShortUrlDomain"
          },
          "short_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://hyllo.fr/Ab3xK9zQ"
          },
          "publish_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "is_scheduled": {
            "type": "boolean"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "is_expired": {
            "type": "boolean"
          },
          "has_password": {
            "type": "boolean"
          },
          "max_visits": {
            "type": [
              "integer",
              "null"
            ]
          },
          "counted_visits": {
            "type": "integer",
            "description": "Visits since the limit was enabled or reset (≠ `visits_count`, all time)."
          },
          "is_visit_limit_reached": {
            "type": "boolean"
          },
          "visits_count": {
            "type": "integer",
            "description": "All-time visits; 0 right after creation."
          },
          "unique_visitors_count": {
            "type": "integer"
          },
          "visits_series": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List (`GET /short-links`) only: visits per day over 30 days, oldest first, today last. Absent from other responses."
          },
          "plan_restriction": {
            "$ref": "#/components/schemas/PlanRestrictionState"
          },
          "access": {
            "$ref": "#/components/schemas/ResourceAccess"
          },
          "folder": {
            "$ref": "#/components/schemas/FolderRef"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ShortLinkBulkFailure": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "Position of the line in `urls`."
          },
          "input": {
            "type": [
              "string",
              "null"
            ],
            "description": "Line as received."
          },
          "reason": {
            "type": "string",
            "enum": [
              "empty",
              "invalid_url",
              "too_long",
              "blocked"
            ]
          }
        }
      },
      "QRCodeGradient": {
        "type": "object",
        "description": "Gradient applied when `colorMode` is `gradient`.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "linear",
              "radial"
            ]
          },
          "rotation": {
            "type": "number",
            "description": "Rotation in radians."
          },
          "colorStops": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "offset",
                "color"
              ],
              "properties": {
                "offset": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "color": {
                  "type": "string"
                }
              }
            },
            "minItems": 2
          }
        }
      },
      "QRCodeDesign": {
        "type": "object",
        "description": "Appearance of the QR code. On creation, all fields are required if `design` is provided; otherwise the default design of the token's creator (template marked as default, falling back to the base design) is applied. On update, each field is optional and merged with the existing one. Advanced options require `qr.design_advanced` (402 otherwise).",
        "properties": {
          "dots": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "dot",
                  "random-dot",
                  "rounded",
                  "extra-rounded",
                  "vertical-line",
                  "horizontal-line",
                  "classy",
                  "classy-rounded",
                  "square",
                  "small-square",
                  "tiny-square",
                  "diamond",
                  "wave",
                  "heart",
                  "star",
                  "weave",
                  "pentagon",
                  "hexagon",
                  "octagon",
                  "circuit",
                  "zebra-horizontal",
                  "zebra-vertical",
                  "blocks-horizontal",
                  "blocks-vertical",
                  "blobs",
                  "soft"
                ]
              },
              "colorMode": {
                "type": "string",
                "enum": [
                  "solid",
                  "gradient"
                ]
              },
              "color": {
                "type": "string",
                "example": "#000000"
              },
              "gradient": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/QRCodeGradient"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "cornersSquare": {
            "type": "object",
            "properties": {
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "dot",
                  "square",
                  "extra-rounded",
                  "classy",
                  "inpoint",
                  "outpoint",
                  "center-circle",
                  null
                ]
              },
              "colorMode": {
                "type": "string",
                "enum": [
                  "inherit",
                  "solid",
                  "gradient"
                ]
              },
              "color": {
                "type": "string"
              },
              "gradient": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/QRCodeGradient"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "cornersDot": {
            "type": "object",
            "properties": {
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "dot",
                  "square",
                  "heart",
                  "extra-rounded",
                  "classy",
                  "inpoint",
                  "outpoint",
                  "star",
                  "pentagon",
                  "hexagon",
                  "octagon",
                  "diamond",
                  null
                ]
              },
              "colorMode": {
                "type": "string",
                "enum": [
                  "inherit",
                  "solid",
                  "gradient"
                ]
              },
              "color": {
                "type": "string"
              },
              "gradient": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/QRCodeGradient"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "background": {
            "type": "object",
            "properties": {
              "colorMode": {
                "type": "string",
                "enum": [
                  "transparent",
                  "solid",
                  "gradient"
                ]
              },
              "color": {
                "type": "string",
                "example": "#ffffff"
              },
              "gradient": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/QRCodeGradient"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "margin": {
                "type": "integer",
                "minimum": 0
              },
              "borderRadius": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "image": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "src": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL of a file in the workspace's media library (logo).",
                "maxLength": 2048
              },
              "imageSize": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "margin": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "errorCorrectionLevel": {
            "type": "string",
            "enum": [
              "L",
              "M",
              "Q",
              "H"
            ]
          },
          "shape": {
            "type": "string",
            "enum": [
              "square",
              "circle"
            ]
          }
        }
      },
      "QRCodeFrame": {
        "oneOf": [
          {
            "type": "object",
            "description": "Frame around the QR code; `null`: none. On creation, `frameType`, `text` and `element` are required when `frame` is provided; `frame` omitted with a `design` provided: no frame; omitted with `design` omitted: the frame of the default design. All frames require `qr.frames_all` (402 otherwise).",
            "properties": {
              "frameType": {
                "type": "string",
                "description": "Frame identifier."
              },
              "text": {
                "type": "object",
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 500
                },
                "description": "Frame texts, per slot."
              },
              "element": {
                "type": "object",
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": "Values (colors…) of the frame's elements, per element."
              },
              "elementColorMode": {
                "type": "object",
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "solid",
                    "gradient",
                    null
                  ]
                }
              },
              "elementGradient": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/QRCodeGradient"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "QRCode": {
        "type": "object",
        "description": "QR code. Single-read, creation and update responses do not have `visits_count`; the list (`QRCodeListItem`) adds it.",
        "required": [
          "id",
          "name",
          "type",
          "description",
          "content",
          "design",
          "frame",
          "options",
          "plan_restriction",
          "access",
          "folder",
          "tags",
          "domain",
          "short_url",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "`static`: content encoded in the QR code; `dynamic`: QR code served by a short URL, editable without reprinting.",
            "enum": [
              "static",
              "dynamic"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "content": {
            "type": "object",
            "required": [
              "contentType",
              "data"
            ],
            "properties": {
              "contentType": {
                "type": "string",
                "enum": [
                  "url",
                  "text",
                  "email",
                  "phone",
                  "sms",
                  "wifi",
                  "vcard",
                  "event",
                  "link-pages",
                  "stores",
                  "google-review",
                  "gps",
                  "file",
                  "menu"
                ]
              },
              "data": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "design": {
            "$ref": "#/components/schemas/QRCodeDesign"
          },
          "frame": {
            "$ref": "#/components/schemas/QRCodeFrame"
          },
          "options": {
            "type": "object",
            "description": "Availability of the QR code. Protections (dates, password, limit) apply only to dynamic QR codes.",
            "required": [
              "isActive",
              "publishAt",
              "isScheduled",
              "expiresAt",
              "isExpired",
              "hasPassword",
              "maxVisits",
              "countedVisits",
              "isVisitLimitReached"
            ],
            "properties": {
              "isActive": {
                "type": "boolean"
              },
              "publishAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "isScheduled": {
                "type": "boolean"
              },
              "expiresAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "isExpired": {
                "type": "boolean"
              },
              "hasPassword": {
                "type": "boolean"
              },
              "maxVisits": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "countedVisits": {
                "type": "integer"
              },
              "isVisitLimitReached": {
                "type": "boolean"
              }
            }
          },
          "plan_restriction": {
            "$ref": "#/components/schemas/PlanRestrictionState"
          },
          "access": {
            "$ref": "#/components/schemas/ResourceAccess"
          },
          "folder": {
            "$ref": "#/components/schemas/FolderRef"
          },
          "tags": {
            "type": "array",
            "items": {},
            "maxItems": 0,
            "deprecated": true,
            "description": "Deprecated: always `[]`."
          },
          "domain": {
            "$ref": "#/components/schemas/ShortUrlDomain"
          },
          "short_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public short URL; `null` for a `static` QR code.",
            "example": "https://hyllo.fr/Ab3xK9zQ"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QRCodeListItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QRCode"
          },
          {
            "type": "object",
            "properties": {
              "visits_count": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "All-time scans; `null` for a `static` QR code."
              },
              "visits_series": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "integer"
                },
                "description": "Scans per day over 30 days, oldest first, today last; `null` for a `static` QR code."
              }
            }
          }
        ],
        "description": "Item of `GET /qr-codes`: a `QRCode` with `visits_count` and `visits_series` added."
      },
      "PageLanguage": {
        "type": "string",
        "enum": [
          "en",
          "fr",
          "es",
          "de",
          "it",
          "pt",
          "nl",
          "pl",
          "ro",
          "sv"
        ],
        "example": "fr",
        "description": "Language a link page is written in (backlog 3.4): its default language (`locale`) or one of its added languages (`languages`). Latin scripts only, left to right. Distinct from the interface language (`en`, `fr`), the one in `UserResource.locale`."
      },
      "LinkPageTranslations": {
        "type": "object",
        "description": "Translations of a link page, keyed by added language (`PageLanguage`). Each field is optional: on the public page, a missing field falls back to the default language's value (field-by-field fallback).\n\nSilent normalization on save: strings are trimmed, empty strings and `null` are removed, a language that became empty is removed, keys are limited to the page's **added** languages. Always returned as an object, `{}` when empty (never `[]`).",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 255,
              "example": "Marie's place"
            },
            "description": {
              "type": "string",
              "maxLength": 1000,
              "example": "Bistro in Lyon",
              "description": "Translated bio"
            },
            "meta": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "maxLength": 255,
                  "example": "Marie's place in Lyon"
                },
                "description": {
                  "type": "string",
                  "maxLength": 500,
                  "example": "Book a table"
                }
              }
            }
          }
        },
        "example": {
          "en": {
            "title": "Marie's place",
            "description": "Bistro in Lyon",
            "meta": {
              "title": "Marie's place in Lyon",
              "description": "Book a table"
            }
          },
          "de": {
            "title": "Bei Marie"
          }
        }
      },
      "LinkPageLinkTranslations": {
        "type": "object",
        "description": "Translations of a link page link, keyed by the page's added language (`PageLanguage`). Every link translates its `title`; `data` carries only the translatable keys of its type:\n\n| Type | `data` keys |\n|------|----------------|\n| `text` | `text` |\n| `event` | `summary`, `description` |\n| `mail` | `subject`, `message` |\n\nOther types translate only `title`. Same normalization as `LinkPageTranslations`, plus the `data` keys limited to the link's type. Always returned as an object, `{}` when empty (never `[]`).",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 255,
              "example": "Write to us"
            },
            "data": {
              "type": "object",
              "description": "Translatable keys of the link's type; on the public page, each replaces its counterpart in `data`, the others keep their value",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "`text` link"
                },
                "summary": {
                  "type": "string",
                  "maxLength": 255,
                  "description": "`event` link"
                },
                "description": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "`event` link"
                },
                "subject": {
                  "type": "string",
                  "maxLength": 255,
                  "description": "`mail` link"
                },
                "message": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "`mail` link"
                }
              }
            }
          }
        },
        "example": {
          "en": {
            "title": "Write to us",
            "data": {
              "subject": "Hello",
              "message": "Hi Marie,"
            }
          }
        }
      },
      "SocialLink": {
        "type": "object",
        "required": [
          "type",
          "url",
          "position"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "x",
              "facebook",
              "instagram",
              "linkedin",
              "github",
              "youtube",
              "tiktok",
              "twitch",
              "spotify",
              "soundcloud",
              "bluesky",
              "threads",
              "discord",
              "whatsapp",
              "telegram",
              "messenger",
              "wechat",
              "line",
              "signal",
              "dribbble",
              "ko-fi",
              "snapchat",
              "kickstarter",
              "patreon",
              "pinterest",
              "reddit",
              "google-review",
              "custom"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2048
          },
          "position": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "LinkPageLink": {
        "type": "object",
        "description": "Link page link. The `form` type does not exist: 422.",
        "required": [
          "id",
          "type",
          "title",
          "data",
          "position",
          "is_active",
          "publish_at",
          "expire_at",
          "has_password",
          "thumbnail",
          "highlight",
          "translations",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "type": {
            "type": "string",
            "enum": [
              "url",
              "text",
              "image",
              "map",
              "youtube",
              "spotify",
              "soundcloud",
              "twitch",
              "event",
              "mail",
              "phone",
              "discord",
              "hours",
              "file",
              "menu"
            ]
          },
          "title": {
            "type": "string",
            "description": "`\"\"` when empty."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Payload depending on `type` (same rules as in the application). For `file` and `menu` in `pdf` mode, the response adds the file's `url`, `fileName`, `mime` and `size`."
          },
          "position": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean"
          },
          "publish_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expire_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "has_password": {
            "type": "boolean"
          },
          "thumbnail": {
            "type": "object",
            "description": "Link thumbnail. Returned defaults: `type: icon`, `style: style-1`.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "icon"
                ]
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL of a file in the workspace's media library.",
                "maxLength": 2048
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 64
              },
              "style": {
                "type": "string",
                "enum": [
                  "style-1",
                  "style-2"
                ]
              }
            }
          },
          "highlight": {
            "type": "object",
            "description": "Link highlight.",
            "properties": {
              "animation": {
                "type": "string",
                "enum": [
                  "none",
                  "pulse",
                  "shake",
                  "glow"
                ]
              },
              "pinned": {
                "type": "boolean",
                "description": "Only one pinned link per page."
              }
            }
          },
          "translations": {
            "$ref": "#/components/schemas/LinkPageLinkTranslations"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LinkPageTheme": {
        "type": "object",
        "additionalProperties": true,
        "description": "Page theme: the `background`, `buttons`, `avatar`, `heading` and `footer` sections are free-form objects, returned as saved (the simplest approach: read a page's theme and send it back modified). Advanced options require `link_pages.design_advanced` (402 otherwise).",
        "properties": {
          "key": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "colorsTheme": {
            "type": "string",
            "enum": [
              "light",
              "dark"
            ]
          },
          "background": {
            "type": "object",
            "additionalProperties": true
          },
          "buttons": {
            "type": "object",
            "additionalProperties": true
          },
          "avatar": {
            "type": "object",
            "additionalProperties": true
          },
          "heading": {
            "type": "object",
            "additionalProperties": true
          },
          "footer": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "LinkPage": {
        "type": "object",
        "description": "Link page. The page password is never returned.",
        "required": [
          "id",
          "short",
          "domain",
          "title",
          "description",
          "meta",
          "avatar",
          "links",
          "socialLinks",
          "theme",
          "hasPagePassword",
          "hasPageLockType",
          "shouldNoIndex",
          "isSensitive",
          "locale",
          "languages",
          "translations",
          "isLogoVisible",
          "isActive",
          "publishAt",
          "isScheduled",
          "expiresAt",
          "isExpired",
          "plan_restriction",
          "access",
          "folder",
          "short_url",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "short": {
            "type": [
              "string",
              "null"
            ],
            "description": "Page code.",
            "example": "chez-marie"
          },
          "domain": {
            "$ref": "#/components/schemas/ShortUrlDomain"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "`\"\"` when empty."
          },
          "meta": {
            "type": "object",
            "description": "SEO metadata. Changing it requires `link_pages.seo` (402 otherwise).",
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              }
            }
          },
          "avatar": {
            "type": "object",
            "description": "Page avatar. Returned default: `type: icon`.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "icon"
                ]
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 2048
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 64
              }
            }
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LinkPageLink"
            },
            "description": "Links of the page, sorted by position."
          },
          "socialLinks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/SocialLink"
            }
          },
          "theme": {
            "$ref": "#/components/schemas/LinkPageTheme"
          },
          "hasPagePassword": {
            "type": "boolean"
          },
          "hasPageLockType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stored value, read-only in the public API."
          },
          "shouldNoIndex": {
            "type": "boolean"
          },
          "isSensitive": {
            "type": "boolean"
          },
          "locale": {
            "$ref": "#/components/schemas/PageLanguage"
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PageLanguage"
            },
            "description": "Added languages, excluding the default language; `[]` for a single-language page."
          },
          "translations": {
            "$ref": "#/components/schemas/LinkPageTranslations"
          },
          "isLogoVisible": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "publishAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isScheduled": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isExpired": {
            "type": "boolean"
          },
          "plan_restriction": {
            "$ref": "#/components/schemas/PlanRestrictionState"
          },
          "access": {
            "$ref": "#/components/schemas/ResourceAccess"
          },
          "folder": {
            "$ref": "#/components/schemas/FolderRef"
          },
          "short_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://hyllo.fr/chez-marie"
          },
          "visits_count": {
            "type": "integer",
            "description": "List (`GET /link-pages`) only: all-time visits (link clicks are not included). Absent from other responses."
          },
          "visits_series": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List only: visits per day over 30 days, oldest first. Absent from other responses."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AnalyticsBreakdownItem": {
        "type": "object",
        "description": "Entry of an analytics ranking (country, device, browser, etc.).",
        "properties": {
          "value": {
            "type": [
              "string",
              "null"
            ],
            "example": "FR",
            "description": "Segment value (country code, device name, etc.)"
          },
          "count": {
            "type": "integer",
            "example": 450
          },
          "percentage": {
            "type": "number",
            "example": 36.5,
            "description": "Share, in %, of the total events over the period"
          }
        }
      },
      "AnalyticsTimelineSlot": {
        "type": "object",
        "description": "Timeline entry — always present even if count = 0 (zero-filling).",
        "properties": {
          "date": {
            "type": "string",
            "example": "2026-05-08",
            "description": "Start of the slot. Format depends on the granularity: `YYYY-MM-DD HH:00:00` (hour), `YYYY-MM-DD` (day/week), `YYYY-MM-01` (month)."
          },
          "count": {
            "type": "integer",
            "example": 45
          }
        }
      },
      "AnalyticsTypeSlot": {
        "type": "object",
        "description": "Slot of a `timeline_by_type` series, zero-filled.",
        "properties": {
          "date": {
            "type": "string",
            "example": "2026-05-08",
            "description": "Start of the slot, same format and values as `timeline[].date`"
          },
          "count": {
            "type": "integer",
            "example": 45
          }
        }
      },
      "Analytics": {
        "type": "object",
        "description": "Aggregated statistics of the token's workspace. Aggregates only: no IP, IP fingerprint or user agent.",
        "required": [
          "period",
          "summary",
          "timeline",
          "comparison",
          "previous_timeline",
          "timeline_by_type",
          "by_resource_type",
          "by_country",
          "unknown_country",
          "by_device",
          "by_browser",
          "by_os",
          "by_utm_source",
          "by_utm_medium",
          "by_utm_campaign",
          "by_click_id_platform",
          "by_referer",
          "by_link",
          "by_resource",
          "locked"
        ],
        "properties": {
          "period": {
            "type": "object",
            "required": [
              "label",
              "from",
              "to",
              "min_date",
              "granularity",
              "stream"
            ],
            "properties": {
              "label": {
                "type": "string",
                "enum": [
                  "today",
                  "yesterday",
                  "last_7_days",
                  "last_30_days",
                  "last_3_months",
                  "last_year",
                  "last_2_years",
                  "custom"
                ]
              },
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "min_date": {
                "type": "string",
                "description": "Earliest selectable date (never before the plan's retention limit).",
                "format": "date"
              },
              "granularity": {
                "type": "string",
                "enum": [
                  "hour",
                  "day",
                  "week",
                  "month"
                ]
              },
              "stream": {
                "type": "string",
                "enum": [
                  "visit",
                  "interaction"
                ]
              }
            }
          },
          "summary": {
            "type": "object",
            "required": [
              "total_events",
              "unique_visitors",
              "evolution"
            ],
            "properties": {
              "total_events": {
                "type": "integer"
              },
              "unique_visitors": {
                "type": "integer",
                "description": "Number of distinct visitors; no individual data is exposed."
              },
              "evolution": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Change in % compared with the previous period of the same duration; `null` when there is no earlier data."
              },
              "active_resources": {
                "type": "integer",
                "description": "Resources that received at least one event over the period."
              }
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimelineSlot"
            },
            "description": "Zero-filled slots, with no gaps."
          },
          "comparison": {
            "oneOf": [
              {
                "type": "object",
                "description": "Compared window; `null` without `compare`.",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "previous_period",
                      "previous_year"
                    ]
                  },
                  "from": {
                    "type": "string",
                    "format": "date"
                  },
                  "to": {
                    "type": "string",
                    "format": "date"
                  },
                  "total_events": {
                    "type": "integer"
                  },
                  "unique_visitors": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_timeline": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimelineSlot"
            },
            "description": "Timeline of the `comparison` window; `null` without `compare`."
          },
          "timeline_by_type": {
            "type": "object",
            "description": "`timeline` broken down by resource type.",
            "properties": {
              "qr-codes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AnalyticsTypeSlot"
                }
              },
              "link-pages": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AnalyticsTypeSlot"
                }
              },
              "short-links": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AnalyticsTypeSlot"
                }
              }
            }
          },
          "by_resource_type": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "enum": [
                    "qr-codes",
                    "link-pages",
                    "short-links"
                  ]
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Events per resource type, all three types always present."
          },
          "by_country": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Top 10 countries (ISO 3166-1 alpha-2). Empty if the plan lacks the `analytics.breakdowns` feature."
          },
          "unknown_country": {
            "type": "object",
            "description": "Events with no resolved country.",
            "properties": {
              "count": {
                "type": "integer"
              },
              "percentage": {
                "type": "number"
              }
            }
          },
          "by_device": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Devices."
          },
          "by_browser": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Browsers."
          },
          "by_os": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Operating systems."
          },
          "by_utm_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "UTM sources."
          },
          "by_utm_medium": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "UTM media."
          },
          "by_utm_campaign": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "UTM campaigns."
          },
          "by_click_id_platform": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Advertising platforms detected from a click ID (only the platform is stored)."
          },
          "by_referer": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Referrers, reduced to their domain."
          },
          "by_link": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Link title."
                },
                "id": {
                  "type": "string",
                  "format": "ulid",
                  "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
                  "description": "ULID of the link."
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Clicks per link page link (`interaction` stream)."
          },
          "by_resource": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "description": "Resource label."
                },
                "id": {
                  "type": "string",
                  "description": "ULID of the resource."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "qr-codes",
                    "link-pages",
                    "short-links"
                  ]
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Most active resources."
          },
          "locked": {
            "type": "object",
            "required": [
              "breakdowns"
            ],
            "properties": {
              "breakdowns": {
                "type": "boolean",
                "description": "`true` when the plan does not include `analytics.breakdowns`: the `by_*` rankings are then empty (200, not 402)."
              }
            }
          }
        }
      },
      "ResourceAnalytics": {
        "type": "object",
        "description": "Aggregated statistics of a resource. Aggregates only: no IP, IP fingerprint or user agent. A `static` QR code returns counters at zero.",
        "required": [
          "period",
          "summary",
          "timeline",
          "comparison",
          "previous_timeline",
          "by_country",
          "unknown_country",
          "by_device",
          "by_browser",
          "by_os",
          "by_utm_source",
          "by_utm_medium",
          "by_utm_campaign",
          "by_click_id_platform",
          "by_referer",
          "by_link",
          "by_resource",
          "locked"
        ],
        "properties": {
          "period": {
            "type": "object",
            "required": [
              "label",
              "from",
              "to",
              "min_date",
              "granularity",
              "stream"
            ],
            "properties": {
              "label": {
                "type": "string",
                "enum": [
                  "today",
                  "yesterday",
                  "last_7_days",
                  "last_30_days",
                  "last_3_months",
                  "last_year",
                  "last_2_years",
                  "custom"
                ]
              },
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "min_date": {
                "type": "string",
                "description": "Earliest selectable date (never before the plan's retention limit).",
                "format": "date"
              },
              "granularity": {
                "type": "string",
                "enum": [
                  "hour",
                  "day",
                  "week",
                  "month"
                ]
              },
              "stream": {
                "type": "string",
                "enum": [
                  "visit",
                  "interaction"
                ]
              }
            }
          },
          "summary": {
            "type": "object",
            "required": [
              "total_events",
              "unique_visitors",
              "evolution"
            ],
            "properties": {
              "total_events": {
                "type": "integer"
              },
              "unique_visitors": {
                "type": "integer",
                "description": "Number of distinct visitors; no individual data is exposed."
              },
              "evolution": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Change in % compared with the previous period of the same duration; `null` when there is no earlier data."
              }
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimelineSlot"
            },
            "description": "Zero-filled slots, with no gaps."
          },
          "comparison": {
            "oneOf": [
              {
                "type": "object",
                "description": "Compared window; `null` without `compare`.",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "previous_period",
                      "previous_year"
                    ]
                  },
                  "from": {
                    "type": "string",
                    "format": "date"
                  },
                  "to": {
                    "type": "string",
                    "format": "date"
                  },
                  "total_events": {
                    "type": "integer"
                  },
                  "unique_visitors": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_timeline": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimelineSlot"
            },
            "description": "Timeline of the `comparison` window; `null` without `compare`."
          },
          "by_country": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Top 10 countries (ISO 3166-1 alpha-2). Empty if the plan lacks the `analytics.breakdowns` feature."
          },
          "unknown_country": {
            "type": "object",
            "description": "Events with no resolved country.",
            "properties": {
              "count": {
                "type": "integer"
              },
              "percentage": {
                "type": "number"
              }
            }
          },
          "by_device": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Devices."
          },
          "by_browser": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Browsers."
          },
          "by_os": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Operating systems."
          },
          "by_utm_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "UTM sources."
          },
          "by_utm_medium": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "UTM media."
          },
          "by_utm_campaign": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "UTM campaigns."
          },
          "by_click_id_platform": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Advertising platforms detected from a click ID (only the platform is stored)."
          },
          "by_referer": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Referrers, reduced to their domain."
          },
          "by_link": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Link title."
                },
                "id": {
                  "type": "string",
                  "format": "ulid",
                  "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
                  "description": "ULID of the link."
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Clicks per link page link (`interaction` stream)."
          },
          "by_resource": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "description": "Resource label."
                },
                "id": {
                  "type": "string",
                  "description": "ULID of the resource."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "qr-codes",
                    "link-pages",
                    "short-links"
                  ]
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Most active resources."
          },
          "locked": {
            "type": "object",
            "required": [
              "breakdowns"
            ],
            "properties": {
              "breakdowns": {
                "type": "boolean",
                "description": "`true` when the plan does not include `analytics.breakdowns`: the `by_*` rankings are then empty (200, not 402)."
              }
            }
          }
        }
      },
      "Me": {
        "type": "object",
        "required": [
          "token",
          "workspace",
          "rate_limit"
        ],
        "properties": {
          "token": {
            "type": "object",
            "required": [
              "id",
              "name",
              "prefix",
              "scopes",
              "expires_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
              },
              "name": {
                "type": "string"
              },
              "prefix": {
                "type": "string",
                "description": "Beginning of the token, never its value.",
                "example": "hyl_a1b2c3d4"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiScope"
                }
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "`null`: never expires."
              }
            }
          },
          "workspace": {
            "type": "object",
            "required": [
              "id",
              "name",
              "plan"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
              },
              "name": {
                "type": "string"
              },
              "plan": {
                "type": "string",
                "description": "Key of the workspace's plan.",
                "example": "pro"
              }
            }
          },
          "rate_limit": {
            "type": "object",
            "required": [
              "per_minute"
            ],
            "properties": {
              "per_minute": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Requests per minute per token; `null`: unlimited by contract. All of the workspace's tokens combined get twice that."
              }
            }
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "description": "A workspace webhook. The signing secret never appears here: it is shown only at creation and at rotation.",
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/hooks/hyllo",
            "description": "Normalized address: lowercase host, no trailing dot."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscribableEvent"
            },
            "description": "Subscribed types (see `GET /webhooks/events`)."
          },
          "is_active": {
            "type": "boolean"
          },
          "batch_visits": {
            "type": "boolean",
            "description": "Visit events are grouped into `visits.batch` instead of being sent one by one."
          },
          "disabled_reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "manual",
              "failing",
              "staff",
              null
            ],
            "description": "`manual`: deactivated by an admin; `failing`: deactivated automatically after 72 h of failures; `staff`: deactivated by Hyllo staff (reactivating it or changing its `url` returns 403 `staff_disabled`); it sends nothing anymore: deliveries are `skipped`, tests included. `null` if active."
          },
          "failing_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start of the current streak of failures; `null` if the last send succeeded."
          },
          "last_success_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_failure_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "creator": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "access": {
            "type": "object",
            "properties": {
              "can_update": {
                "type": "boolean"
              },
              "can_delete": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "description": "A delivery of an event to a webhook (row of the log, kept for 30 days).",
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "event": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "example": "evt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
                "description": "Same as `Hyllo-Event-Id`."
              },
              "type": {
                "type": "string",
                "example": "short_link.created"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "skipped"
            ],
            "description": "`pending`: waiting for an attempt (or a retry); `succeeded`: 2xx response; `failed`: abandoned; `skipped`: never attempted (webhook deactivated or plan without API)."
          },
          "attempts": {
            "type": "integer",
            "example": 1,
            "description": "Attempts made; incremented at the start of each attempt."
          },
          "next_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "response_status": {
            "type": [
              "integer",
              "null"
            ],
            "example": 200,
            "description": "HTTP status received; `null` without a response."
          },
          "response_excerpt": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "Beginning of the response: the transfer is cut off beyond 1,024 bytes; `response_status` is kept."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "timeout",
              "dns",
              "tls",
              "connection",
              "redirect",
              "not_public_at_send",
              "interrupted",
              null
            ],
            "description": "Stable error code; `null` for a non-2xx HTTP response (see `response_status`). `interrupted`: attempt that started without a report, counted as a failure; the delivery becomes `failed` beyond 9 attempts."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "is_manual": {
            "type": "boolean",
            "description": "Test or manual resend."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "request_body": {
            "type": "object",
            "description": "Payload sent (the event, envelope included). Present only on `GET /webhooks/{webhook}/deliveries/{delivery}`."
          }
        }
      },
      "WebhookSubscribableEvent": {
        "type": "string",
        "enum": [
          "short_link.created",
          "short_link.updated",
          "short_link.deleted",
          "short_link.expired",
          "qr_code.created",
          "qr_code.updated",
          "qr_code.deleted",
          "qr_code.expired",
          "link_page.created",
          "link_page.updated",
          "link_page.deleted",
          "link_page.expired",
          "visit_limit.reached",
          "alert.triggered",
          "qr_code.scanned",
          "short_link.clicked",
          "link_page.viewed",
          "link.clicked"
        ],
        "description": "Event type a webhook can subscribe to."
      },
      "WebhookEventCatalogItem": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/WebhookSubscribableEvent"
          },
          "family": {
            "type": "string",
            "enum": [
              "short_link",
              "qr_code",
              "link_page",
              "visit_limit",
              "alert",
              "link"
            ]
          },
          "is_visit": {
            "type": "boolean",
            "description": "Visit event: counts toward the monthly cap and can be batched."
          }
        }
      },
      "WebhookUsage": {
        "type": "object",
        "description": "Monthly cap on the workspace's visit events.",
        "properties": {
          "period": {
            "type": "string",
            "example": "2026-12",
            "description": "Current calendar month (UTC)."
          },
          "visit_events": {
            "type": "integer",
            "description": "Visit events recorded this month."
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Plan limit; `null`: unlimited; 0: API not included."
          }
        }
      },
      "WebhookEnvelope": {
        "type": "object",
        "description": "Envelope shared by all events: JSON body of the request sent to the webhook.",
        "required": [
          "id",
          "type",
          "api_version",
          "created_at",
          "workspace",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "evt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "description": "Event identifier (`Hyllo-Event-Id`): deduplication key."
          },
          "type": {
            "type": "string",
            "example": "short_link.created"
          },
          "api_version": {
            "type": "string",
            "example": "2026-12-01",
            "description": "Version of the envelope format."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
                "description": "ULID of the workspace"
              }
            }
          },
          "data": {
            "type": "object",
            "description": "Type-specific content (see the `WebhookEvent*` schemas)."
          }
        }
      },
      "WebhookResourceReference": {
        "type": "object",
        "description": "Reference to a resource.",
        "required": [
          "type",
          "id",
          "name"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "short_link",
              "qr_code",
              "link_page"
            ]
          },
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "name": {
            "type": "string",
            "description": "Title or URL (short link), name (QR code), title (link page)."
          }
        }
      },
      "WebhookVisit": {
        "type": "object",
        "description": "A visit, without personal data: no IP, user agent, browser or UTM parameters.",
        "properties": {
          "occurred_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country code",
            "example": "FR"
          },
          "device_type": {
            "type": [
              "string",
              "null"
            ],
            "example": "mobile"
          },
          "referrer_domain": {
            "type": [
              "string",
              "null"
            ],
            "description": "Host only of the referring site.",
            "example": "example.com"
          }
        }
      },
      "WebhookEventShortLinkCreated": {
        "description": "A short link has just been created. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "short_link.created"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/ShortLink"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventShortLinkUpdated": {
        "description": "A short link was updated. Changes made in quick succession (sections saved one by one) are grouped into a single event sent about 30 s after the last one, with the state at that moment; nothing is sent if the link was deleted in the meantime. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "short_link.updated"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/ShortLink"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventShortLinkDeleted": {
        "description": "A short link was deleted: `data.resource` keeps only its reference `{ type, id, name }`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "short_link.deleted"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventShortLinkExpired": {
        "description": "A short link reached its expiration date (detected every 5 minutes, only once). The `evt_…` identifier is deterministic for (resource, `expires_at`): a replay keeps the same `Hyllo-Event-Id`. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "short_link.expired"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/ShortLink"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventQrCodeCreated": {
        "description": "A QR code has just been created. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "qr_code.created"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/QRCode"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventQrCodeUpdated": {
        "description": "A QR code was updated (grouping and 30 s delay as for `short_link.updated`). `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "qr_code.updated"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/QRCode"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventQrCodeDeleted": {
        "description": "A QR code was deleted: `data.resource` keeps only its reference `{ type, id, name }`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "qr_code.deleted"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventQrCodeExpired": {
        "description": "A QR code reached its expiration date. The `evt_…` identifier is deterministic for (resource, `expires_at`): a replay keeps the same `Hyllo-Event-Id`. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "qr_code.expired"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/QRCode"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventLinkPageCreated": {
        "description": "A link page has just been created. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link_page.created"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/LinkPage"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventLinkPageUpdated": {
        "description": "A link page was updated, including one of its links (created, updated or deleted). Grouping and 30 s delay as for `short_link.updated`. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link_page.updated"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/LinkPage"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventLinkPageDeleted": {
        "description": "A link page was deleted: `data.resource` keeps only its reference `{ type, id, name }`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link_page.deleted"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventLinkPageExpired": {
        "description": "A link page reached its expiration date. The `evt_…` identifier is deterministic for (resource, `expires_at`): a replay keeps the same `Hyllo-Event-Id`. `data.object` is the public API representation of the resource, without `access`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link_page.expired"
              },
              "data": {
                "type": "object",
                "required": [
                  "object"
                ],
                "properties": {
                  "object": {
                    "$ref": "#/components/schemas/LinkPage"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventVisitLimitReached": {
        "description": "A resource reached its visit limit (`max_visits`). Sent once per count: resetting the count or setting a new `max_visits` allows a new event.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "visit_limit.reached"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource",
                  "max_visits",
                  "reached_at"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "max_visits": {
                    "type": "integer"
                  },
                  "reached_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventAlertTriggered": {
        "description": "A statistics alert was triggered (threshold, increase or decrease), after the notification was sent.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "alert.triggered"
              },
              "data": {
                "type": "object",
                "required": [
                  "alert",
                  "resource",
                  "count",
                  "baseline"
                ],
                "properties": {
                  "alert": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "ulid",
                        "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "threshold",
                          "spike",
                          "drop"
                        ]
                      },
                      "window": {
                        "type": "string",
                        "enum": [
                          "hour",
                          "day",
                          "week"
                        ]
                      },
                      "stream": {
                        "type": "string",
                        "enum": [
                          "visit",
                          "interaction"
                        ]
                      },
                      "value": {
                        "type": "integer",
                        "description": "Setting value of the alert."
                      }
                    }
                  },
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "count": {
                    "type": "integer",
                    "description": "Count observed in the window."
                  },
                  "baseline": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Comparison baseline (increase, decrease); `null` for a threshold."
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventQrCodeScanned": {
        "description": "A dynamic QR code was scanned. Counts toward the monthly cap; bots excluded.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "qr_code.scanned"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource",
                  "visit"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "visit": {
                    "$ref": "#/components/schemas/WebhookVisit"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventShortLinkClicked": {
        "description": "A short link was opened. Counts toward the monthly cap; bots excluded.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "short_link.clicked"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource",
                  "visit"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "visit": {
                    "$ref": "#/components/schemas/WebhookVisit"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventLinkPageViewed": {
        "description": "A link page was viewed. Counts toward the monthly cap; bots excluded.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link_page.viewed"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource",
                  "visit"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "visit": {
                    "$ref": "#/components/schemas/WebhookVisit"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventLinkClicked": {
        "description": "A link on a link page was clicked. Counts toward the monthly cap; bots excluded.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "link.clicked"
              },
              "data": {
                "type": "object",
                "required": [
                  "resource",
                  "link",
                  "visit"
                ],
                "properties": {
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "link": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "ulid",
                        "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  "visit": {
                    "$ref": "#/components/schemas/WebhookVisit"
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventVisitsBatch": {
        "description": "Grouped visits (webhook with `batch_visits`): up to 500 visit events in `data.events`. Never subscribed to explicitly: sent instead of individual visit events. Guarantee: at most once — if the sending process stops between picking up the visits and recording them, that batch is lost.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "visits.batch"
              },
              "data": {
                "type": "object",
                "required": [
                  "events"
                ],
                "properties": {
                  "events": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "$ref": "#/components/schemas/WebhookEnvelope"
                    },
                    "description": "Complete envelopes of visit events (`qr_code.scanned`, `short_link.clicked`, `link_page.viewed`, `link.clicked`), each with its own `id`."
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventWebhookTest": {
        "description": "Test event sent by `POST /webhooks/{webhook}/test`. Never subscribed to, never retried.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "webhook.test"
              },
              "data": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "message": {
                    "type": "string",
                    "example": "This is a test event from Hyllo."
                  }
                }
              }
            }
          }
        ]
      }
    }
  }
}
