{
  "openapi": "3.1.0",
  "info": {
    "title": "Hyllo API publique",
    "version": "1.0.0",
    "description": "API publique de Hyllo, pensée pour les intégrations (scripts, Zapier, Make, back-ends). Elle est versionnée à part de l'API interne `/api/v1` de l'application : son contrat est stable, ses réponses sont figées par des tests. Le guide d'utilisation (démarrage, exemples de code, webhooks) est sur https://hyllo.fr/fr/developers.\n\n## Authentification\n\nChaque requête porte un **jeton personnel** : `Authorization: Bearer hyl_…`. Un jeton se crée dans l'application (Réglages, API) ; sa valeur n'est montrée qu'une fois. Il est lié à **un espace de travail** : toutes les routes lisent et écrivent dans cet espace, il n'y a ni en-tête `X-Workspace` ni accès à un autre espace (une ressource d'un autre espace répond 404). Il agit avec les droits de son créateur dans l'espace ; un jeton expiré, révoqué ou dont le créateur a quitté l'espace répond 401 `invalid_token`. L'API est réservée aux offres qui l'incluent (`api.access`) : sinon 402.\n\nLes réponses sont toujours en JSON (`Content-Type: application/json`).\n\n## Scopes\n\nUn jeton ne porte que les scopes choisis à sa création : `short_links:read`, `short_links:write`, `qr_codes:read`, `qr_codes:write`, `link_pages:read`, `link_pages:write`, `analytics:read`, `webhooks:manage`. Un scope `write` donne aussi le `read` de sa famille (`short_links`, `qr_codes`, `link_pages`) : le jeton stocke les deux, et `GET /me` les liste. `analytics:read` et `webhooks:manage` n'ont pas de variante `write`. Le scope requis par chaque route est dans `x-required-scope` ; un scope manquant répond 403 `insufficient_scope` avec `required_scope`. `webhooks:manage` donne accès aux routes `/webhooks…` (gestion des webhooks de l'espace) ; il n'est accordé qu'à un créateur admin de l'espace.\n\n## Limites de débit\n\nLe plafond dépend de l'offre (`GET /me` : `rate_limit.per_minute`) : par jeton, et pour tous les jetons de l'espace ensemble (le double). Chaque réponse porte `X-RateLimit-Limit`, `X-RateLimit-Remaining` (plafond le plus serré) et `X-RateLimit-Reset` (timestamp Unix). Au-delà : 429 `rate_limited` avec `Retry-After`. Les authentifications refusées sont aussi comptées par IP : seuls les refus comptent ; au-delà de 30 refus (401) par minute, chaque refus suivant répond 429 `rate_limited` (avec `Retry-After`) jusqu'à la fin de la minute. Un jeton valide venant de la même IP reste accepté. Une adresse IPv6 est comptée par bloc /64.\n\nCertaines routes ont une limite propre, en plus du plafond de l'offre : l'export d'un QR code (20 par minute et par jeton, 40 pour tous les jetons de l'espace), `POST /webhooks` (20 par minute), `PATCH /webhooks/{webhook}` avec `url` (20 par minute), `POST /webhooks/{webhook}/test` (10 par minute) et `POST /webhooks/{webhook}/deliveries/{delivery}/resend` (30 par minute) ; ces quatre dernières sont comptées par route : création, essai et renvoi par créateur du jeton (deux jetons du même utilisateur partagent le compteur), changement d'`url` par compte (compteur partagé avec l'application). Toute requête qui porte `url` compte, même avec la valeur actuelle ; les requêtes sans `url` ne comptent pas. Ces limites répondent comme le reste de l'API : 429 `rate_limited` avec `Retry-After` et `X-RateLimit-*` (`X-RateLimit-Reset` suit le limiteur dont `X-RateLimit-Remaining` est le plus bas).\n\n## Idempotence\n\nLes créations (`POST`) acceptent l'en-tête `Idempotency-Key` : rejouée, la même requête renvoie la réponse d'origine (`Idempotent-Replayed: true`) pendant 24 h au lieu de créer un doublon.\n\n## Erreurs\n\n| Statut | Quand |\n|--------|-------|\n| 401 | `invalid_token` : jeton absent, inconnu, expiré ou révoqué |\n| 402 | offre sans accès à l'API, fonction non incluse ou quota atteint (`plan_required`, `quota_reached`, `plan_restricted`) |\n| 403 | `insufficient_scope`, ou rôle du créateur insuffisant (lecteur) |\n| 404 | ressource inconnue ou d'un autre espace ; `DELETE` d'un QR code ou d'une link page n'existe pas (405) |\n| 409 | `idempotency_in_progress` |\n| 422 | validation (`errors`) ; `field_not_available` pour un champ absent de l'API publique (dossiers) ; `idempotency_key_mismatch` |\n| 429 | `rate_limited` |\n\n**Ordre des vérifications** : 401 → 402 → 403 `insufficient_scope` → 404 → 422. Un jeton sans le scope requis reçoit donc 403 même sur un ULID inexistant (jamais 404), et l'existence d'une ressource n'est révélée qu'à un jeton qui a le scope. La validation du corps (422) vient en dernier. Les limites propres à une route comptent après le 402 et le 403 : un jeton refusé ne les consomme pas. Le budget général par jeton et par espace compte avant, et chaque réponse, refus compris, porte `X-RateLimit-*`.\n\nTester le `code`, jamais le `message` (traduit selon le profil du créateur du jeton).\n\n## Webhooks\n\nUn webhook reçoit en `POST` JSON, sur une adresse HTTPS publique, les événements choisis de l'espace. Il se gère par les routes `/webhooks…` (scope `webhooks:manage`, offre avec `api.access`, 10 webhooks au plus par espace). `GET /webhooks/events` liste les types souscriptibles ; la charge de chaque type est décrite dans la section `webhooks` de ce document (schémas `WebhookEvent*`).\n\n**Catalogue** : `short_link|qr_code|link_page` + `.created`, `.updated`, `.deleted`, `.expired` ; `visit_limit.reached` ; `alert.triggered` ; visites : `qr_code.scanned`, `short_link.clicked`, `link_page.viewed`, `link.clicked`. Envoyés sans se souscrire : `visits.batch` (visites groupées) et `webhook.test`.\n\n**Enveloppe** (corps de chaque requête) : `{ id, type, api_version, created_at, workspace: { id }, data }`. `id` (`evt_…`) identifie l'événement ; `data` dépend du type. Les ressources sont celles de l'API publique, sans `access`. Une suppression ne garde que la référence de la ressource : `data.resource = { type, id, name }`. Une visite ne porte que `occurred_at`, `country`, `device_type` et `referrer_domain` : jamais d'IP, de user-agent, de navigateur ni de paramètres UTM.\n\n**En-têtes** : `Content-Type: application/json`, `User-Agent: Hyllo-Webhooks/1.0`, `Hyllo-Signature`, `Hyllo-Event-Id` (= `id`, identique à chaque relance), `Hyllo-Event-Type` (= `type`), `Hyllo-Delivery-Id`.\n\n**Vérifier la signature.** Le secret (`whsec_…`) est montré une fois, à la création et à la rotation. `Hyllo-Signature` vaut `t=<timestamp Unix>,v1=<hex>[,v1=<hex>]` ; `v1` est le HMAC-SHA256, avec le secret entier comme clé (préfixe `whsec_` compris), de `t + \".\" + corps brut`. Le corps est du JSON compact (sans espaces, `/` et caractères Unicode non échappés) : le calculer sur le corps reçu, octet pour octet, avant tout re-parsing JSON. `t` est l'heure de chaque tentative : une relance a le même corps et le même `Hyllo-Event-Id` mais un nouveau `t`, donc une nouvelle signature.\n\n```\nheader = request.header(\"Hyllo-Signature\")        // \"t=1790000000,v1=ab12…,v1=cd34…\"\nt      = valeur de t\nbody   = request.rawBody\nif abs(now() - t) > 300 : rejeter                 // tolérance recommandée : 5 minutes\nexpected = hex(hmac_sha256(secret, t + \".\" + body))\nif aucune valeur v1 n'égale expected (comparaison à temps constant) : rejeter\n```\n\nPendant les 24 h qui suivent un renouvellement du secret (`POST /webhooks/{webhook}/secret`), l'en-tête porte deux `v1` (le nouveau d'abord) : accepter si l'un correspond.\n\n**Livraison et relances.** Répondre en 2xx dans les 5 s (3 s pour se connecter) ; les redirections ne sont pas suivies et comptent comme un échec. Autre code, délai dépassé ou erreur réseau : relance après 1 min, 5 min, 15 min, 1 h, 2 h, 4 h, 8 h puis 8 h (8 relances sur environ 23 h), puis la livraison passe à `failed`. Le journal (`GET /webhooks/{webhook}/deliveries`, 30 jours) donne statut, tentatives, code reçu, début de la réponse et `error` (`timeout`, `dns`, `tls`, `connection`, `redirect`, `not_public_at_send`, `interrupted`). `attempts` est incrémenté au début de chaque tentative ; `interrupted` désigne une tentative commencée sans compte rendu (processus arrêté) : elle compte comme un échec, et la livraison passe à `failed` au-delà de 9 tentatives. `response_excerpt` : le transfert est coupé au-delà de 1 024 octets, `response_status` est conservé. L'adresse est résolue à chaque envoi, sans proxy : si elle n'est plus publique, la livraison échoue aussitôt sans connexion. Sont refusées, en plus des adresses privées, locales et réservées, les plages `2002::/16`, `2001::/32` et `fec0::/10` ; l'`url` renvoyée est normalisée (hôte en minuscules, sans point final). `POST …/deliveries/{delivery}/resend` renvoie un événement à la main.\n\n**Désactivation.** Un webhook en échec continu depuis 72 h est désactivé (`is_active: false`, `disabled_reason: failing`), ses livraisons en attente sont abandonnées (`skipped`) et les admins sont notifiés. Le réactiver : `PATCH` avec `is_active: true` (403 `staff_disabled` s'il a été coupé par le personnel Hyllo, `disabled_reason: staff` ; il en va de même pour un changement d'`url`, `POST …/test` et `…/resend`). Un webhook coupé par le personnel n'envoie plus rien : livraisons `skipped`, essai compris. Une offre sans `api.access` n'envoie plus rien (`skipped`).\n\n**Regroupement.** Avec `batch_visits: true`, les événements de visite ne sont plus envoyés un à un : ils sont groupés en `visits.batch` (500 événements au plus par envoi, `data.events` = enveloppes complètes), envoyé chaque minute. Garantie : au plus une fois — si le processus d'envoi s'arrête entre la prise des visites et leur enregistrement, ce lot est perdu.\n\n**Plafond mensuel.** Les événements de visite sont comptés par mois civil (UTC) et par espace (`meta.usage` de `GET /webhooks`). Les admins sont notifiés à 80 % puis à 100 % ; au plafond, les visites cessent d'être émises (non rattrapées), les événements de cycle de vie continuent. Un renvoi manuel ne compte pas.\n\n**Bonnes pratiques.** L'ordre d'arrivée n'est pas garanti : se fier à `created_at`. Une livraison peut arriver plus d'une fois : dédupliquer par `Hyllo-Event-Id`. Pour `*.expired`, l'identifiant est déterministe par (ressource, `expires_at`) : un rejeu de la détection garde le même `Hyllo-Event-Id`. Répondre vite et traiter en différé.\n\n## Hors périmètre\n\nNi dossiers, ni partages, ni conversion de lien court en QR code, ni géocodage, ni exports CSV/PDF, ni rapports ou alertes ; pas de suppression de QR code ni de link page. Les statistiques sont des agrégats : aucune IP, empreinte d'IP ni user-agent n'est exposé."
  },
  "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": "Jeton",
      "description": "Identité du jeton courant.",
      "x-slug": "token"
    },
    {
      "name": "Liens courts",
      "x-slug": "short-links"
    },
    {
      "name": "QR codes",
      "x-slug": "qr-codes"
    },
    {
      "name": "Link pages",
      "x-slug": "link-pages"
    },
    {
      "name": "Statistiques",
      "x-slug": "analytics"
    },
    {
      "name": "Webhooks",
      "description": "Gestion des webhooks de l'espace (scope `webhooks:manage`). Les événements envoyés sont décrits dans la section `webhooks` et dans « Webhooks » de la description générale.",
      "x-slug": "webhooks"
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "Jeton"
        ],
        "operationId": "getMe",
        "summary": "Jeton et espace courants",
        "description": "Renvoie le jeton utilisé (nom, début, scopes, expiration), l'espace auquel il est lié, son offre et la limite de requêtes par minute. Aucun scope n'est requis : tout jeton valide peut appeler cette route, ce qui en fait le test de connexion de référence.",
        "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": [
          "Liens courts"
        ],
        "operationId": "listShortLinks",
        "summary": "Lister les liens courts",
        "description": "Liens courts de l'espace du jeton, paginés.",
        "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": "Ne garde que les liens dans ce statut (un lien court ne peut pas être désactivé : pas de `inactive`)."
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "deprecated": true,
            "schema": {
              "type": "string"
            },
            "description": "Refusé : les dossiers n'existent pas dans l'API publique. Toute présence de ce paramètre répond 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": [
          "Liens courts"
        ],
        "operationId": "createShortLink",
        "summary": "Créer un lien court",
        "description": "Crée un lien court dans l'espace du jeton. Plusieurs liens d'un coup : `POST /short-links/bulk`. Une URL bloquée par la modération est refusée (422), comme dans l'application.\n\n402 : `quota_reached` (`short_links.count`) ; `plan_required` pour un code choisi (`short_links.custom_alias`), un domaine personnalisé (`custom_domains.count`), `open_in_app` ou une 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": "Destination `http`/`https`, avec un hôte à point (domaine ou IPv4).",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255
                  },
                  "open_in_app": {
                    "type": "boolean",
                    "description": "Ouvre la destination dans son application native quand son hôte est connu. Requiert `short_links.deep_links` à l'activation."
                  },
                  "folder_id": {
                    "description": "Refusé : les dossiers n'existent pas dans l'API publique. Toute présence de ce champ (même `null`) répond 422 `field_not_available`.",
                    "not": {}
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Début de publication : date future, avant `expires_at` ; `null` publie tout de suite. Requiert `resources.protection` (402 sinon)."
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Expiration : date future ; `null` la retire. Requiert `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Mot de passe de la redirection (stocké haché, jamais renvoyé). Requiert `resources.protection`.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "max_visits": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Limite de visites ; au-delà la redirection répond 404. Requiert `resources.protection`.",
                    "minimum": 1,
                    "maximum": 1000000000
                  },
                  "domain_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Domaine personnalisé actif de l'espace ; requiert `custom_domains.count` inclus (402 sinon).",
                    "format": "ulid"
                  },
                  "short": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Code personnalisé, unique par domaine ; requiert `short_links.custom_alias`. Absent : code généré.",
                    "minLength": 3,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  }
                }
              },
              "example": {
                "url": "https://example.com/promo",
                "title": "Promo",
                "short": "promo"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Lien court créé",
            "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": [
          "Liens courts"
        ],
        "operationId": "bulkCreateShortLinks",
        "summary": "Créer des liens courts en lot",
        "description": "Crée jusqu'à 500 liens courts d'un coup, avec codes générés. Les lignes vides, invalides, trop longues ou bloquées sont rapportées dans `failed` sans faire échouer le lot. Réponse **200** (et non 201).\n\n402 : `quota_reached` (`short_links.bulk_batch`, `short_links.count`), `plan_required` pour un domaine, `open_in_app` ou une 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": "Une destination par ligne."
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Expiration commune ; requiert `resources.protection`."
                  },
                  "open_in_app": {
                    "type": "boolean",
                    "description": "Commun à tout le lot ; requiert `short_links.deep_links`."
                  },
                  "domain_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Domaine personnalisé commun ; requiert `custom_domains.count`.",
                    "format": "ulid"
                  },
                  "folder_id": {
                    "description": "Refusé : 422 `field_not_available`.",
                    "not": {}
                  }
                }
              },
              "example": {
                "urls": [
                  "https://example.com/a",
                  "https://example.com/b"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lot traité",
            "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": [
          "Liens courts"
        ],
        "operationId": "getShortLink",
        "summary": "Lire un lien court",
        "description": "Un lien court de l'espace du jeton.",
        "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": [
          "Liens courts"
        ],
        "operationId": "updateShortLink",
        "summary": "Modifier un lien court",
        "description": "Modifie un lien court. La destination (`url`) et le code ne sont pas modifiables : envoyer `url` répond 422. Une ressource en lecture seule après une rétrogradation répond 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": "Ouvre la destination dans son application native quand son hôte est connu. Requiert `short_links.deep_links` à l'activation."
                  },
                  "folder_id": {
                    "description": "Refusé : les dossiers n'existent pas dans l'API publique. Toute présence de ce champ (même `null`) répond 422 `field_not_available`.",
                    "not": {}
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Début de publication : date future, avant `expires_at` ; `null` publie tout de suite. Requiert `resources.protection` (402 sinon)."
                  },
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Expiration : date future ; `null` la retire. Requiert `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Mot de passe de la redirection (stocké haché, jamais renvoyé). Requiert `resources.protection`.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "max_visits": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Limite de visites ; au-delà la redirection répond 404. Requiert `resources.protection`.",
                    "minimum": 1,
                    "maximum": 1000000000
                  },
                  "reset_counted_visits": {
                    "type": "boolean",
                    "description": "Remet `counted_visits` à zéro."
                  }
                }
              },
              "example": {
                "title": "Nouveau titre"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lien modifié",
            "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": [
          "Liens courts"
        ],
        "operationId": "deleteShortLink",
        "summary": "Supprimer un lien court",
        "description": "Supprime le lien court (et sa short URL).",
        "x-required-scope": "short_links:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/ShortLinkId"
          }
        ],
        "responses": {
          "204": {
            "description": "Supprimé",
            "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": "Lister les QR codes",
        "description": "QR codes de l'espace du jeton, paginés. Les QR codes partagés depuis un autre espace ne sont pas listés. Chaque élément porte `visits_count` et `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": "Ne garde que les QR codes dans ce statut (un QR `static` est toujours `active`)."
          },
          {
            "name": "folder",
            "in": "query",
            "required": false,
            "deprecated": true,
            "schema": {
              "type": "string"
            },
            "description": "Refusé : les dossiers n'existent pas dans l'API publique. Toute présence de ce paramètre répond 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": "Ne garde que ce `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": "Créer un QR code",
        "description": "Crée un QR code dans l'espace du jeton. `design` et `frame` sont facultatifs : absents, le design par défaut du créateur du jeton est appliqué (modèle marqué par défaut, sinon design de base sans cadre). Si le logo de ce modèle n'est pas un média de l'espace du jeton, `design.image` sort avec `src: null` et `enabled: false`. Le rangement en dossier n'existe pas dans l'API publique : `organization` est ignoré.\n\n402 : `quota_reached` (`qr_codes.dynamic`) pour un QR dynamique, `plan_required` pour un code choisi, un domaine personnalisé, un design ou un cadre avancé.",
        "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": "Immuable après la création.",
                        "enum": [
                          "static",
                          "dynamic"
                        ]
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 1000
                      },
                      "domainId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "QR `dynamic` seulement : domaine personnalisé actif de l'espace ; absent : domaine de Hyllo. Immuable. Interdit sur un QR `static`.",
                        "format": "ulid"
                      },
                      "short": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "QR `dynamic` seulement : code personnalisé unique sur le domaine ; requiert `short_links.custom_alias`. Immuable. Interdit sur un QR `static`.",
                        "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": "Charge utile selon `contentType` :\n- `url` : `{ \"url\" }`\n- `link-pages` : `{ \"linkPageId\" }` (une link page de l'espace)\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` : entiers)\n- `stores` : `{ \"appStoreUrl\"?, \"playStoreUrl\"? }` (au moins un)\n- `google-review` : `{ \"placeId\", \"placeName\"? }`\n- `gps` : `{ \"lat\", \"lng\", \"address\"? }`\n- `file` : `{ \"mediaId\", \"fileName\"? }` (un fichier de la médiathèque de l'espace)\n- `menu` : `{ \"mode\": \"pdf\", \"mediaId\" }` ou `{ \"mode\": \"structured\", \"currency\"?, \"sections\": [{ \"title\", \"description\"?, \"items\": [{ \"name\", \"description\"?, \"price\"? }] }] }`\n\nLes types disponibles dépendent de `information.type` (`stores`, `file` et `menu` : QR dynamiques)."
                      }
                    }
                  },
                  "design": {
                    "$ref": "#/components/schemas/QRCodeDesign"
                  },
                  "frame": {
                    "$ref": "#/components/schemas/QRCodeFrame"
                  }
                }
              },
              "example": {
                "information": {
                  "name": "Carte du restaurant",
                  "type": "dynamic"
                },
                "content": {
                  "contentType": "url",
                  "data": {
                    "url": "https://example.com/carte"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "QR code créé",
            "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": "Lire un QR code",
        "description": "Un QR code de l'espace du jeton. Cette réponse n'a pas `visits_count` ni `visits_series` (ils n'existent qu'en liste) : pour les scans, utiliser `GET /analytics/qr-codes/{id}`. Un QR code partagé depuis un autre espace répond 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": "Modifier un QR code",
        "description": "Modifie un QR code ; tous les blocs sont facultatifs. Le type (`static`/`dynamic`), le domaine et le code sont immuables. `organization` ou `folderId` répondent 422 `field_not_available`. `options` n'est accepté que pour un QR dynamique.",
        "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": "Charge utile selon `contentType` :\n- `url` : `{ \"url\" }`\n- `link-pages` : `{ \"linkPageId\" }` (une link page de l'espace)\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` : entiers)\n- `stores` : `{ \"appStoreUrl\"?, \"playStoreUrl\"? }` (au moins un)\n- `google-review` : `{ \"placeId\", \"placeName\"? }`\n- `gps` : `{ \"lat\", \"lng\", \"address\"? }`\n- `file` : `{ \"mediaId\", \"fileName\"? }` (un fichier de la médiathèque de l'espace)\n- `menu` : `{ \"mode\": \"pdf\", \"mediaId\" }` ou `{ \"mode\": \"structured\", \"currency\"?, \"sections\": [{ \"title\", \"description\"?, \"items\": [{ \"name\", \"description\"?, \"price\"? }] }] }`\n\nLes types disponibles dépendent de `information.type` (`stores`, `file` et `menu` : QR dynamiques)."
                      }
                    }
                  },
                  "design": {
                    "$ref": "#/components/schemas/QRCodeDesign"
                  },
                  "frame": {
                    "$ref": "#/components/schemas/QRCodeFrame"
                  },
                  "options": {
                    "type": "object",
                    "description": "QR dynamique seulement.",
                    "properties": {
                      "isActive": {
                        "type": "boolean"
                      },
                      "publishAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "description": "Date future, avant `expiresAt`. Requiert `resources.protection`."
                      },
                      "expiresAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "description": "Date future. Requiert `resources.protection`."
                      },
                      "password": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Requiert `resources.protection`.",
                        "minLength": 4,
                        "maxLength": 255
                      },
                      "maxVisits": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Requiert `resources.protection`.",
                        "minimum": 1,
                        "maximum": 1000000000
                      },
                      "resetCountedVisits": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              },
              "example": {
                "information": {
                  "name": "Nouveau nom"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "QR code modifié",
            "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": "Exporter un QR code en PNG ou SVG",
        "description": "L'image du QR code, dessinée par le même moteur que l'aperçu de l'éditeur (design, cadre et logo compris). Un QR dynamique encode son URL courte, un QR statique son contenu. Le SVG d'un QR dont le design utilise un droit perdu est rendu tel qu'enregistré. Réponse en pièce jointe (`Content-Disposition: attachment`). Budget de débit propre à cette route : 20 requêtes par minute et par jeton (40 pour tous les jetons de l'espace), en plus du plafond de l'offre. Chaque export est rendu à la demande (aucun cache). Un logo raster est réduit à 512 px de côté au plus avant le rendu ; un logo SVG de plus de 512 Ko répond 422 `logo_too_large`. Renderer indisponible ou réponse inexploitable : 503 `renderer_unavailable` (réessayer). Un QR que le moteur refuse de dessiner : 422 `render_refused`. Un QR statique d'un type de contenu que l'API ne sait pas encoder à l'identique de l'éditeur : 422 `export_not_available` (garde-fou : aujourd'hui tous les types statiques sont pris en charge), de même qu'un QR dynamique sans URL courte.",
        "x-required-scope": "qr_codes:read",
        "parameters": [
          {
            "$ref": "#/components/parameters/QrCodeId"
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "description": "Format de l'image.",
            "schema": {
              "type": "string",
              "enum": [
                "png",
                "svg"
              ]
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Largeur de l'image en pixels, PNG seulement (la hauteur suit le cadre ; ignoré pour le SVG).",
            "schema": {
              "type": "integer",
              "minimum": 128,
              "maximum": 4096,
              "default": 1024
            }
          }
        ],
        "responses": {
          "200": {
            "description": "L'image du QR code.",
            "headers": {
              "Content-Disposition": {
                "description": "`attachment; filename=\"<nom>.png\"` (ou `.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": "Le service de rendu est indisponible : `code` vaut `renderer_unavailable`. L'en-tête `Retry-After` indique quand réessayer.",
            "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": "Lister les link pages",
        "description": "Link pages de l'espace du jeton, paginées, avec leurs liens. `visits_count` et `visits_series` n'existent qu'en liste.",
        "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": "Refusé : les dossiers n'existent pas dans l'API publique. Toute présence de ce paramètre répond 422 `field_not_available`."
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageLanguage"
            },
            "description": "Langue par défaut de la page, ou l'une de ses langues ajoutées."
          }
        ],
        "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": "Créer une link page",
        "description": "Crée une link page (sans lien : ils s'ajoutent par `POST /link-pages/{linkPage}/links`). `folderId` répond 422 `field_not_available`. Les langues ajoutées et les traductions se règlent à la modification.\n\n402 : `quota_reached` (`link_pages.count`), `plan_required` pour un code choisi, un domaine, le SEO, un thème avancé, le masquage du badge ou une 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` demande `link_pages.hide_badge` (402 sinon)."
                  },
                  "shouldNoIndex": {
                    "type": "boolean",
                    "description": "`true` demande `link_pages.seo`."
                  },
                  "isSensitive": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "publishAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Date future. Requiert `resources.protection`."
                  },
                  "expiresAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Date future, après `publishAt`. Requiert `resources.protection`."
                  },
                  "hasPagePassword": {
                    "type": "boolean"
                  },
                  "pagePassword": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Requis quand `hasPagePassword` est vrai et qu'aucun mot de passe n'existe. Jamais renvoyé.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "meta": {
                    "type": "object",
                    "description": "Métadonnées SEO. Les modifier demande `link_pages.seo` (402 sinon).",
                    "properties": {
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500
                      }
                    }
                  },
                  "avatar": {
                    "type": "object",
                    "description": "Avatar de la page. Défaut renvoyé : `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": "Domaine personnalisé actif de l'espace ; requiert `custom_domains.count`. Immuable.",
                    "format": "ulid"
                  },
                  "short": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Code personnalisé unique sur le domaine ; requiert `short_links.custom_alias`. Immuable.",
                    "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 créée",
            "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": "Lire une link page",
        "description": "Une link page de l'espace du jeton, avec ses liens.",
        "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": "Modifier une link page",
        "description": "Modifie une link page ; tous les champs sont facultatifs. `folderId` répond 422 `field_not_available`. Il n'y a pas de suppression de page dans l'API publique (`DELETE` : 405). Ajouter une langue demande `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` demande `link_pages.hide_badge` (402 sinon)."
                  },
                  "shouldNoIndex": {
                    "type": "boolean",
                    "description": "`true` demande `link_pages.seo`."
                  },
                  "isSensitive": {
                    "type": "boolean"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "publishAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Date future. Requiert `resources.protection`."
                  },
                  "expiresAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Date future, après `publishAt`. Requiert `resources.protection`."
                  },
                  "hasPagePassword": {
                    "type": "boolean"
                  },
                  "pagePassword": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Requis quand `hasPagePassword` est vrai et qu'aucun mot de passe n'existe. Jamais renvoyé.",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "meta": {
                    "type": "object",
                    "description": "Métadonnées SEO. Les modifier demande `link_pages.seo` (402 sinon).",
                    "properties": {
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255
                      },
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500
                      }
                    }
                  },
                  "avatar": {
                    "type": "object",
                    "description": "Avatar de la page. Défaut renvoyé : `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": "Langues ajoutées, sans doublon ni la langue par défaut."
                  },
                  "translations": {
                    "$ref": "#/components/schemas/LinkPageTranslations"
                  }
                }
              },
              "example": {
                "title": "Nouveau titre"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Link page modifiée",
            "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": "Lister les liens d'une page",
        "description": "Liens de la page, triés par position (non paginés).",
        "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": "Ajouter un lien à une page",
        "description": "Ajoute un lien à la fin de la page. Le type `form` n'existe pas : 422. Les types embarqués (`youtube`, `spotify`…) demandent `link_pages.embeds` (402 sinon).",
        "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": "Charge utile selon `type` (mêmes règles que dans l'application ; URL contrôlées contre les adresses non sûres)."
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requiert `resources.protection`."
                  },
                  "expire_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requiert `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Requiert `resources.protection`. Jamais renvoyé (`has_password`).",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "thumbnail": {
                    "type": "object",
                    "description": "Vignette du lien. Défauts renvoyés : `type: icon`, `style: style-1`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "icon"
                        ]
                      },
                      "image": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "URL d'un fichier de la médiathèque de l'espace.",
                        "maxLength": 2048
                      },
                      "icon": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 64
                      },
                      "style": {
                        "type": "string",
                        "enum": [
                          "style-1",
                          "style-2"
                        ]
                      }
                    }
                  },
                  "highlight": {
                    "type": "object",
                    "description": "Mise en avant du lien.",
                    "properties": {
                      "animation": {
                        "type": "string",
                        "enum": [
                          "none",
                          "pulse",
                          "shake",
                          "glow"
                        ]
                      },
                      "pinned": {
                        "type": "boolean",
                        "description": "Un seul lien épinglé par page."
                      }
                    }
                  },
                  "translations": {
                    "$ref": "#/components/schemas/LinkPageLinkTranslations"
                  }
                }
              },
              "example": {
                "type": "url",
                "title": "Mon site",
                "data": {
                  "url": "https://example.com"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Lien créé",
            "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": "Réordonner les liens d'une page",
        "description": "Fixe l'ordre des liens : `order` liste les ULID de liens dans le nouvel ordre. Renvoie les liens de la page dans cet ordre.",
        "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": "Liens dans le nouvel ordre",
            "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": "Modifier un lien",
        "description": "Modifie un lien de la page ; tous les champs sont facultatifs (`type` compris). Le type `form` n'existe pas : 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": "Charge utile selon `type` (mêmes règles que dans l'application ; URL contrôlées contre les adresses non sûres)."
                  },
                  "publish_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requiert `resources.protection`."
                  },
                  "expire_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time",
                    "description": "Requiert `resources.protection`."
                  },
                  "password": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Requiert `resources.protection`. Jamais renvoyé (`has_password`).",
                    "minLength": 4,
                    "maxLength": 255
                  },
                  "thumbnail": {
                    "type": "object",
                    "description": "Vignette du lien. Défauts renvoyés : `type: icon`, `style: style-1`.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "icon"
                        ]
                      },
                      "image": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "URL d'un fichier de la médiathèque de l'espace.",
                        "maxLength": 2048
                      },
                      "icon": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 64
                      },
                      "style": {
                        "type": "string",
                        "enum": [
                          "style-1",
                          "style-2"
                        ]
                      }
                    }
                  },
                  "highlight": {
                    "type": "object",
                    "description": "Mise en avant du lien.",
                    "properties": {
                      "animation": {
                        "type": "string",
                        "enum": [
                          "none",
                          "pulse",
                          "shake",
                          "glow"
                        ]
                      },
                      "pinned": {
                        "type": "boolean",
                        "description": "Un seul lien épinglé par page."
                      }
                    }
                  },
                  "translations": {
                    "$ref": "#/components/schemas/LinkPageLinkTranslations"
                  }
                }
              },
              "example": {
                "title": "Nouveau titre"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lien modifié",
            "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": "Supprimer un lien",
        "description": "Supprime le lien de la page.",
        "x-required-scope": "link_pages:write",
        "parameters": [
          {
            "$ref": "#/components/parameters/LinkPageId"
          },
          {
            "$ref": "#/components/parameters/LinkId"
          }
        ],
        "responses": {
          "204": {
            "description": "Supprimé",
            "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": "Activer ou désactiver un lien",
        "description": "Active ou désactive un lien sans toucher au reste.",
        "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": "Lien modifié",
            "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": [
          "Statistiques"
        ],
        "operationId": "getAnalytics",
        "summary": "Statistiques de l'espace",
        "description": "Agrégats de toutes les ressources de l'espace du jeton sur la période. Agrégats seulement : aucune IP, empreinte d'IP ni user-agent. Sans `analytics.breakdowns` dans l'offre, les classements `by_*` sont vides et `locked.breakdowns` vaut `true` (200, pas de 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": [
          "Statistiques"
        ],
        "operationId": "getResourceAnalytics",
        "summary": "Statistiques d'une ressource",
        "description": "Agrégats d'un QR code, d'une link page ou d'un lien court de l'espace du jeton. Une ressource d'un autre espace, ou un `type` inconnu, répond 404. Même règle `locked` que `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": "Type de ressource."
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "ulid",
              "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
            },
            "description": "ULID de la ressource."
          },
          {
            "$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": [
          "Statistiques"
        ],
        "operationId": "getLinkPageLinksAnalytics",
        "summary": "Clics par lien d'une page",
        "description": "Nombre de clics de tous les temps par lien, indexé par ULID de lien (les liens sans clic sont omis : un ULID absent vaut 0). Sans `analytics.breakdowns` dans l'offre, `data` est vide et `locked` vaut `true` (200, pas de 402). Déclarée avant `/links/{link}` : `analytics` n'est pas un ULID de lien.",
        "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` si l'offre n'inclut pas `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": "Lister les webhooks",
        "description": "Webhooks de l'espace, du plus récent au plus ancien, non paginés. `meta` donne le plafond mensuel d'événements de visite, le nombre maximal de webhooks par espace (10) et la disponibilité de la fonction.",
        "x-required-scope": "webhooks:manage",
        "responses": {
          "200": {
            "description": "Liste des 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": "L'offre de l'espace inclut l'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": "Créer un webhook",
        "description": "Ajoute un webhook à l'espace (10 au plus). Le secret de signature (`whsec_…`) n'est renvoyé qu'ici, une seule fois : le conserver. Limité à 20 requêtes par minute.\n\n402 sans `api.access`. 422 : `code: too_many_webhooks` au-delà de 10 webhooks, `code: webhook_url_not_public` pour une adresse non publique (ou qui ne se résout pas) ; sinon validation par champ.",
        "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": "Adresse HTTPS publique (port 443 ou 1024–65535, sans identifiants, hors domaines Hyllo). Adresse renvoyée normalisée (hôte en minuscules, sans point final). Plages refusées, en plus des adresses privées, locales et réservées : `2002::/16`, `2001::/32`, `fec0::/10` ; aucun proxy n'est utilisé. Hôte en ASCII seulement : un nom internationalisé s'écrit en punycode (`xn--…`), sinon 422 `webhook_url_not_public`. Refusée si elle se résout vers une adresse privée : 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": "Groupe les événements de visite en `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 créé",
            "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": "Secret de signature, affiché une seule fois."
                    }
                  }
                }
              }
            }
          },
          "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": "Catalogue des événements",
        "description": "Types d'événements auxquels un webhook peut s'abonner. `visits.batch` et `webhook.test` sont envoyés mais ne se souscrivent pas. Charge utile de chaque type : voir la section « Webhooks » de la description générale et les schémas `WebhookEvent*` (guide : `/developers/reference/events`).",
        "x-required-scope": "webhooks:manage",
        "responses": {
          "200": {
            "description": "Catalogue",
            "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": "Lire un webhook",
        "description": "Le secret n'est jamais renvoyé.",
        "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": "Modifier un webhook",
        "description": "Modifie adresse, description, événements, groupement ou état. Réactiver un webhook désactivé (`is_active: true`) remet `failing_since` et `disabled_reason` à `null`. Les changements d'`url` (chacun résolu sur le moment) sont limités à 20 par minute et par compte, compteur partagé avec l'application : toute requête qui porte `url` compte, même avec la valeur actuelle ; au-delà, 429 `rate_limited` avec `Retry-After`. Les requêtes sans `url` ne sont pas comptées. 402 sans `api.access`. 403 `code: staff_disabled` pour `is_active: true` ou un changement d'`url` sur un webhook coupé par le personnel Hyllo (`disabled_reason: staff`), qui n'envoie plus rien.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Chaque champ est facultatif ; un champ présent suit les règles de la création.",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "description": "Adresse HTTPS publique (port 443 ou 1024–65535, sans identifiants, hors domaines Hyllo). Adresse renvoyée normalisée (hôte en minuscules, sans point final). Plages refusées, en plus des adresses privées, locales et réservées : `2002::/16`, `2001::/32`, `fec0::/10` ; aucun proxy n'est utilisé. Hôte en ASCII seulement : un nom internationalisé s'écrit en punycode (`xn--…`), sinon 422 `webhook_url_not_public`. Refusée si elle se résout vers une adresse privée : 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": "Groupe les événements de visite en `visits.batch`."
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Réactiver (`true`) remet `failing_since` et `disabled_reason` à `null`."
                  }
                }
              },
              "example": {
                "events": [
                  "short_link.created"
                ],
                "is_active": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook modifié",
            "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": "Supprimer un webhook",
        "description": "Supprime le webhook et son journal. Permis sans `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "204": {
            "description": "Supprimé",
            "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": "Renouveler le secret",
        "description": "Génère un nouveau secret, renvoyé une seule fois. L'ancien reste valide 24 h : pendant ce temps chaque envoi porte deux signatures `v1=` (la nouvelle d'abord). 402 sans `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Nouveau 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": "Envoyer un événement d'essai",
        "description": "Envoie `webhook.test` **de façon synchrone** (5 s au plus) et renvoie la livraison telle qu'elle s'est terminée (`succeeded` ou `failed`, avec `response_status` ou `error`). Jamais relancé ; ne modifie ni `failing_since` ni `last_*`. Permis sur un webhook désactivé par un admin ; 403 `code: staff_disabled` s'il l'a été par le personnel Hyllo (il n'envoie plus rien, essai compris). 10 requêtes par minute. 402 sans `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Livraison de l'essai",
            "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": "Journal des livraisons",
        "description": "Livraisons du webhook, les plus récentes d'abord, 25 par page, conservées 30 jours. Sans `request_body` (voir le détail d'une livraison).",
        "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": "Ne garde que les livraisons de ce statut."
          }
        ],
        "responses": {
          "200": {
            "description": "Page de livraisons",
            "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": "Détail d'une livraison",
        "description": "La livraison, avec `request_body` : la charge exacte de l'événement.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Livraison",
            "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": "Renvoyer une livraison",
        "description": "Met en file une nouvelle livraison (manuelle, `is_manual: true`) du même événement, avec le même `Hyllo-Event-Id` ; elle ne compte pas contre le plafond mensuel. 403 `code: staff_disabled` si le webhook a été coupé par le personnel Hyllo. 30 requêtes par minute. 402 sans `api.access`.",
        "x-required-scope": "webhooks:manage",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/WebhookDeliveryId"
          }
        ],
        "responses": {
          "202": {
            "description": "Nouvelle livraison en file",
            "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": "Un lien court vient d'être créé.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "short_link.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkUpdated",
        "summary": "short_link.updated",
        "description": "Un lien court a été modifié. Les modifications rapprochées (sections enregistrées une à une) sont regroupées en un seul événement envoyé environ 30 s après la dernière, avec l'état à ce moment ; rien n'est envoyé si le lien a été supprimé entre-temps.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "short_link.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkDeleted",
        "summary": "short_link.deleted",
        "description": "Un lien court a été supprimé : `data.resource` ne garde que sa référence `{ type, id, name }`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "short_link.expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkExpired",
        "summary": "short_link.expired",
        "description": "Un lien court a atteint sa date d'expiration (détection toutes les 5 minutes, une seule fois). L'identifiant `evt_…` est déterministe pour (ressource, `expires_at`) : un rejeu garde le même `Hyllo-Event-Id`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "qr_code.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeCreated",
        "summary": "qr_code.created",
        "description": "Un QR code vient d'être créé.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "qr_code.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeUpdated",
        "summary": "qr_code.updated",
        "description": "Un QR code a été modifié (regroupement et délai de 30 s comme `short_link.updated`).\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "qr_code.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeDeleted",
        "summary": "qr_code.deleted",
        "description": "Un QR code a été supprimé : `data.resource` ne garde que sa référence `{ type, id, name }`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "qr_code.expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeExpired",
        "summary": "qr_code.expired",
        "description": "Un QR code a atteint sa date d'expiration. L'identifiant `evt_…` est déterministe pour (ressource, `expires_at`) : un rejeu garde le même `Hyllo-Event-Id`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "link_page.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageCreated",
        "summary": "link_page.created",
        "description": "Une link page vient d'être créée.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "link_page.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageUpdated",
        "summary": "link_page.updated",
        "description": "Une link page a été modifiée, y compris l'un de ses liens (créé, modifié ou supprimé). Regroupement et délai de 30 s comme `short_link.updated`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "link_page.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageDeleted",
        "summary": "link_page.deleted",
        "description": "Une link page a été supprimée : `data.resource` ne garde que sa référence `{ type, id, name }`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "link_page.expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageExpired",
        "summary": "link_page.expired",
        "description": "Une link page a atteint sa date d'expiration. L'identifiant `evt_…` est déterministe pour (ressource, `expires_at`) : un rejeu garde le même `Hyllo-Event-Id`.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "visit_limit.reached": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookVisitLimitReached",
        "summary": "visit_limit.reached",
        "description": "Une ressource a atteint sa limite de visites (`max_visits`). Envoyé une fois par décompte : une réinitialisation du décompte ou un nouveau `max_visits` permet un nouvel événement.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "alert.triggered": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookAlertTriggered",
        "summary": "alert.triggered",
        "description": "Une alerte statistique s'est déclenchée (seuil, hausse ou baisse), après l'envoi de la notification.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "qr_code.scanned": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookQrCodeScanned",
        "summary": "qr_code.scanned",
        "description": "Un QR code dynamique a été scanné. Compte pour le plafond mensuel ; bots exclus.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "short_link.clicked": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookShortLinkClicked",
        "summary": "short_link.clicked",
        "description": "Un lien court a été ouvert. Compte pour le plafond mensuel ; bots exclus.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "link_page.viewed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkPageViewed",
        "summary": "link_page.viewed",
        "description": "Une link page a été consultée. Compte pour le plafond mensuel ; bots exclus.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "link.clicked": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookLinkClicked",
        "summary": "link.clicked",
        "description": "Un lien d'une link page a été cliqué. Compte pour le plafond mensuel ; bots exclus.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "visits.batch": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookVisitsBatch",
        "summary": "visits.batch",
        "description": "Visites groupées (webhook avec `batch_visits`) : jusqu'à 500 événements de visite dans `data.events`. Jamais souscrit explicitement : envoyé à la place des événements de visite individuels. Garantie : au plus une fois — si le processus d'envoi s'arrête entre la prise des visites et leur enregistrement, ce lot est perdu.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "webhookWebhookTest",
        "summary": "webhook.test",
        "description": "Événement d'essai envoyé par `POST /webhooks/{webhook}/test`. Jamais souscrit, jamais relancé.\n\nRéponse attendue : tout code 2xx dans les 5 s. Un autre code, un délai dépassé ou une erreur réseau déclenche une relance.",
        "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": "Reçu (tout code 2xx convient)."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "hyl_…",
        "description": "Jeton personnel d'espace (`hyl_…`) créé dans l'application : `Authorization: Bearer hyl_…`."
      }
    },
    "headers": {
      "XRateLimitLimit": {
        "description": "Requêtes autorisées par minute pour le plafond le plus serré (jeton, ou espace entier).",
        "schema": {
          "type": "integer",
          "example": 120
        }
      },
      "XRateLimitRemaining": {
        "description": "Requêtes restantes dans la minute en cours pour le plafond le plus serré.",
        "schema": {
          "type": "integer",
          "example": 117
        }
      },
      "XRateLimitReset": {
        "description": "Instant (timestamp Unix, en secondes) où le plafond le plus serré se libère.",
        "schema": {
          "type": "integer",
          "example": 1790000000
        }
      },
      "RetryAfter": {
        "description": "Secondes à attendre avant de réessayer (réponses 429).",
        "schema": {
          "type": "integer",
          "example": 23
        }
      },
      "IdempotentReplayed": {
        "description": "`true` quand la réponse est la copie de celle d'une première requête portant la même `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": "Rend la création rejouable sans doublon. De 1 à 255 caractères ASCII imprimables (sinon 422 avec `errors.idempotency_key`). Rejouée avec la même clé et le même corps, la requête renvoie la réponse d'origine (en-tête `Idempotent-Replayed: true`) pendant 24 h, sans rien recréer. Même clé avec une requête différente : 422 `idempotency_key_mismatch`. Même clé tant que la première requête tourne encore : 409 `idempotency_in_progress`. Seules les réponses réussies sont conservées. La clé est propre au jeton."
      },
      "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": "Recherche textuelle (3 caractères au moins)."
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "recent",
            "updated",
            "name",
            "visits"
          ],
          "default": "recent"
        },
        "description": "`recent` : les plus récents d'abord ; `updated` : dernière modification d'abord ; `name` : nom ou titre, alphabétique ; `visits` : les plus visités (tous les temps) d'abord."
      },
      "Domain": {
        "name": "domain",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "example": "hyllo",
        "description": "`hyllo` : ressources servies sur le domaine de Hyllo ; ULID d'un domaine personnalisé de l'espace : celles servies sur ce domaine. Absent : tous. Domaine inconnu de l'espace : 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": "Période d'analyse. `custom` demande `from` et `to` et la fonction `analytics.custom_range` de l'offre (402 sinon). Les périodes sont ramenées à la durée de conservation de l'offre."
      },
      "AnalyticsFrom": {
        "name": "from",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-01-01",
        "description": "Début `YYYY-MM-DD`. Requis si `period=custom` ; pas avant la limite de conservation de l'offre."
      },
      "AnalyticsTo": {
        "name": "to",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-01-31",
        "description": "Fin `YYYY-MM-DD`, au plus tôt `from`. Requis si `period=custom`."
      },
      "AnalyticsGranularity": {
        "name": "granularity",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "hour",
            "day",
            "week",
            "month"
          ]
        },
        "description": "Granularité de `timeline`. Absente : déduite de la période (jusqu'à 1 jour : `hour` ; jusqu'à 60 jours : `day` ; jusqu'à 180 jours : `week` ; au-delà : `month`)."
      },
      "AnalyticsStream": {
        "name": "stream",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "visit",
            "interaction"
          ],
          "default": "visit"
        },
        "description": "`visit` : visites de la ressource ; `interaction` : clics sur les liens d'une link page."
      },
      "AnalyticsCompare": {
        "name": "compare",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "previous_period",
            "previous_year",
            "1",
            "0"
          ],
          "default": "0"
        },
        "description": "`previous_period` (même durée, terminée la veille) ou `previous_year` (mêmes dates un an plus tôt) : renvoie alors `comparison` et `previous_timeline`. `1` vaut `previous_period`. Requiert `analytics.custom_range` (402 sinon)."
      },
      "ShortLinkId": {
        "name": "shortLink",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID du lien court."
      },
      "QrCodeId": {
        "name": "qrCode",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID du QR code."
      },
      "LinkPageId": {
        "name": "linkPage",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID de la link page."
      },
      "LinkId": {
        "name": "link",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID du lien, qui doit appartenir à la page (sinon 404)."
      },
      "WebhookId": {
        "name": "webhook",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID du webhook."
      },
      "WebhookDeliveryId": {
        "name": "delivery",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID de la livraison, qui doit appartenir au webhook (sinon 404)."
      },
      "HylloSignature": {
        "name": "Hyllo-Signature",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "t=1790000000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
        },
        "description": "`t=<timestamp Unix>,v1=<HMAC-SHA256 hexadécimal>`. `t` change à chaque tentative de livraison. Deux valeurs `v1=` pendant les 24 h qui suivent un renouvellement du secret (la nouvelle d'abord) : accepter si l'une correspond. Vérification : voir « Vérifier la signature » dans la section « Webhooks » de la description générale (guide : `/developers/webhooks#verify-signature`)."
      },
      "HylloEventId": {
        "name": "Hyllo-Event-Id",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "evt_01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "Identifiant de l'événement, égal à `id` dans le corps. Stable d'une relance à l'autre : sert à dédupliquer."
      },
      "HylloEventType": {
        "name": "Hyllo-Event-Type",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "example": "short_link.created"
        },
        "description": "Type de l'événement, égal à `type` dans le corps."
      },
      "HylloDeliveryId": {
        "name": "Hyllo-Delivery-Id",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "format": "ulid",
          "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
        },
        "description": "ULID de cette livraison (change à chaque renvoi manuel)."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Jeton absent, inconnu, expiré ou révoqué (`code: invalid_token`). Aussi renvoyé quand le créateur du jeton a quitté l'espace. Les refus sont comptés par IP (30 par minute) : au-delà, 429.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorInvalidToken"
            }
          }
        }
      },
      "PlanRequired": {
        "description": "L'offre de l'espace n'inclut pas l'accès à l'API (`feature: api.access`), ou le droit d'offre demandé manque ou son quota est atteint : `plan_required`, `quota_reached` ou `plan_restricted` (ressource en lecture seule après une rétrogradation).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PlanRestriction"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Scope manquant (`code: insufficient_scope`, avec `required_scope`), ou action refusée par le rôle du créateur du jeton dans l'espace (lecteur, membre invité sous Business : lecture seule).",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorInsufficientScope"
                },
                {
                  "$ref": "#/components/schemas/ErrorForbidden"
                }
              ]
            }
          }
        }
      },
      "NotFound": {
        "description": "Ressource inconnue, ou appartenant à un autre espace que celui du jeton (jamais de 403 : l'existence n'est pas révélée).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "`idempotency_in_progress` : une requête portant la même `Idempotency-Key` est encore en cours.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "Validation échouée (`errors` par champ). Cas particuliers : `code: field_not_available` pour un champ qui n'existe pas dans l'API publique (`folderId`, `folder_id`, `organization`, `folder`) ; `code: idempotency_key_mismatch` pour une `Idempotency-Key` réutilisée avec une requête différente (pas de `errors`).",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorValidation"
                },
                {
                  "$ref": "#/components/schemas/ErrorFieldNotAvailable"
                },
                {
                  "$ref": "#/components/schemas/Error"
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Plafond atteint (`code: rate_limited`) : par jeton, pour tous les jetons de l'espace ensemble, ou limite propre à une route (export de QR code, `POST /webhooks`, `PATCH /webhooks/{webhook}` avec `url`, `POST /webhooks/{webhook}/test`, `…/resend`). Attendre `Retry-After` secondes. Les en-têtes `X-RateLimit-*` sont présents ; `X-RateLimit-Reset` suit le limiteur dont `X-RateLimit-Remaining` est le plus bas.",
        "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": "Code stable, à tester plutôt que `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": "Une entrée par champ refusé : `folderId` (link pages, modification de QR code), `folder_id` (liens courts), `organization` (modification de QR code), `folder` (filtre de liste).",
            "example": {
              "folderId": [
                "This field is not available through the public API."
              ]
            }
          }
        }
      },
      "ApiScope": {
        "type": "string",
        "description": "Permission d'un jeton. Un scope `write` donne aussi le `read` de sa famille : le jeton stocke les deux (`short_links:write` donne `short_links:read`, et de même pour `qr_codes` et `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": "Refus d'un droit de l'offre de l'espace, rendu en **402**. `plan_required` : la fonction n'est pas incluse ; `quota_reached` : la limite est atteinte ; `plan_restricted` : la ressource a été mise en lecture seule par une rétrogradation.",
        "properties": {
          "message": {
            "type": "string",
            "example": "Cette fonction nécessite l'offre Business."
          },
          "code": {
            "type": "string",
            "enum": [
              "plan_required",
              "quota_reached",
              "plan_restricted"
            ]
          },
          "feature": {
            "type": "string",
            "example": "members.included",
            "description": "Fonction ou quota refusé"
          },
          "required_plan": {
            "type": [
              "string",
              "null"
            ],
            "example": "business",
            "description": "La moins chère des offres vendues qui l'accorde"
          },
          "addon": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "dynamic_qr_codes",
              "storage",
              "link_pages",
              "short_links",
              "custom_domain",
              "member",
              null
            ],
            "example": "storage",
            "description": "Option dont les packs lèveraient le quota ; `null` si aucune ne s'applique"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "example": 5
          },
          "usage": {
            "type": [
              "integer",
              "null"
            ],
            "example": 5
          }
        }
      },
      "PaginationLinks": {
        "type": "object",
        "description": "URL des pages voisines (`null` quand il n'y en a pas).",
        "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": "Liens de navigation."
          },
          "path": {
            "type": "string"
          },
          "per_page": {
            "type": "integer",
            "example": 15
          },
          "to": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total": {
            "type": "integer",
            "example": 42
          }
        }
      },
      "ShortUrlDomain": {
        "oneOf": [
          {
            "type": "object",
            "description": "Domaine personnalisé sur lequel la short URL est servie, choisi à la création et jamais modifié. `null` : domaine de Hyllo.",
            "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": "Dossier de création de la ressource ; `null` : à la racine. Les dossiers ne sont pas gérés par l'API publique : le champ est en lecture seule.",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
              },
              "name": {
                "type": "string"
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "ResourceAccess": {
        "type": "object",
        "description": "Droits du créateur du jeton sur la ressource, selon son rôle dans l'espace. L'API publique n'expose ni le partage ni le rangement en dossier.",
        "required": [
          "is_owner",
          "can_edit",
          "can_delete",
          "can_share",
          "can_organize"
        ],
        "properties": {
          "is_owner": {
            "type": "boolean",
            "description": "`true` si le créateur du jeton a créé la ressource."
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_delete": {
            "type": "boolean"
          },
          "can_share": {
            "type": "boolean"
          },
          "can_organize": {
            "type": "boolean"
          }
        }
      },
      "PlanRestrictionState": {
        "oneOf": [
          {
            "type": "object",
            "description": "Ressource en lecture seule ou bloquée après une rétrogradation d'offre ; `null` sinon. Toute modification répond alors 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": "Suppression prévue ; renseignée une fois la ressource bloquée."
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "ShortLink": {
        "type": "object",
        "description": "Lien court. Le code et la destination sont immuables après la création.",
        "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": "Ouvre la destination dans son application native quand son hôte est connu."
          },
          "short": {
            "type": [
              "string",
              "null"
            ],
            "description": "Code court.",
            "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": "Visites depuis l'activation ou la remise à zéro de la limite (≠ `visits_count`, tous les temps)."
          },
          "is_visit_limit_reached": {
            "type": "boolean"
          },
          "visits_count": {
            "type": "integer",
            "description": "Visites de tous les temps ; 0 juste après création."
          },
          "unique_visitors_count": {
            "type": "integer"
          },
          "visits_series": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Liste (`GET /short-links`) seulement : visites par jour sur 30 jours, la plus ancienne d'abord, aujourd'hui en dernier. Absent des autres réponses."
          },
          "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 de la ligne dans `urls`."
          },
          "input": {
            "type": [
              "string",
              "null"
            ],
            "description": "Ligne telle que reçue."
          },
          "reason": {
            "type": "string",
            "enum": [
              "empty",
              "invalid_url",
              "too_long",
              "blocked"
            ]
          }
        }
      },
      "QRCodeGradient": {
        "type": "object",
        "description": "Dégradé appliqué quand `colorMode` vaut `gradient`.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "linear",
              "radial"
            ]
          },
          "rotation": {
            "type": "number",
            "description": "Rotation en 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": "Apparence du QR code. À la création, tous les champs sont requis si `design` est fourni ; sinon le design par défaut du créateur du jeton (modèle marqué par défaut, à défaut le design de base) est appliqué. À la modification, chaque champ est facultatif et fusionné avec l'existant. Les options avancées demandent `qr.design_advanced` (402 sinon).",
        "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 d'un fichier de la médiathèque de l'espace (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": "Cadre autour du QR code ; `null` : aucun. À la création, `frameType`, `text` et `element` sont requis quand `frame` est fourni ; `frame` absent avec un `design` fourni : pas de cadre ; absent avec `design` absent : le cadre du design par défaut. Tous les cadres demandent `qr.frames_all` (402 sinon).",
            "properties": {
              "frameType": {
                "type": "string",
                "description": "Identifiant du cadre."
              },
              "text": {
                "type": "object",
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 500
                },
                "description": "Textes du cadre, par emplacement."
              },
              "element": {
                "type": "object",
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": "Valeurs (couleurs…) des éléments du cadre, par élément."
              },
              "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. Les réponses de lecture unitaire, de création et de modification n'ont pas `visits_count` ; la liste (`QRCodeListItem`) l'ajoute.",
        "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` : contenu encodé dans le QR ; `dynamic` : QR servi par une short URL, modifiable sans réimprimer.",
            "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": "Disponibilité du QR code. Les protections (dates, mot de passe, limite) ne s'appliquent qu'aux QR dynamiques.",
            "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": "Déprécié : toujours `[]`."
          },
          "domain": {
            "$ref": "#/components/schemas/ShortUrlDomain"
          },
          "short_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL courte publique ; `null` pour un QR `static`.",
            "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": "Scans de tous les temps ; `null` pour un QR `static`."
              },
              "visits_series": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "integer"
                },
                "description": "Scans par jour sur 30 jours, le plus ancien d'abord, aujourd'hui en dernier ; `null` pour un QR `static`."
              }
            }
          }
        ],
        "description": "Élément de `GET /qr-codes` : un `QRCode` avec en plus `visits_count` et `visits_series`."
      },
      "PageLanguage": {
        "type": "string",
        "enum": [
          "en",
          "fr",
          "es",
          "de",
          "it",
          "pt",
          "nl",
          "pl",
          "ro",
          "sv"
        ],
        "example": "fr",
        "description": "Langue dans laquelle une link page est écrite (backlog 3.4) : sa langue par défaut (`locale`) ou l'une de ses langues ajoutées (`languages`). Uniquement des écritures latines, de gauche à droite. Distincte de la langue de l'interface (`en`, `fr`), celle de `UserResource.locale`."
      },
      "LinkPageTranslations": {
        "type": "object",
        "description": "Traductions d'une link page, indexées par langue ajoutée (`PageLanguage`). Chaque champ est facultatif : sur la page publique, un champ absent reprend la valeur de la langue par défaut (repli champ par champ).\n\nNormalisation silencieuse à l'enregistrement : chaînes réduites par `trim`, chaînes vides et `null` retirés, langue devenue vide retirée, clés limitées aux langues **ajoutées** de la page. Toujours renvoyé comme un objet, `{}` quand il est vide (jamais `[]`).",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 255,
              "example": "Marie's place"
            },
            "description": {
              "type": "string",
              "maxLength": 1000,
              "example": "Bistro in Lyon",
              "description": "Bio traduite"
            },
            "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": "Traductions d'un lien de link page, indexées par langue ajoutée de la page (`PageLanguage`). Tout lien traduit son `title` ; `data` ne porte que les clés traduisibles de son type :\n\n| Type | Clés de `data` |\n|------|----------------|\n| `text` | `text` |\n| `event` | `summary`, `description` |\n| `mail` | `subject`, `message` |\n\nLes autres types ne traduisent que `title`. Même normalisation que `LinkPageTranslations`, avec en plus les clés de `data` limitées au type du lien. Toujours renvoyé comme un objet, `{}` quand il est vide (jamais `[]`).",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 255,
              "example": "Write to us"
            },
            "data": {
              "type": "object",
              "description": "Clés traduisibles du type du lien ; sur la page publique, chacune remplace la sienne dans `data`, les autres gardent leur valeur",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Lien `text`"
                },
                "summary": {
                  "type": "string",
                  "maxLength": 255,
                  "description": "Lien `event`"
                },
                "description": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Lien `event`"
                },
                "subject": {
                  "type": "string",
                  "maxLength": 255,
                  "description": "Lien `mail`"
                },
                "message": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Lien `mail`"
                }
              }
            }
          }
        },
        "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": "Lien d'une link page. Le type `form` n'existe pas : 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": "`\"\"` quand il est vide."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Charge utile selon `type` (mêmes règles que dans l'application). Pour `file` et `menu` en mode `pdf`, la réponse ajoute `url`, `fileName`, `mime` et `size` du fichier."
          },
          "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": "Vignette du lien. Défauts renvoyés : `type: icon`, `style: style-1`.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "icon"
                ]
              },
              "image": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL d'un fichier de la médiathèque de l'espace.",
                "maxLength": 2048
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 64
              },
              "style": {
                "type": "string",
                "enum": [
                  "style-1",
                  "style-2"
                ]
              }
            }
          },
          "highlight": {
            "type": "object",
            "description": "Mise en avant du lien.",
            "properties": {
              "animation": {
                "type": "string",
                "enum": [
                  "none",
                  "pulse",
                  "shake",
                  "glow"
                ]
              },
              "pinned": {
                "type": "boolean",
                "description": "Un seul lien épinglé par 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": "Thème de la page : les sections `background`, `buttons`, `avatar`, `heading` et `footer` sont des objets libres, renvoyés tels qu'enregistrés (le plus simple : relire le thème d'une page et le renvoyer modifié). Les options avancées demandent `link_pages.design_advanced` (402 sinon).",
        "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. Le mot de passe de la page n'est jamais renvoyé.",
        "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": "Code de la page.",
            "example": "chez-marie"
          },
          "domain": {
            "$ref": "#/components/schemas/ShortUrlDomain"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "`\"\"` quand elle est vide."
          },
          "meta": {
            "type": "object",
            "description": "Métadonnées SEO. Les modifier demande `link_pages.seo` (402 sinon).",
            "properties": {
              "title": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 255
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              }
            }
          },
          "avatar": {
            "type": "object",
            "description": "Avatar de la page. Défaut renvoyé : `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": "Liens de la page, triés par position."
          },
          "socialLinks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/SocialLink"
            }
          },
          "theme": {
            "$ref": "#/components/schemas/LinkPageTheme"
          },
          "hasPagePassword": {
            "type": "boolean"
          },
          "hasPageLockType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Valeur enregistrée, en lecture seule dans l'API publique."
          },
          "shouldNoIndex": {
            "type": "boolean"
          },
          "isSensitive": {
            "type": "boolean"
          },
          "locale": {
            "$ref": "#/components/schemas/PageLanguage"
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PageLanguage"
            },
            "description": "Langues ajoutées, sans la langue par défaut ; `[]` pour une page monolingue."
          },
          "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": "Liste (`GET /link-pages`) seulement : visites de tous les temps (les clics sur les liens n'en font pas partie). Absent des autres réponses."
          },
          "visits_series": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Liste seulement : visites par jour sur 30 jours, la plus ancienne d'abord. Absent des autres réponses."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AnalyticsBreakdownItem": {
        "type": "object",
        "description": "Entrée d'un classement analytique (pays, device, navigateur, etc.).",
        "properties": {
          "value": {
            "type": [
              "string",
              "null"
            ],
            "example": "FR",
            "description": "Valeur du segment (code pays, nom du device, etc.)"
          },
          "count": {
            "type": "integer",
            "example": 450
          },
          "percentage": {
            "type": "number",
            "example": 36.5,
            "description": "Part en % du total d'événements sur la période"
          }
        }
      },
      "AnalyticsTimelineSlot": {
        "type": "object",
        "description": "Entrée de la timeline — toujours présente même si count = 0 (zéro-filling).",
        "properties": {
          "date": {
            "type": "string",
            "example": "2026-05-08",
            "description": "Début du slot. Format selon la granularité : `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": "Créneau d'une série de `timeline_by_type`, zéro-rempli.",
        "properties": {
          "date": {
            "type": "string",
            "example": "2026-05-08",
            "description": "Début du créneau, même format et mêmes valeurs que `timeline[].date`"
          },
          "count": {
            "type": "integer",
            "example": 45
          }
        }
      },
      "Analytics": {
        "type": "object",
        "description": "Statistiques agrégées de l'espace du jeton. Agrégats seulement : aucune IP, empreinte d'IP ni 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": "Date la plus ancienne sélectionnable (jamais avant la limite de conservation de l'offre).",
                "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": "Nombre de visiteurs distincts ; aucune donnée individuelle n'est exposée."
              },
              "evolution": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Variation en % par rapport à la période précédente de même durée ; `null` sans donnée avant."
              },
              "active_resources": {
                "type": "integer",
                "description": "Ressources ayant reçu au moins un événement sur la période."
              }
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimelineSlot"
            },
            "description": "Créneaux zéro-remplis, sans trou."
          },
          "comparison": {
            "oneOf": [
              {
                "type": "object",
                "description": "Fenêtre comparée ; `null` sans `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 de la fenêtre `comparison` ; `null` sans `compare`."
          },
          "timeline_by_type": {
            "type": "object",
            "description": "`timeline` ventilée par type de ressource.",
            "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": "Événements par type de ressource, les trois types toujours présents."
          },
          "by_country": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Top 10 pays (ISO 3166-1 alpha-2). Vide si la fonction `analytics.breakdowns` manque à l'offre."
          },
          "unknown_country": {
            "type": "object",
            "description": "Événements sans pays résolu.",
            "properties": {
              "count": {
                "type": "integer"
              },
              "percentage": {
                "type": "number"
              }
            }
          },
          "by_device": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Appareils."
          },
          "by_browser": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Navigateurs."
          },
          "by_os": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Systèmes d'exploitation."
          },
          "by_utm_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Sources UTM."
          },
          "by_utm_medium": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Médias UTM."
          },
          "by_utm_campaign": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Campagnes UTM."
          },
          "by_click_id_platform": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Plateformes publicitaires détectées par identifiant de clic (seule la plateforme est stockée)."
          },
          "by_referer": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Référents, réduits à leur domaine."
          },
          "by_link": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Titre du lien."
                },
                "id": {
                  "type": "string",
                  "format": "ulid",
                  "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
                  "description": "ULID du lien."
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Clics par lien de link page (flux `interaction`)."
          },
          "by_resource": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "description": "Libellé de la ressource."
                },
                "id": {
                  "type": "string",
                  "description": "ULID de la ressource."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "qr-codes",
                    "link-pages",
                    "short-links"
                  ]
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Ressources les plus actives."
          },
          "locked": {
            "type": "object",
            "required": [
              "breakdowns"
            ],
            "properties": {
              "breakdowns": {
                "type": "boolean",
                "description": "`true` quand l'offre n'inclut pas `analytics.breakdowns` : les classements `by_*` sont alors vides (200, pas de 402)."
              }
            }
          }
        }
      },
      "ResourceAnalytics": {
        "type": "object",
        "description": "Statistiques agrégées d'une ressource. Agrégats seulement : aucune IP, empreinte d'IP ni user-agent. Un QR code `static` renvoie des compteurs à zéro.",
        "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": "Date la plus ancienne sélectionnable (jamais avant la limite de conservation de l'offre).",
                "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": "Nombre de visiteurs distincts ; aucune donnée individuelle n'est exposée."
              },
              "evolution": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Variation en % par rapport à la période précédente de même durée ; `null` sans donnée avant."
              }
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsTimelineSlot"
            },
            "description": "Créneaux zéro-remplis, sans trou."
          },
          "comparison": {
            "oneOf": [
              {
                "type": "object",
                "description": "Fenêtre comparée ; `null` sans `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 de la fenêtre `comparison` ; `null` sans `compare`."
          },
          "by_country": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Top 10 pays (ISO 3166-1 alpha-2). Vide si la fonction `analytics.breakdowns` manque à l'offre."
          },
          "unknown_country": {
            "type": "object",
            "description": "Événements sans pays résolu.",
            "properties": {
              "count": {
                "type": "integer"
              },
              "percentage": {
                "type": "number"
              }
            }
          },
          "by_device": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Appareils."
          },
          "by_browser": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Navigateurs."
          },
          "by_os": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Systèmes d'exploitation."
          },
          "by_utm_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Sources UTM."
          },
          "by_utm_medium": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Médias UTM."
          },
          "by_utm_campaign": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Campagnes UTM."
          },
          "by_click_id_platform": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Plateformes publicitaires détectées par identifiant de clic (seule la plateforme est stockée)."
          },
          "by_referer": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsBreakdownItem"
            },
            "description": "Référents, réduits à leur domaine."
          },
          "by_link": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Titre du lien."
                },
                "id": {
                  "type": "string",
                  "format": "ulid",
                  "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
                  "description": "ULID du lien."
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Clics par lien de link page (flux `interaction`)."
          },
          "by_resource": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "description": "Libellé de la ressource."
                },
                "id": {
                  "type": "string",
                  "description": "ULID de la ressource."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "qr-codes",
                    "link-pages",
                    "short-links"
                  ]
                },
                "count": {
                  "type": "integer"
                },
                "percentage": {
                  "type": "number"
                }
              }
            },
            "description": "Ressources les plus actives."
          },
          "locked": {
            "type": "object",
            "required": [
              "breakdowns"
            ],
            "properties": {
              "breakdowns": {
                "type": "boolean",
                "description": "`true` quand l'offre n'inclut pas `analytics.breakdowns` : les classements `by_*` sont alors vides (200, pas de 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": "Début du jeton, jamais sa valeur.",
                "example": "hyl_a1b2c3d4"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ApiScope"
                }
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "`null` : n'expire jamais."
              }
            }
          },
          "workspace": {
            "type": "object",
            "required": [
              "id",
              "name",
              "plan"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
              },
              "name": {
                "type": "string"
              },
              "plan": {
                "type": "string",
                "description": "Clé de l'offre de l'espace.",
                "example": "pro"
              }
            }
          },
          "rate_limit": {
            "type": "object",
            "required": [
              "per_minute"
            ],
            "properties": {
              "per_minute": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Requêtes par minute et par jeton ; `null` : illimité par contrat. Tous les jetons de l'espace ensemble disposent du double."
              }
            }
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "description": "Un webhook de l'espace. Le secret de signature n'y figure jamais : il n'est montré qu'à la création et à la rotation.",
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/hooks/hyllo",
            "description": "Adresse normalisée : hôte en minuscules, sans point final."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscribableEvent"
            },
            "description": "Types souscrits (voir `GET /webhooks/events`)."
          },
          "is_active": {
            "type": "boolean"
          },
          "batch_visits": {
            "type": "boolean",
            "description": "Les événements de visite sont groupés en `visits.batch` au lieu d'être envoyés un à un."
          },
          "disabled_reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "manual",
              "failing",
              "staff",
              null
            ],
            "description": "`manual` : désactivé par un admin ; `failing` : désactivé automatiquement après 72 h d'échecs ; `staff` : désactivé par le personnel Hyllo (le réactiver ou changer son `url` répond 403 `staff_disabled`) ; il n'envoie plus rien : livraisons `skipped`, essai compris. `null` si actif."
          },
          "failing_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Début de la série d'échecs en cours ; `null` si le dernier envoi a réussi."
          },
          "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": "Une livraison d'un événement à un webhook (ligne du journal, conservé 30 jours).",
        "properties": {
          "id": {
            "type": "string",
            "format": "ulid",
            "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
          },
          "event": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "example": "evt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
                "description": "Identique à `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` : en attente d'une tentative (ou d'une relance) ; `succeeded` : réponse 2xx ; `failed` : abandonnée ; `skipped` : jamais tentée (webhook désactivé ou offre sans API)."
          },
          "attempts": {
            "type": "integer",
            "example": 1,
            "description": "Tentatives faites ; incrémenté au début de chaque tentative."
          },
          "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": "Code HTTP reçu ; `null` sans réponse."
          },
          "response_excerpt": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1024,
            "description": "Début de la réponse : le transfert est coupé au-delà de 1 024 octets ; `response_status` est conservé."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "timeout",
              "dns",
              "tls",
              "connection",
              "redirect",
              "not_public_at_send",
              "interrupted",
              null
            ],
            "description": "Code stable d'une erreur ; `null` pour une réponse HTTP non 2xx (voir `response_status`). `interrupted` : tentative commencée sans compte rendu, comptée comme un échec ; la livraison passe à `failed` au-delà de 9 tentatives."
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "is_manual": {
            "type": "boolean",
            "description": "Test ou renvoi manuel."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "request_body": {
            "type": "object",
            "description": "Charge envoyée (l'événement, enveloppe comprise). Présent uniquement sur `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": "Type d'événement auquel un webhook peut s'abonner."
      },
      "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": "Événement de visite : compte pour le plafond mensuel et peut être groupé."
          }
        }
      },
      "WebhookUsage": {
        "type": "object",
        "description": "Plafond mensuel des événements de visite de l'espace.",
        "properties": {
          "period": {
            "type": "string",
            "example": "2026-12",
            "description": "Mois civil en cours (UTC)."
          },
          "visit_events": {
            "type": "integer",
            "description": "Événements de visite enregistrés ce mois-ci."
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Plafond de l'offre ; `null` : illimité ; 0 : API non incluse."
          }
        }
      },
      "WebhookEnvelope": {
        "type": "object",
        "description": "Enveloppe commune à tous les événements : corps JSON de la requête envoyée au webhook.",
        "required": [
          "id",
          "type",
          "api_version",
          "created_at",
          "workspace",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "evt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "description": "Identifiant de l'événement (`Hyllo-Event-Id`) : clé de déduplication."
          },
          "type": {
            "type": "string",
            "example": "short_link.created"
          },
          "api_version": {
            "type": "string",
            "example": "2026-12-01",
            "description": "Version du format de l'enveloppe."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "ulid",
                "example": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
                "description": "ULID de l'espace"
              }
            }
          },
          "data": {
            "type": "object",
            "description": "Contenu propre au type (voir les schémas `WebhookEvent*`)."
          }
        }
      },
      "WebhookResourceReference": {
        "type": "object",
        "description": "Référence d'une ressource.",
        "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": "Titre ou URL (lien court), nom (QR code), titre (link page)."
          }
        }
      },
      "WebhookVisit": {
        "type": "object",
        "description": "Une visite, sans donnée personnelle : ni IP, ni user-agent, ni navigateur, ni paramètres UTM.",
        "properties": {
          "occurred_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Code pays",
            "example": "FR"
          },
          "device_type": {
            "type": [
              "string",
              "null"
            ],
            "example": "mobile"
          },
          "referrer_domain": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hôte seul du site référent.",
            "example": "example.com"
          }
        }
      },
      "WebhookEventShortLinkCreated": {
        "description": "Un lien court vient d'être créé. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Un lien court a été modifié. Les modifications rapprochées (sections enregistrées une à une) sont regroupées en un seul événement envoyé environ 30 s après la dernière, avec l'état à ce moment ; rien n'est envoyé si le lien a été supprimé entre-temps. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Un lien court a été supprimé : `data.resource` ne garde que sa référence `{ 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": "Un lien court a atteint sa date d'expiration (détection toutes les 5 minutes, une seule fois). L'identifiant `evt_…` est déterministe pour (ressource, `expires_at`) : un rejeu garde le même `Hyllo-Event-Id`. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Un QR code vient d'être créé. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Un QR code a été modifié (regroupement et délai de 30 s comme `short_link.updated`). `data.object` est la représentation de l'API publique de la ressource, sans `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": "Un QR code a été supprimé : `data.resource` ne garde que sa référence `{ 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": "Un QR code a atteint sa date d'expiration. L'identifiant `evt_…` est déterministe pour (ressource, `expires_at`) : un rejeu garde le même `Hyllo-Event-Id`. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Une link page vient d'être créée. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Une link page a été modifiée, y compris l'un de ses liens (créé, modifié ou supprimé). Regroupement et délai de 30 s comme `short_link.updated`. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Une link page a été supprimée : `data.resource` ne garde que sa référence `{ 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": "Une link page a atteint sa date d'expiration. L'identifiant `evt_…` est déterministe pour (ressource, `expires_at`) : un rejeu garde le même `Hyllo-Event-Id`. `data.object` est la représentation de l'API publique de la ressource, sans `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": "Une ressource a atteint sa limite de visites (`max_visits`). Envoyé une fois par décompte : une réinitialisation du décompte ou un nouveau `max_visits` permet un nouvel événement.",
        "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": "Une alerte statistique s'est déclenchée (seuil, hausse ou baisse), après l'envoi de la notification.",
        "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": "Valeur de réglage de l'alerte."
                      }
                    }
                  },
                  "resource": {
                    "$ref": "#/components/schemas/WebhookResourceReference"
                  },
                  "count": {
                    "type": "integer",
                    "description": "Compte observé dans la fenêtre."
                  },
                  "baseline": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Référence de comparaison (hausse, baisse) ; `null` pour un seuil."
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventQrCodeScanned": {
        "description": "Un QR code dynamique a été scanné. Compte pour le plafond mensuel ; bots exclus.",
        "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": "Un lien court a été ouvert. Compte pour le plafond mensuel ; bots exclus.",
        "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": "Une link page a été consultée. Compte pour le plafond mensuel ; bots exclus.",
        "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": "Un lien d'une link page a été cliqué. Compte pour le plafond mensuel ; bots exclus.",
        "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": "Visites groupées (webhook avec `batch_visits`) : jusqu'à 500 événements de visite dans `data.events`. Jamais souscrit explicitement : envoyé à la place des événements de visite individuels. Garantie : au plus une fois — si le processus d'envoi s'arrête entre la prise des visites et leur enregistrement, ce lot est perdu.",
        "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": "Enveloppes complètes d'événements de visite (`qr_code.scanned`, `short_link.clicked`, `link_page.viewed`, `link.clicked`), chacune avec son `id`."
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEventWebhookTest": {
        "description": "Événement d'essai envoyé par `POST /webhooks/{webhook}/test`. Jamais souscrit, jamais relancé.",
        "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."
                  }
                }
              }
            }
          }
        ]
      }
    }
  }
}
